expands mobile page access (#9)
[timetracker.git] / WEB-INF / templates / mobile / projects.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_projects}
11         <tr><td class="sectionHeaderNoBorder">{$i18n.form.projects.active_projects}</td></tr>
12   {/if}
13         <tr>
14           <td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
15           <td width="35%" class="tableHeader">{$i18n.label.description}</td>
16           <td class="tableHeader">{$i18n.label.edit}</td>
17         </tr>
18   {if $active_projects}
19     {foreach $active_projects as $project}
20         <tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
21           <td>{$project.name|escape:'html'}</td>
22           <td>{$project.description|escape:'html'}</td>
23           <td><a href="project_edit.php?id={$project.id}">{$i18n.label.edit}</a></td>
24         </tr>
25     {/foreach}
26   {/if}
27       </table>
28
29       <table width="100%">
30         <tr>
31           <td align="center"><br>
32             <form><input type="button" onclick="chLocation('project_add.php');" value="{$i18n.button.add_project}"></form>
33           </td>
34         </tr>
35       </table>
36
37   {if $inactive_projects}
38       <table cellspacing="1" cellpadding="3" border="0" width="100%">
39         <tr><td class="sectionHeaderNoBorder">{$i18n.form.projects.inactive_projects}</td></tr>
40         <tr>
41           <td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
42           <td width="35%" class="tableHeader">{$i18n.label.description}</td>
43           <td class="tableHeader">{$i18n.label.edit}</td>
44         </tr>
45     {foreach $inactive_projects as $project}
46         <tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
47           <td>{$project.name|escape:'html'}</td>
48           <td>{$project.description|escape:'html'}</td>
49           <td><a href="project_edit.php?id={$project.id}">{$i18n.label.edit}</a></td>
50         </tr>
51     {/foreach}
52       </table>
53
54       <table width="100%">
55         <tr>
56           <td align="center"><br>
57             <form><input type="button" onclick="chLocation('project_add.php');" value="{$i18n.button.add_project}"></form>
58           </td>
59         </tr>
60       </table>
61   {/if}
62 {else}
63       <table cellspacing="1" cellpadding="3" border="0" width="100%">
64         <tr>
65           <td class="tableHeader">{$i18n.label.thing_name}</td>
66           <td class="tableHeader">{$i18n.label.description}</td>
67         </tr>
68   {if $active_projects}
69     {foreach $active_projects as $project}
70         <tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
71           <td>{$project.name|escape:'html'}</td>
72           <td>{$project.description|escape:'html'}</td>
73         </tr>
74     {/foreach}
75   {/if}
76       </table>
77 {/if}
78     </td>
79   </tr>
80 </table>