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