From: Owen Leonard <owen@balawis.leonard.fam>
Date: Wed, 6 Oct 2010 00:06:13 +0000 (-0600)
Subject: fix ppi_sched.tpl so it dynamically updates the ppi completed table header
X-Git-Tag: release_1_1_0~13
X-Git-Url: http://git.pippins.net/%7Bnolink%7D?a=commitdiff_plain;h=c89972ed7a65b5c2cd37fe4405b1f1489dab1f62;p=eq%2F.git

fix ppi_sched.tpl so it dynamically updates the ppi completed table header
---

diff --git a/inc/class.tc.inc.php b/inc/class.tc.inc.php
index d1dae8e..b87659f 100644
--- a/inc/class.tc.inc.php
+++ b/inc/class.tc.inc.php
@@ -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);
diff --git a/templates/default/ppi_sched.tpl b/templates/default/ppi_sched.tpl
index 0fc65bf..5a54af0 100644
--- a/templates/default/ppi_sched.tpl
+++ b/templates/default/ppi_sched.tpl
@@ -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>