Fixed user edit to hide projects for client roles.
[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           <td>{if $timesheet.approval_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
44   {/if}
45           <td><a href="timesheet_view.php?id={$timesheet.id}">{$i18n.label.view}</a></td>
46   {if !$user->isClient()}
47           <td><a href="timesheet_edit.php?id={$timesheet.id}">{$i18n.label.edit}</a></td>
48   {/if}
49         </tr>
50         {/foreach}
51       </table>
52   {if !$user->isClient()}
53       <table width="100%">
54         <tr><td align="center"><br><form><input type="button" onclick="chLocation('reports.php');" value="{$i18n.button.add}"></form></td></tr>
55       </table>
56   {/if}
57
58 {if $inactive_timesheets}
59       <table cellspacing="1" cellpadding="3" border="0" width="100%">
60
61         <tr><td class="sectionHeaderNoBorder">{$i18n.form.timesheets.inactive_timesheets}</td></tr>
62         <tr>
63           <td class="tableHeader">{$i18n.label.thing_name}</td>
64   {if $show_client}
65           <td class="tableHeader">{$i18n.label.client}</td>
66   {/if}
67   {if $show_submit_status}
68           <td class="tableHeader">{$i18n.label.submitted}</td>
69   {/if}
70   {if $show_approval_status}
71           <td class="tableHeader">{$i18n.label.approved}</td>
72   {/if}
73           <td class="tableHeader">{$i18n.label.view}</td>
74           <td class="tableHeader">{$i18n.label.edit}</td>
75         </tr>
76         {foreach $inactive_timesheets as $timesheet}
77         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
78           <td>{$timesheet.name|escape}</td>
79   {if $show_client}
80           <td>{$timesheet.client_name|escape}</td>
81   {/if}
82   {if $show_submit_status}
83           <td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
84   {/if}
85   {if $show_approval_status}
86           <td>{if $timesheet.approval_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
87   {/if}
88           <td><a href="timesheet_view.php?id={$timesheet.id}">{$i18n.label.view}</a></td>
89   {if !$user->isClient()}
90           <td><a href="timesheet_edit.php?id={$timesheet.id}">{$i18n.label.edit}</a></td>
91   {/if}
92         </tr>
93         {/foreach}
94       </table>
95   {if !$user->isClient()}
96       <table width="100%">
97         <tr><td align="center"><br><form><input type="button" onclick="chLocation('reports.php');" value="{$i18n.button.add}"></form></td></tr>
98       </table>
99   {/if}
100 {/if}
101     </td>
102   </tr>
103 </table>
104 {$forms.timesheetsForm.close}