e21a8f223854c91a38650eca4e0119e7fa91b952
[timetracker.git] / WEB-INF / templates / projects.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_projects')}
9       <table cellspacing="1" cellpadding="3" border="0" width="100%">
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   {if $show_files}
17           <td></td>
18   {/if}
19           <td></td>
20           <td></td>
21         </tr>
22   {if $active_projects}
23     {foreach $active_projects as $project}
24         <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
25           <td>{$project.name|escape}</td>
26           <td>{$project.description|escape}</td>
27       {if $show_files}
28         {if $project.has_files}
29           <td><a href="project_files.php?id={$project.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_files.png"></a></td>
30         {else}
31           <td><a href="project_files.php?id={$project.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_file.png"></a></td>
32         {/if}
33       {/if}
34           <td><a href="project_edit.php?id={$project.id}"><img class="table_icon" alt="{$i18n.label.edit}" src="images/icon_edit.png"></a></td>
35           <td><a href="project_delete.php?id={$project.id}"><img class="table_icon" alt="{$i18n.label.delete}" src="images/icon_delete.png"></a></td>
36         </tr>
37     {/foreach}
38   {/if}
39       </table>
40
41       <table width="100%">
42         <tr>
43           <td align="center"><br>
44             <form><input type="button" onclick="chLocation('project_add.php');" value="{$i18n.button.add}"></form>
45           </td>
46         </tr>
47       </table>
48
49   {if $inactive_projects}
50       <table cellspacing="1" cellpadding="3" border="0" width="100%">
51         <tr><td class="sectionHeaderNoBorder">{$i18n.form.projects.inactive_projects}</td></tr>
52         <tr>
53           <td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
54           <td width="35%" class="tableHeader">{$i18n.label.description}</td>
55     {if $show_files}
56           <td></td>
57     {/if}
58           <td></td>
59           <td></td>
60         </tr>
61     {foreach $inactive_projects as $project}
62         <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
63           <td>{$project.name|escape}</td>
64           <td>{$project.description|escape}</td>
65       {if $show_files}
66         {if $project.has_files}
67           <td><a href="project_files.php?id={$project.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_files.png"></a></td>
68         {else}
69           <td><a href="project_files.php?id={$project.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_file.png"></a></td>
70         {/if}
71       {/if}
72           <td><a href="project_edit.php?id={$project.id}"><img class="table_icon" alt="{$i18n.label.edit}" src="images/icon_edit.png"></a></td>
73           <td><a href="project_delete.php?id={$project.id}"><img class="table_icon" alt="{$i18n.label.delete}" src="images/icon_delete.png"></a></td>
74         </tr>
75     {/foreach}
76       </table>
77
78       <table width="100%">
79         <tr>
80           <td align="center"><br>
81             <form><input type="button" onclick="chLocation('project_add.php');" value="{$i18n.button.add}"></form>
82           </td>
83         </tr>
84       </table>
85   {/if}
86 {else}
87       <table cellspacing="1" cellpadding="3" border="0" width="100%">
88         <tr>
89           <td class="tableHeader">{$i18n.label.thing_name}</td>
90           <td class="tableHeader">{$i18n.label.description}</td>
91     {if $show_files}
92           <td></td>
93     {/if}
94         </tr>
95   {if $active_projects}
96     {foreach $active_projects as $project}
97         <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
98           <td>{$project.name|escape}</td>
99           <td>{$project.description|escape}</td>
100       {if $show_files}
101           <td><a href="project_files.php?id={$project.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_files.png"></a></td>
102       {/if}
103         </tr>
104     {/foreach}
105   {/if}
106       </table>
107 {/if}
108     </td>
109   </tr>
110 </table>