Added inactive timesheets to timesheets.php display.
[timetracker.git] / WEB-INF / templates / timesheets.tpl
1 <script>
2   function chLocation(newLocation) { document.location = newLocation; }
3 </script>
4
5 {$forms.timesheetsForm.open}
6 <table cellspacing="0" cellpadding="7" border="0" width="720">
7   <tr><td align="left">{$i18n.form.timesheets.hint}<br></td></tr>
8 {if $user_dropdown}
9   <tr><td align="center">{$i18n.label.user}: {$forms.timesheetsForm.user.control}</td></tr>
10 {/if}
11   <tr>
12     <td valign="top">
13       <table cellspacing="1" cellpadding="3" border="0" width="100%">
14   {if $inactive_timesheets}
15         <tr><td class="sectionHeaderNoBorder">{$i18n.form.timesheets.active_timesheets}</td></tr>
16   {/if}
17         <tr>
18           <td class="tableHeader">{$i18n.label.thing_name}</td>
19   {if $show_client}
20           <td class="tableHeader">{$i18n.label.client}</td>
21   {/if}
22   {if $show_submit_status}
23           <td class="tableHeader">{$i18n.label.submitted}</td>
24   {/if}
25   {if $show_approval_status}
26           <td class="tableHeader">{$i18n.label.approved}</td>
27   {/if}
28           <td class="tableHeader">{$i18n.label.view}</td>
29           <td class="tableHeader">{$i18n.label.edit}</td>
30           <td class="tableHeader">{$i18n.label.delete}</td>
31         </tr>
32         {foreach $active_timesheets as $timesheet}
33         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
34           <td>{$timesheet.name|escape}</td>
35   {if $show_client}
36           <td>{$timesheet.client_name|escape}</td>
37   {/if}
38   {if $show_submit_status}
39           <td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
40   {/if}
41   {if $show_approval_status}
42           <td>{if $timesheet.approval_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
43   {/if}
44           <td><a href="timesheet_view.php?id={$timesheet.id}">{$i18n.label.view}</a></td>
45   {if !$user->isClient()}
46           <td><a href="timesheet_edit.php?id={$timesheet.id}">{$i18n.label.edit}</a></td>
47           <td><a href="timesheet_delete.php?id={$timesheet.id}">{$i18n.label.delete}</a></td>
48   {/if}
49         </tr>
50         {/foreach}
51       </table>
52   {if !$user->isClient()}
53       <table width="100%">
54         <tr><td align="center"><br><form><input type="button" onclick="chLocation('reports.php');" value="{$i18n.button.add}"></form></td></tr>
55       </table>
56   {/if}
57
58 {if $inactive_timesheets}
59       <table cellspacing="1" cellpadding="3" border="0" width="100%">
60
61         <tr><td class="sectionHeaderNoBorder">{$i18n.form.timesheets.inactive_timesheets}</td></tr>
62         <tr>
63           <td class="tableHeader">{$i18n.label.thing_name}</td>
64   {if $show_client}
65           <td class="tableHeader">{$i18n.label.client}</td>
66   {/if}
67   {if $show_submit_status}
68           <td class="tableHeader">{$i18n.label.submitted}</td>
69   {/if}
70   {if $show_approval_status}
71           <td class="tableHeader">{$i18n.label.approved}</td>
72   {/if}
73           <td class="tableHeader">{$i18n.label.view}</td>
74           <td class="tableHeader">{$i18n.label.edit}</td>
75           <td class="tableHeader">{$i18n.label.delete}</td>
76         </tr>
77         {foreach $inactive_timesheets as $timesheet}
78         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
79           <td>{$timesheet.name|escape}</td>
80   {if $show_client}
81           <td>{$timesheet.client_name|escape}</td>
82   {/if}
83   {if $show_submit_status}
84           <td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
85   {/if}
86   {if $show_approval_status}
87           <td>{if $timesheet.approval_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
88   {/if}
89           <td><a href="timesheet_view.php?id={$timesheet.id}">{$i18n.label.view}</a></td>
90   {if !$user->isClient()}
91           <td><a href="timesheet_edit.php?id={$timesheet.id}">{$i18n.label.edit}</a></td>
92           <td><a href="timesheet_delete.php?id={$timesheet.id}">{$i18n.label.delete}</a></td>
93   {/if}
94         </tr>
95         {/foreach}
96       </table>
97   {if !$user->isClient()}
98       <table width="100%">
99         <tr><td align="center"><br><form><input type="button" onclick="chLocation('reports.php');" value="{$i18n.button.add}"></form></td></tr>
100       </table>
101   {/if}
102 {/if}
103     </td>
104   </tr>
105 </table>
106 {$forms.timesheetsForm.close}