posaune
[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 {if $show_files}
24           <td></td>
25 {/if}
26           <td></td>
27           <td></td>
28         </tr>
29 {foreach $active_timesheets as $timesheet}
30         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
31           <td><a href="timesheet_view.php?id={$timesheet.id}">{$timesheet.name|escape}</a></td>
32   {if $show_client}
33           <td>{$timesheet.client_name|escape}</td>
34   {/if}
35           <td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
36   {if $timesheet.approve_status == null}
37           <td></td>
38   {else}
39           <td>{if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
40   {/if}
41   {if $show_files}
42         {if $timesheet.has_files}
43           <td><a href="timesheet_files.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_files.png"></a></td>
44         {else}
45           <td><a href="timesheet_files.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_file.png"></a></td>
46         {/if}
47   {/if}
48           <td><a href="timesheet_edit.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.edit}" src="images/icon_edit.png"></a></td>
49           <td><a href="timesheet_delete.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.delete}" src="images/icon_delete.png"></a></td>
50         </tr>
51 {/foreach}
52       </table>
53
54       <table width="100%">
55         <tr><td align="center"><br><form><input type="button" onclick="chLocation('timesheet_add.php');" value="{$i18n.button.add}"></form></td></tr>
56       </table>
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           <td class="tableHeader">{$i18n.label.submitted}</td>
68           <td class="tableHeader">{$i18n.label.approved}</td>
69   {if $show_files}
70           <td></td>
71   {/if}
72           <td></td>
73           <td></td>
74         </tr>
75   {foreach $inactive_timesheets as $timesheet}
76         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
77             <td><a href="timesheet_view.php?id={$timesheet.id}">{$timesheet.name|escape}</a></td>
78     {if $show_client}
79           <td>{$timesheet.client_name|escape}</td>
80     {/if}
81           <td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
82     {if $timesheet.approve_status == null}
83           <td></td>
84     {else}
85           <td>{if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
86     {/if}
87     {if $show_files}
88       {if $timesheet.has_files}
89           <td><a href="timesheet_files.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_files.png"></a></td>
90       {else}
91           <td><a href="timesheet_files.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_file.png"></a></td>
92       {/if}
93     {/if}
94           <td><a href="timesheet_edit.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.edit}" src="images/icon_edit.png"></a></td>
95           <td><a href="timesheet_delete.php?id={$timesheet.id}"><img class="table_icon" alt="{$i18n.label.delete}" src="images/icon_delete.png"></a></td>
96         </tr>
97   {/foreach}
98       </table>
99
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     </td>
105   </tr>
106 </table>
107 {$forms.timesheetsForm.close}