A bit of refactoring.
[timetracker.git] / WEB-INF / templates / week.tpl
index 6fc08b8..33a218a 100644 (file)
@@ -117,6 +117,9 @@ function fillDropdowns() {
   {/if}
         <td width="5%" class="tableHeader">{$i18n.label.duration}</td>
         <td class="tableHeader">{$i18n.label.note}</td>
+  {if $show_files}
+        <td></td>
+  {/if}
         <td></td>
         <td></td>
       </tr>
@@ -138,6 +141,13 @@ function fillDropdowns() {
     {/if}
         <td align="right" valign="top">{if ($record.duration == '0:00' && $record.start <> '')}<font color="#ff0000">{$i18n.form.time.uncompleted}</font>{else}{$record.duration}{/if}</td>
         <td valign="top">{if $record.comment}{$record.comment|escape}{else}&nbsp;{/if}</td>
+    {if $show_files}
+      {if $record.has_files}
+        <td valign="top" align="center"><a href="time_files.php?id={$record.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_files.png"></a></td>
+      {else}
+        <td valign="top" align="center"><a href="time_files.php?id={$record.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_file.png"></a></td>
+      {/if}
+    {/if}
         <td valign="top" align="center">
     {if $record.approved || $record.timesheet_id || $record.invoice_id}
           &nbsp;