0ba8fd7cfe2935dd71cd4c92851c2669cb1aaef6
[timetracker.git] / WEB-INF / templates / timesheets.tpl
1 <script>
2   function chLocation(newLocation) { document.location = newLocation; }
3 </script>
4
5 <table cellspacing="0" cellpadding="7" border="0" width="720">
6   <tr>
7     <td valign="top">
8       <table cellspacing="1" cellpadding="3" border="0" width="100%">
9         <tr><td colspan="2">{$i18n.form.timesheets.hint}<br></td></tr>
10         <tr><td>&nbsp;</td></tr>
11   {if $inactive_timesheets}
12         <tr><td class="sectionHeaderNoBorder">{$i18n.form.timesheets.active_timesheets}</td></tr>
13   {/if}
14         <tr>
15           <td class="tableHeader">{$i18n.label.thing_name}</td>
16   {if $show_client}
17           <td class="tableHeader">{$i18n.label.client}</td>
18   {/if}
19   {if $show_submit_status}
20           <td class="tableHeader">{$i18n.label.submitted}</td>
21   {/if}
22   {if $show_approval_status}
23           <td class="tableHeader">{$i18n.label.approved}</td>
24   {/if}
25           <td class="tableHeader">{$i18n.label.view}</td>
26           <td class="tableHeader">{$i18n.label.edit}</td>
27           <td class="tableHeader">{$i18n.label.delete}</td>
28         </tr>
29         {foreach $active_timesheets as $timesheet}
30         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
31           <td>{$timesheet.name|escape}</td>
32   {if $show_client}
33           <td>{$timesheet.client_name|escape}</td>
34   {/if}
35   {if $show_submit_status}
36           <td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
37   {/if}
38   {if $show_approval_status}
39           <td>{if $timesheet.approval_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
40   {/if}
41
42
43
44           <td><a href="timesheet_view.php?id={$timesheet.id}">{$i18n.label.view}</a></td>
45   {if !$user->isClient()}
46           <td><a href="timesheet_edit.php?id={$timesheet.id}">{$i18n.label.edit}</a></td>
47           <td><a href="timesheet_delete.php?id={$timesheet.id}">{$i18n.label.delete}</a></td>
48   {/if}
49         </tr>
50         {/foreach}
51       </table>
52
53   {if !$user->isClient()}
54       <table width="100%">
55         <tr><td align="center"><br><form><input type="button" onclick="chLocation('reports.php');" value="{$i18n.button.add}"></form></td></tr>
56       </table>
57   {/if}
58     </td>
59   </tr>
60 </table>