expands mobile page access (#9)
[timetracker.git] / WEB-INF / templates / mobile / clients.tpl
1 <script>
2   function chLocation(newLocation) { document.location = newLocation; }
3 </script>
4
5 <table class="mobile-table">
6   <tr>
7     <td valign="top">
8 {if ($user->canManageTeam())}
9       <table class="mobile-table-details">
10   {if $inactive_clients}
11         <tr><td class="sectionHeaderNoBorder">{$i18n.form.clients.active_clients}</td></tr>
12   {/if}
13         <tr>
14           <td width="40%" class="tableHeader">{$i18n.label.person_name}</td>
15           <td width="40%" class="tableHeader">{$i18n.label.address}</td>
16           <td class="tableHeader">{$i18n.label.edit}</td>
17         </tr>
18   {foreach $active_clients as $client}
19         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#dedee5"}">
20           <td>{$client.name|escape:'html'}</td>
21           <td>{$client.address|escape:'html'}</td>
22           <td><a href="client_edit.php?id={$client.id}">{$i18n.label.edit}</a></td>
23         </tr>
24   {/foreach}
25       </table>
26
27       <table width="100%">
28         <tr><td align="center"><br><form><input type="button" onclick="chLocation('client_add.php');" value="{$i18n.button.add_client}"></form></td></tr>
29       </table>
30
31   {if $inactive_clients}
32       <table cellspacing="1" cellpadding="3" border="0" width="100%">
33         <tr><td class="sectionHeaderNoBorder">{$i18n.form.clients.inactive_clients}</td></tr>
34         <tr>
35           <td width="40%" class="tableHeader">{$i18n.label.person_name}</td>
36           <td width="40%" class="tableHeader">{$i18n.label.address}</td>
37           <td class="tableHeader">{$i18n.label.edit}</td>
38         </tr>
39     {foreach $inactive_clients as $client}
40         <tr valign="top" bgcolor="{cycle values="#f5f5f5,#dedee5"}">
41           <td>{$client.name|escape:'html'}</td>
42           <td>{$client.address|escape:'html'}</td>
43           <td><a href="client_edit.php?id={$client.id}">{$i18n.label.edit}</a></td>
44         </tr>
45     {/foreach}
46       </table>
47
48       <table width="100%">
49         <tr><td align="center"><br><form><input type="button" onclick="chLocation('client_add.php');" value="{$i18n.button.add_client}"></form></td></tr>
50       </table>
51   {/if}
52 {/if}
53     </td>
54   </tr>
55 </table>