From 8abd1050612bcab4549875f12fdc1a036a9ce233 Mon Sep 17 00:00:00 2001
From: Owen Leonard <owen@balawis.leonard.fam>
Date: Thu, 21 Oct 2010 11:27:12 -0600
Subject: [PATCH] fix width of companionshp tables so visit stats are aligned
 make number of months stats configurable

---
 inc/class.tc.inc.php | 4 ++--
 setup/tc_config      | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/inc/class.tc.inc.php b/inc/class.tc.inc.php
index 15086be..c4337f1 100644
--- a/inc/class.tc.inc.php
+++ b/inc/class.tc.inc.php
@@ -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; }
diff --git a/setup/tc_config b/setup/tc_config
index 7b959ae..2c45522 100644
--- a/setup/tc_config
+++ b/setup/tc_config
@@ -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;
 ?>
-- 
2.34.1