set up page for ht sandbox
authorOwen Leonard <owen@balawis.leonard.fam>
Sat, 9 Oct 2010 02:39:41 +0000 (20:39 -0600)
committerOwen Leonard <owen@balawis.leonard.fam>
Sat, 9 Oct 2010 02:39:41 +0000 (20:39 -0600)
inc/class.tc.inc.php
templates/default/ht_view.tpl

index b87659f9364913279bd5d2436baae07e33630768..e7d097e0f00af61078a86ce7e6a9b54caaf8b85a 100644 (file)
@@ -68,6 +68,7 @@ class tc
                'assign_view'    => True,
                'assign_update'  => True,
                'get_time_selection_form' => True,
+               'ht_sandbox' => True,
        );
  
        function tc()
@@ -216,6 +217,9 @@ class tc
                $this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/tc/index.php','menuaction=tc.tc.ht_view'));
                $this->t->set_var('title','Hometeaching'); 
 
+               $this->t->set_var('ht_sandbox_link',$GLOBALS['phpgw']->link('/tc/index.php','menuaction=tc.tc.ht_sandbox'));
+               $this->t->set_var('ht_sandbox_link_title','Hometeaching Sandbox'); 
+
                $sql = "SELECT * FROM tc_district AS td JOIN tc_individual AS ti WHERE td.supervisor=ti.individual AND td.valid=1 ORDER BY td.district ASC";
                $this->db->query($sql,__LINE__,__FILE__);
                $i=0;
@@ -394,6 +398,23 @@ class tc
        }
       
 
+       function ht_sandbox()
+       {
+               $this->t->set_file(array('ht_sandbox_t' => 'ht_sandbox.tpl'));
+               $this->t->set_block('ht_sandbox_t','district_list','list');
+
+               $this->t->set_var('linkurl',$GLOBALS['phpgw']->link('/tc/index.php','menuaction=tc.tc.ht_sandbox'));
+
+               $this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/tc/index.php','menuaction=tc.tc.ht_sandbox'));
+               $this->t->set_var('title','Hometeaching Sandbox'); 
+
+               // content
+
+               $this->t->pfp('out','ht_sandbox_t');
+               $this->save_sessiondata();
+       }
+      
+
        function ht_update()
        {
                $this->t->set_file(array('ht_update_t' => 'ht_update.tpl'));
index 4dd8d4b8d4df1240837cab4090b611539baf48c7..5787dbba1b4d27f9631d331777bdc5a9674dc228 100644 (file)
@@ -5,7 +5,9 @@
                        <td align="center" bgcolor="#c9c9c9"><font face="{font}"><b>{title}</b></font></td>
                </tr>
        </table>
-       <br>
+
+       <a href="{ht_sandbox_link}">{ht_sandbox_link_title}</a>
+       <br><br>
 
        <form action="{linkurl}" method="POST">
        <table width="40%" border="0" cellspacing="2" cellpadding="2" align=center>