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