Moved Delete to timesheet_edit.php to have room for paid status column.
[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         </tr>
31         {foreach $active_timesheets as $timesheet}
32         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
33           <td>{$timesheet.name|escape}</td>
34   {if $show_client}
35           <td>{$timesheet.client_name|escape}</td>
36   {/if}
37   {if $show_submit_status}
38           <td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
39   {/if}
40   {if $show_approval_status}
41           <td>{if $timesheet.approval_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
42   {/if}
43           <td><a href="timesheet_view.php?id={$timesheet.id}">{$i18n.label.view}</a></td>
44   {if !$user->isClient()}
45           <td><a href="timesheet_edit.php?id={$timesheet.id}">{$i18n.label.edit}</a></td>
46   {/if}
47         </tr>
48         {/foreach}
49       </table>
50   {if !$user->isClient()}
51       <table width="100%">
52         <tr><td align="center"><br><form><input type="button" onclick="chLocation('reports.php');" value="{$i18n.button.add}"></form></td></tr>
53       </table>
54   {/if}
55
56 {if $inactive_timesheets}
57       <table cellspacing="1" cellpadding="3" border="0" width="100%">
58
59         <tr><td class="sectionHeaderNoBorder">{$i18n.form.timesheets.inactive_timesheets}</td></tr>
60         <tr>
61           <td class="tableHeader">{$i18n.label.thing_name}</td>
62   {if $show_client}
63           <td class="tableHeader">{$i18n.label.client}</td>
64   {/if}
65   {if $show_submit_status}
66           <td class="tableHeader">{$i18n.label.submitted}</td>
67   {/if}
68   {if $show_approval_status}
69           <td class="tableHeader">{$i18n.label.approved}</td>
70   {/if}
71           <td class="tableHeader">{$i18n.label.view}</td>
72           <td class="tableHeader">{$i18n.label.edit}</td>
73         </tr>
74         {foreach $inactive_timesheets as $timesheet}
75         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
76           <td>{$timesheet.name|escape}</td>
77   {if $show_client}
78           <td>{$timesheet.client_name|escape}</td>
79   {/if}
80   {if $show_submit_status}
81           <td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
82   {/if}
83   {if $show_approval_status}
84           <td>{if $timesheet.approval_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
85   {/if}
86           <td><a href="timesheet_view.php?id={$timesheet.id}">{$i18n.label.view}</a></td>
87   {if !$user->isClient()}
88           <td><a href="timesheet_edit.php?id={$timesheet.id}">{$i18n.label.edit}</a></td>
89   {/if}
90         </tr>
91         {/foreach}
92       </table>
93   {if !$user->isClient()}
94       <table width="100%">
95         <tr><td align="center"><br><form><input type="button" onclick="chLocation('reports.php');" value="{$i18n.button.add}"></form></td></tr>
96       </table>
97   {/if}
98 {/if}
99     </td>
100   </tr>
101 </table>
102 {$forms.timesheetsForm.close}