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