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