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