fd26588d78b8650ab568f323724242f4b21ea1c6
[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 {if $user_dropdown}
8   <tr><td align="center">{$i18n.label.user}: {$forms.timesheetsForm.user.control}</td></tr>
9 {/if}
10   <tr>
11     <td valign="top">
12       <table cellspacing="1" cellpadding="3" border="0" width="100%">
13 {if $inactive_timesheets}
14         <tr><td class="sectionHeaderNoBorder">{$i18n.form.timesheets.active_timesheets}</td></tr>
15 {/if}
16         <tr>
17           <td class="tableHeader">{$i18n.label.thing_name}</td>
18 {if $show_client}
19           <td class="tableHeader">{$i18n.label.client}</td>
20 {/if}
21           <td class="tableHeader">{$i18n.label.submitted}</td>
22           <td class="tableHeader">{$i18n.label.approved}</td>
23           <td></td>
24           <td></td>
25         </tr>
26 {foreach $active_timesheets as $timesheet}
27         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
28           <td><a href="timesheet_view.php?id={$timesheet.id}">{$timesheet.name|escape}</a></td>
29   {if $show_client}
30           <td>{$timesheet.client_name|escape}</td>
31   {/if}
32           <td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
33   {if $timesheet.approve_status == null}
34           <td></td>
35   {else}
36           <td>{if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
37   {/if}
38           <td><a href="timesheet_edit.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.edit}" src="images/icon_edit.png"></a></td>
39           <td><a href="timesheet_delete.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.delete}" src="images/icon_delete.png"></a></td>
40         </tr>
41 {/foreach}
42       </table>
43
44       <table width="100%">
45         <tr><td align="center"><br><form><input type="button" onclick="chLocation('timesheet_add.php');" value="{$i18n.button.add}"></form></td></tr>
46       </table>
47
48 {if $inactive_timesheets}
49       <table cellspacing="1" cellpadding="3" border="0" width="100%">
50
51         <tr><td class="sectionHeaderNoBorder">{$i18n.form.timesheets.inactive_timesheets}</td></tr>
52         <tr>
53           <td class="tableHeader">{$i18n.label.thing_name}</td>
54   {if $show_client}
55           <td class="tableHeader">{$i18n.label.client}</td>
56   {/if}
57           <td class="tableHeader">{$i18n.label.submitted}</td>
58           <td class="tableHeader">{$i18n.label.approved}</td>
59           <td class="tableHeader">{$i18n.label.view}</td>
60           <td></td>
61           <td></td>
62         </tr>
63   {foreach $inactive_timesheets as $timesheet}
64         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
65           <td>{$timesheet.name|escape}</td>
66     {if $show_client}
67           <td>{$timesheet.client_name|escape}</td>
68     {/if}
69           <td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
70     {if $timesheet.approve_status == null}
71           <td></td>
72     {else}
73           <td>{if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
74     {/if}
75           <td><a href="timesheet_view.php?id={$timesheet.id}">{$i18n.label.view}</a></td>
76           <td><a href="timesheet_edit.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.edit}" src="images/icon_edit.png"></a></td>
77           <td><a href="timesheet_delete.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.delete}" src="images/icon_delete.png"></a></td>
78         </tr>
79   {/foreach}
80       </table>
81
82       <table width="100%">
83         <tr><td align="center"><br><form><input type="button" onclick="chLocation('reports.php');" value="{$i18n.button.add}"></form></td></tr>
84       </table>
85 {/if}
86     </td>
87   </tr>
88 </table>
89 {$forms.timesheetsForm.close}