A bit more work in progress on timesheets.
[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 {if $user->can('manage_invoices') || $user->can('view_own_invoices')}
9       <table cellspacing="1" cellpadding="3" border="0" width="100%">
10         <tr><td colspan="2">{$i18n.form.timesheets.hint}<br></td></tr>
11         <tr>
12           <td class="tableHeader">{$i18n.label.invoice}</td>
13           <td class="tableHeader">{$i18n.label.client}</td>
14           <td class="tableHeader">{$i18n.label.date}</td>
15   {if $user->isPluginEnabled('ps')}
16           <td class="tableHeader">{$i18n.label.paid}</td>
17   {/if}
18           <td class="tableHeader">{$i18n.label.view}</td>
19   {if !$user->isClient()}
20           <td class="tableHeader">{$i18n.label.delete}</td>
21   {/if}
22         </tr>
23         {foreach $invoices as $invoice}
24         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
25           <td>{$invoice.name|escape}</td>
26           <td>{$invoice.client_name|escape}</td>
27           <td>{$invoice.date}</td>
28   {if $user->isPluginEnabled('ps')}
29           <td>{if $invoice.paid}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
30   {/if}
31           <td><a href="invoice_view.php?id={$invoice.id}">{$i18n.label.view}</a></td>
32   {if !$user->isClient()}
33           <td><a href="invoice_delete.php?id={$invoice.id}">{$i18n.label.delete}</a></td>
34   {/if}
35         </tr>
36         {/foreach}
37       </table>
38
39   {if !$user->isClient()}
40       <table width="100%">
41         <tr><td align="center"><br><form><input type="button" onclick="chLocation('invoice_add.php');" value="{$i18n.button.add}"></form></td></tr>
42       </table>
43   {/if}
44 {/if}
45     </td>
46   </tr>
47 </table>