fix ppi_sched.tpl so it dynamically updates the ppi completed table header
authorOwen Leonard <owen@balawis.leonard.fam>
Wed, 6 Oct 2010 00:06:13 +0000 (18:06 -0600)
committerOwen Leonard <owen@balawis.leonard.fam>
Wed, 6 Oct 2010 00:06:13 +0000 (18:06 -0600)
inc/class.tc.inc.php
templates/default/ppi_sched.tpl

index d1dae8e0ce3a01d11c8f2cc635123f64c7851b31..b87659f9364913279bd5d2436baae07e33630768 100644 (file)
@@ -1471,9 +1471,9 @@ class tc
                  // Display a scheduling table for this presidency member
                  $district_number = '*';
                  $district_name = $presidency_name;
-                 $table_title = "District ".$district_number.": ".$district_name.": All indivs with " . $this->ppi_frequency_label . " PPI Not Completed";
+                 $not_completed_table_title = "District ".$district_number.": ".$district_name.": All indivs with " . $this->ppi_frequency_label . " PPI Not Completed";
                  $appt_table_title = "District ".$district_number.": ".$district_name.": ".$this->ppi_frequency_label." PPI Appointment Slots";
-                 $this->t->set_var('table_title',$table_title);
+                 $this->t->set_var('not_completed_table_title',$not_completed_table_title);
                  $this->t->set_var('appt_table_title',$appt_table_title);
 
                  // query the database for all the appointments
@@ -1621,6 +1621,7 @@ class tc
                        }
                } // End for individuals Loop
 
+               $completed_table_title = "District ".$district_number.": ".$district_name.": All indivs with " . $this->ppi_frequency_label . " PPI Completed";
                $name_width=175; $phone_width=100; $date_width=100; $notes_width=300;
                $completed_table_width=$name_width + $phone_width + $date_width + $notes_width;
                $completed_header_row = "<th width=$name_width><font size=-2>Individual</th>";
@@ -1628,6 +1629,7 @@ class tc
                $completed_header_row.= "<th width=$date_width><font size=-2>Date</th>";
                $completed_header_row.= "<th width=$notes_width><font size=-2>PPI Notes</th>";
 
+               $this->t->set_var('completed_table_title',$completed_table_title);
                $this->t->set_var('table_width',$table_width);
                $this->t->set_var('header_row',$header_row);
                $this->t->set_var('table_data',$table_data);
index 0fc65bfd700073fa68a4599eec47beef65b1de24..5a54af0713fbb7ae545c19dfc0e3f3b182b1869c 100644 (file)
@@ -44,7 +44,7 @@
        <table border="0" width="{table_width}" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
-                               <font face="{font}"><b>{table_title}</b></font>
+                               <font face="{font}"><b>{not_completed_table_title}</b></font>
                        </td>
                </tr>
                <tr bgcolor="#c9c9c9"><font face="{font}">{header_row}</tr>
@@ -65,7 +65,7 @@
        <table border="0" width="{completed_table_width}" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
-                       <font face="{font}"><b>All Individuals with Yearly PPI Completed</b></font>
+                       <font face="{font}"><b>{completed_table_title}</b></font>
                        </td>
                </tr>
                <tr bgcolor="#c9c9c9"><font face="{font}">{completed_header_row}</tr>