Adjusted charts.php for subgroups.
[timetracker.git] / WEB-INF / templates / clients.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_clients')}
9   {if $group_dropdown}
10 {$forms.clientsForm.open} {* clientsForm consists only of one dropdown group control *}
11       <table width="100%">
12         <tr>
13           <td align="center">{$i18n.label.group}: {$forms.clientsForm.group.control}</td>
14         </tr>
15       </table>
16 {$forms.clientsForm.close}
17   {/if}
18       <table cellspacing="1" cellpadding="3" border="0" width="100%">
19   {if $inactive_clients}
20         <tr><td class="sectionHeaderNoBorder">{$i18n.form.clients.active_clients}</td></tr>
21   {/if}
22         <tr>
23           <td width="40%" class="tableHeader">{$i18n.label.person_name}</td>
24           <td width="40%" class="tableHeader">{$i18n.label.address}</td>
25           <td class="tableHeader">{$i18n.label.edit}</td>
26           <td class="tableHeader">{$i18n.label.delete}</td>
27         </tr>
28   {foreach $active_clients as $client}
29         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
30           <td>{$client.name|escape}</td>
31           <td>{$client.address|escape}</td>
32           <td><a href="client_edit.php?id={$client.id}">{$i18n.label.edit}</a></td>
33           <td><a href="client_delete.php?id={$client.id}">{$i18n.label.delete}</a></td>
34         </tr>
35   {/foreach}
36       </table>
37
38       <table width="100%">
39         <tr><td align="center"><br><form><input type="button" onclick="chLocation('client_add.php');" value="{$i18n.button.add}"></form></td></tr>
40       </table>
41
42   {if $inactive_clients}
43       <table cellspacing="1" cellpadding="3" border="0" width="100%">
44         <tr><td class="sectionHeaderNoBorder">{$i18n.form.clients.inactive_clients}</td></tr>
45         <tr>
46           <td width="40%" class="tableHeader">{$i18n.label.person_name}</td>
47           <td width="40%" class="tableHeader">{$i18n.label.address}</td>
48           <td class="tableHeader">{$i18n.label.edit}</td>
49           <td class="tableHeader">{$i18n.label.delete}</td>
50         </tr>
51     {foreach $inactive_clients as $client}
52         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
53           <td>{$client.name|escape}</td>
54           <td>{$client.address|escape}</td>
55           <td><a href="client_edit.php?id={$client.id}">{$i18n.label.edit}</a></td>
56           <td><a href="client_delete.php?id={$client.id}">{$i18n.label.delete}</a></td>
57         </tr>
58     {/foreach}
59       </table>
60
61       <table width="100%">
62         <tr><td align="center"><br><form><input type="button" onclick="chLocation('client_add.php');" value="{$i18n.button.add}"></form></td></tr>
63       </table>
64   {/if}
65 {else}
66       <table cellspacing="1" cellpadding="3" border="0" width="100%">
67         <tr>
68           <td class="tableHeader">{$i18n.label.thing_name}</td>
69           <td class="tableHeader">{$i18n.label.address}</td>
70         </tr>
71   {if $active_clients}
72     {foreach $active_clients as $client}
73         <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
74           <td>{$client.name|escape}</td>
75           <td>{$client.address|escape}</td>
76         </tr>
77     {/foreach}
78   {/if}
79       </table>
80 {/if}
81     </td>
82   </tr>
83 </table>