Fixed table titles and removed table widths for appt sched tables
authorAlan Pippin <apippin@pippins.net>
Mon, 11 Oct 2010 18:47:13 +0000 (12:47 -0600)
committerAlan J. Pippin <ajp@pippins.net>
Mon, 11 Oct 2010 18:47:13 +0000 (12:47 -0600)
inc/class.tc.inc.php
templates/default/ppi_sched.tpl

index 7f2700edac40282d17acb9c66432d995ac87c036..7191469bbb3dc4c707684d91b59733b683d681e1 100644 (file)
@@ -1351,7 +1351,7 @@ class tc
                $this->t->set_file(array('ppi_sched_t' => 'ppi_sched.tpl'));
                $this->t->set_block('ppi_sched_t','individual_list','indivlist');
                $this->t->set_block('ppi_sched_t','appt_list','apptlist');
-           $action = get_var('action',array('GET','POST'));
+               $action = get_var('action',array('GET','POST'));
 
                $this->t->set_var('lang_save','Save Appt / Pri / Notes');
                $this->t->set_var('lang_reset','Clear Changes');
@@ -1365,13 +1365,11 @@ class tc
                $this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/tc/index.php','menuaction=tc.tc.ppi_sched&action=save'));
                $this->t->set_var('title',$this->ppi_frequency_label . ' PPI Scheduler');
 
-               $indiv_width=500; $phone_width=25; $pri_width=10; $notes_width=128; $ppi_date_width=20;
-               $table_width=$indiv_width + $phone_width + $pri_width + $notes_width + $ppi_date_width;
-               $header_row = "<th width=$indiv_width><font size=-2>individual Name</th>";
-               $header_row.= "<th width=$phone_width><font size=-2>Phone</th>";
-               $header_row.= "<th width=$pri_width><font size=-2>Priority</th>";
-               $header_row.= "<th width=$ppi_date_width><font size=-2>Last PPI</th>";
-               $header_row.= "<th width=$notes_width><font size=-2>Scheduling Notes</th>";
+               $header_row = "<th ><font size=-2>Individual Name</th>";
+               $header_row.= "<th><font size=-2>Phone</th>";
+               $header_row.= "<th><font size=-2>Priority</th>";
+               $header_row.= "<th><font size=-2>Last PPI</th>";
+               $header_row.= "<th><font size=-2>Scheduling Notes</th>";
                $table_data=""; $completed_data=""; $totals_data="";
 
                $year = date('Y');
@@ -1442,12 +1440,10 @@ class tc
                array_multisort($indiv_name, $individual);
 
                // APPOINTMENT TABLE
-               $date_width=250; $time_width=100; $indiv_width=200; $location_width=100;
-               $appt_table_width=$date_width + $time_width + $indiv_width + $location_width;
-               $appt_header_row = "<th width=$date_width><font size=-2>Date</th>";
-               $appt_header_row.= "<th width=$time_width><font size=-2>Time</th>";      
-               $appt_header_row.= "<th width=$indiv_width><font size=-2>Individual</th>";
-               $appt_header_row.= "<th width=$location_width><font size=-2>Location</th>";
+               $appt_header_row = "<th><font size=-2>Date</th>";
+               $appt_header_row.= "<th><font size=-2>Time</th>";      
+               $appt_header_row.= "<th><font size=-2>Individual</th>";
+               $appt_header_row.= "<th><font size=-2>Location</th>";
                $appt_table_data = "";
                $table_data="";
 
@@ -1469,10 +1465,8 @@ class tc
                  $appt_table_data = "";
 
                  // Display a scheduling table for this presidency member
-                 $district_number = '*';
-                 $district_name = $presidency_name;
-                 $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";
+                 $not_completed_table_title = "All individuals with " . $this->ppi_frequency_label . " PPI Not Completed";
+                 $appt_table_title = $presidency_name . ": " . $this->ppi_frequency_label." PPI Appointment Slots";
                  $this->t->set_var('not_completed_table_title',$not_completed_table_title);
                  $this->t->set_var('appt_table_title',$appt_table_title);
 
@@ -1523,7 +1517,6 @@ class tc
                  }
                  $this->t->set_var('appt_table_data',$appt_table_data);
                  $this->t->set_var('appt_header_row',$appt_header_row);
-                 $this->t->set_var('appt_table_width',$appt_table_width);
                          $this->t->set_var('lang_save','Save Appts for ' . $presidency_name);
 
                  $this->t->fp('apptlist','appt_list',True);
