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