fix width of companionshp tables so visit stats are aligned
authorOwen Leonard <owen@balawis.leonard.fam>
Thu, 21 Oct 2010 17:27:12 +0000 (11:27 -0600)
committerOwen Leonard <owen@balawis.leonard.fam>
Thu, 21 Oct 2010 17:27:12 +0000 (11:27 -0600)
make number of months stats configurable

inc/class.tc.inc.php
setup/tc_config

index 15086be6a9b14cde1086a9d24bff95c20cdbdcea..c4337f1d5a8a05d0eeeeaec1ebec9e5ba29303e8 100644 (file)
@@ -674,10 +674,10 @@ class tc
                                        $family_name = $this->db2->f('name') . " Family";
                                        $family_id = $this->db2->f('tc_family');
                                        $sandbox_table_data .= "<tr>";
-                                       $sandbox_table_data .= "<td align=\"Left\">$family_name</td>";
+                                       $sandbox_table_data .= "<td align=\"Left\" width=\"1000\">$family_name</td>";
                                        
                                        # get 12 months visit data for given family
-                                       for($m=12; $m >= 0; $m--) {
+                                       for($m=$this->sandbox_stats_num_months; $m >= 0; $m--) {
                                                $month = $this->current_month - $m;
                                                $year = $this->current_year;
                                                if($month <= 0) { $remainder = $month; $month = 12 + $remainder; $year=$year-1; }
index 7b959ae1d8ec139f1a013ab2d2e20be1737ebee2..2c45522df6e4cce99f15c3686bad1d5569e7f128 100644 (file)
@@ -77,4 +77,6 @@ $this->default_vis_num_years = 1;
 // The maximum number of districts you will ever need to create
 $this->max_num_districts = 4;
 
+// The number of months of home teaching stats to show in the hometeaching sandbox
+$this->sandbox_stats_num_months = 12;
 ?>