Initial release of attachment plugin for projects.
[timetracker.git] / WEB-INF / templates / clients.tpl
index 7e0b197..a31a8cd 100644 (file)
@@ -5,7 +5,7 @@
 <table cellspacing="0" cellpadding="7" border="0" width="720">
   <tr>
     <td valign="top">
-{if ($user->canManageTeam())}
+{if $user->can('manage_clients')}
       <table cellspacing="1" cellpadding="3" border="0" width="100%">
   {if $inactive_clients}
         <tr><td class="sectionHeaderNoBorder">{$i18n.form.clients.active_clients}</td></tr>
@@ -27,7 +27,7 @@
       </table>
 
       <table width="100%">
-        <tr><td align="center"><br><form><input type="button" onclick="chLocation('client_add.php');" value="{$i18n.button.add_client}"></form></td></tr>
+        <tr><td align="center"><br><form><input type="button" onclick="chLocation('client_add.php');" value="{$i18n.button.add}"></form></td></tr>
       </table>
 
   {if $inactive_clients}
       </table>
 
       <table width="100%">
-        <tr><td align="center"><br><form><input type="button" onclick="chLocation('client_add.php');" value="{$i18n.button.add_client}"></form></td></tr>
+        <tr><td align="center"><br><form><input type="button" onclick="chLocation('client_add.php');" value="{$i18n.button.add}"></form></td></tr>
       </table>
   {/if}
+{else}
+      <table cellspacing="1" cellpadding="3" border="0" width="100%">
+        <tr>
+          <td class="tableHeader">{$i18n.label.thing_name}</td>
+          <td class="tableHeader">{$i18n.label.address}</td>
+        </tr>
+  {if $active_clients}
+    {foreach $active_clients as $client}
+        <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
+          <td>{$client.name|escape}</td>
+          <td>{$client.address|escape}</td>
+        </tr>
+    {/foreach}
+  {/if}
+      </table>
 {/if}
     </td>
   </tr>