More work in progress on remote work plugin.
[timetracker.git] / WEB-INF / templates / invoices.tpl
index 1dfd43a..5960790 100644 (file)
@@ -5,25 +5,29 @@
 <table cellspacing="0" cellpadding="7" border="0" width="720">
   <tr>
     <td valign="top">
-{if $user->canManageTeam() || $user->isClient()}
+{if $user->can('manage_invoices') || $user->can('view_client_invoices')}
       <table cellspacing="1" cellpadding="3" border="0" width="100%">
         <tr>
           <td class="tableHeader">{$i18n.label.invoice}</td>
           <td class="tableHeader">{$i18n.label.client}</td>
           <td class="tableHeader">{$i18n.label.date}</td>
-          <td class="tableHeader">{$i18n.label.view}</td>
+  {if $user->isPluginEnabled('ps')}
+          <td class="tableHeader">{$i18n.label.paid}</td>
+  {/if}
   {if !$user->isClient()}
-          <td class="tableHeader">{$i18n.label.delete}</td>
+          <td></td>
   {/if}
         </tr>
         {foreach $invoices as $invoice}
         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
-          <td>{$invoice.name|escape}</td>
+          <td><a href="invoice_view.php?id={$invoice.id}">{$invoice.name|escape}</a></td>
           <td>{$invoice.client_name|escape}</td>
           <td>{$invoice.date}</td>
-          <td><a href="invoice_view.php?id={$invoice.id}">{$i18n.label.view}</a></td>
+  {if $user->isPluginEnabled('ps')}
+          <td>{if $invoice.paid}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
+  {/if}
   {if !$user->isClient()}
-          <td><a href="invoice_delete.php?id={$invoice.id}">{$i18n.label.delete}</a></td>
+          <td><a href="invoice_delete.php?id={$invoice.id}"><img class="table_icon" alt="{$i18n.label.delete}" src="images/icon_delete.png"></a></td>
   {/if}
         </tr>
         {/foreach}
@@ -31,7 +35,7 @@
 
   {if !$user->isClient()}
       <table width="100%">
-        <tr><td align="center"><br><form><input type="button" onclick="chLocation('invoice_add.php');" value="{$i18n.button.add_invoice}"></form></td></tr>
+        <tr><td align="center"><br><form><input type="button" onclick="chLocation('invoice_add.php');" value="{$i18n.button.add}"></form></td></tr>
       </table>
   {/if}
 {/if}