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