Adjusted charts.php for subgroups.
[timetracker.git] / WEB-INF / templates / invoices.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>
11           <td class="tableHeader">{$i18n.label.invoice}</td>
12           <td class="tableHeader">{$i18n.label.client}</td>
13           <td class="tableHeader">{$i18n.label.date}</td>
14   {if $user->isPluginEnabled('ps')}
15           <td class="tableHeader">{$i18n.label.paid}</td>
16   {/if}
17           <td class="tableHeader">{$i18n.label.view}</td>
18   {if !$user->isClient()}
19           <td class="tableHeader">{$i18n.label.delete}</td>
20   {/if}
21         </tr>
22         {foreach $invoices as $invoice}
23         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
24           <td>{$invoice.name|escape}</td>
25           <td>{$invoice.client_name|escape}</td>
26           <td>{$invoice.date}</td>
27   {if $user->isPluginEnabled('ps')}
28           <td>{if $invoice.paid}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
29   {/if}
30           <td><a href="invoice_view.php?id={$invoice.id}">{$i18n.label.view}</a></td>
31   {if !$user->isClient()}
32           <td><a href="invoice_delete.php?id={$invoice.id}">{$i18n.label.delete}</a></td>
33   {/if}
34         </tr>
35         {/foreach}
36       </table>
37
38   {if !$user->isClient()}
39       <table width="100%">
40         <tr><td align="center"><br><form><input type="button" onclick="chLocation('invoice_add.php');" value="{$i18n.button.add}"></form></td></tr>
41       </table>
42   {/if}
43 {/if}
44     </td>
45   </tr>
46 </table>