@@ -1623,28 +1616,22 @@ 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>";
-               $completed_header_row.= "<th width=$phone_width><font size=-2>Phone</th>";      
-               $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>";
+               $completed_table_title = "All individuals with " . $this->ppi_frequency_label . " PPI Completed";
+               $completed_header_row = "<th><font size=-2>Individual</th>";
+               $completed_header_row.= "<th><font size=-2>Phone</th>";      
+               $completed_header_row.= "<th><font size=-2>Date</th>";
+               $completed_header_row.= "<th><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);
                $this->t->set_var('completed_header_row',$completed_header_row);
-               $this->t->set_var('completed_table_width',$completed_table_width);
                $this->t->set_var('completed',$completed_data);
                $this->t->set_var('lang_save','Save Pri / Notes'); 
                $this->t->fp('indivlist','individual_list',True); 
 
-               $indivs_width=300; $totals_width=100;
-               $totals_table_width=$indivs_width + $totals_width;
-               $totals_header_row = "<th width=$indivs_width><font size=-2>Individuals</th>";
-               $totals_header_row.= "<th width=$totals_width><font size=-2>$year</th>";
+               $totals_header_row = "<th><font size=-2>Individuals</th>";
+               $totals_header_row.= "<th><font size=-2>$year</th>";
                $totals_data.= "<tr bgcolor=". $this->t->get_var('tr_color') .">";
                $totals_data.= "<td align=left><font size=-2><b>Total Individuals with " . $this->ppi_frequency_label . " PPIs completed:</b></font></td>";
                $totals_data.= "<td align=center><font size=-2><b>$indivs_with_yearly_ppi / $total_indivs</b></font></td>";
@@ -1658,7 +1645,7 @@ class tc
 
                $this->t->set_var('totals',$totals_data);
                $this->t->set_var('totals_header_row',$totals_header_row);
-               $this->t->set_var('totals_table_width',$totals_table_width);
+               $this->t->set_var('ppi_frequency_label',$this->ppi_frequency_label);
 
                $this->t->pfp('out','ppi_sched_t');
                $this->save_sessiondata(); 
index f694d4fd89d17fd3cb5c3ac8f1cfea5cf50722ee..08d5eae54ca1ecbf7b3b2a4fea8bbb8fb9253fda 100644 (file)
@@ -1,5 +1,5 @@
 <center>
-       <table border="0" width="{table_width}" cellspacing="2" cellpadding="2">
+       <table border="0" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9"><font face="{font}"><b>{title}</b></font></td>
                </tr>
@@ -14,7 +14,7 @@
 <!-- BEGIN appt_list -->
        <form action="{actionurl}" method="POST">
                <input type=hidden name=presidency_location value={presidency_location}>
-        <table border="0" width="{appt_table_width}" cellspacing="2" cellpadding="2">
+        <table border="0" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
                                <font face="{font}"><b>{appt_table_title}</b></font>
@@ -26,7 +26,7 @@
                <td></td><td></td><td></td><td></td>
                </tr>
         </table>
-       <table border="0" width="{table_width}" cellspacing="2" cellpadding="2">
+       <table border="0" cellspacing="2" cellpadding="2">
                <tr>
                 <td height="50" align="right">
                        <font face="{font}"><input type="submit" name="save" value="{lang_save}"></font>
@@ -40,7 +40,7 @@
 <hr>
 <!-- BEGIN individual_list -->
         <form action="{actionurl}" method="POST">
-       <table border="0" width="{table_width}" cellspacing="2" cellpadding="2">
+       <table border="0" cellspacing="2" cellpadding="2">
                <tr>
                        <td colspan=5 height="50" align="right">
                                <font face="{font}"><input type="submit" name="save" value="{lang_save}"></font>
@@ -68,7 +68,7 @@
         </form>
 <!-- END individual_list -->
        <hr>
-       <table border="0" width="{completed_table_width}" cellspacing="2" cellpadding="2">
+       <table border="0" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
                        <font face="{font}"><b>{completed_table_title}</b></font>
        </table>
        <br><br>
 
-       <table border="0" width="{totals_table_width}" cellspacing="2" cellpadding="2">
+       <table border="0" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
-                       <font face="{font}"><b>Total Yearly PPIs</b></font>
+                       <font face="{font}"><b>Total {ppi_frequency_label} PPIs</b></font>
                        </td>
                </tr>
                <tr bgcolor="#c9c9c9"><font face="{font}">{totals_header_row}</tr>
 </center>
 
 
-
-
-
-
-
-
-
-
-
-