Merged to templates into one to keep things simple.
authorNik Okuntseff <support@anuko.com>
Sat, 6 Apr 2019 13:34:42 +0000 (13:34 +0000)
committerNik Okuntseff <support@anuko.com>
Sat, 6 Apr 2019 13:34:42 +0000 (13:34 +0000)
WEB-INF/templates/entity_files.tpl [new file with mode: 0644]
WEB-INF/templates/footer.tpl
WEB-INF/templates/project_files.tpl [deleted file]
WEB-INF/templates/time_files.tpl [deleted file]
project_files.php
time_files.php

diff --git a/WEB-INF/templates/entity_files.tpl b/WEB-INF/templates/entity_files.tpl
new file mode 100644 (file)
index 0000000..f373815
--- /dev/null
@@ -0,0 +1,47 @@
+<table cellspacing="0" cellpadding="7" border="0" width="720">
+  <tr>
+    <td valign="top">
+      <table cellspacing="1" cellpadding="3" border="0" width="100%">
+        <tr>
+          <td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
+          <td width="35%" class="tableHeader">{$i18n.label.description}</td>
+{if $can_edit}
+          <td class="tableHeader">{$i18n.label.edit}</td>
+          <td class="tableHeader">{$i18n.label.delete}</td>
+{/if}
+        </tr>
+{if $files}
+  {foreach $files as $file}
+        <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
+          <td><a href="file_download.php?id={$file.id}">{$file.name|escape}</a></td>
+          <td>{$file.description|escape}</td>
+    {if $can_edit}
+          <td><a href="file_edit.php?id={$file.id}">{$i18n.label.edit}</a></td>
+          <td><a href="file_delete.php?id={$file.id}">{$i18n.label.delete}</a></td>
+    {/if}
+        </tr>
+  {/foreach}
+{/if}
+      </table>
+    </td>
+  </tr>
+</table>
+
+{if $can_edit}
+{$forms.fileUploadForm.open}
+<table cellspacing="0" cellpadding="7" border="0" width="720">
+  <tr>
+    <td align="center">
+      <table border="0" width="60%">
+        <tr>
+            <td align="right">{$i18n.label.description}:</td>
+            <td>{$forms.fileUploadForm.description.control}</td>
+            <td align="left">{$forms.fileUploadForm.newfile.control}</td>
+        </tr>
+        <tr><td height="50" align="center" colspan="3">{$forms.fileUploadForm.btn_submit.control}</td></tr>
+      </table>
+    </td>
+  </tr>
+</table>
+{$forms.fileUploadForm.close}
+{/if}
index 17d7a68..adf3c05 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.63.4910 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.63.4911 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
diff --git a/WEB-INF/templates/project_files.tpl b/WEB-INF/templates/project_files.tpl
deleted file mode 100644 (file)
index 6579f34..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<table cellspacing="0" cellpadding="7" border="0" width="720">
-  <tr>
-    <td valign="top">
-      <table cellspacing="1" cellpadding="3" border="0" width="100%">
-        <tr>
-          <td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
-          <td width="35%" class="tableHeader">{$i18n.label.description}</td>
-{if $can_manage}
-          <td class="tableHeader">{$i18n.label.edit}</td>
-          <td class="tableHeader">{$i18n.label.delete}</td>
-{/if}
-        </tr>
-{if $files}
-  {foreach $files as $file}
-        <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
-          <td><a href="file_download.php?id={$file.id}">{$file.name|escape}</a></td>
-          <td>{$file.description|escape}</td>
-    {if $can_manage}
-          <td><a href="file_edit.php?id={$file.id}">{$i18n.label.edit}</a></td>
-          <td><a href="file_delete.php?id={$file.id}">{$i18n.label.delete}</a></td>
-    {/if}
-        </tr>
-  {/foreach}
-{/if}
-      </table>
-    </td>
-  </tr>
-</table>
-
-{if $can_manage}
-{$forms.fileUploadForm.open}
-<table cellspacing="0" cellpadding="7" border="0" width="720">
-  <tr>
-    <td align="center">
-      <table border="0" width="60%">
-        <tr>
-            <td align="right">{$i18n.label.description}:</td>
-            <td>{$forms.fileUploadForm.description.control}</td>
-            <td align="left">{$forms.fileUploadForm.newfile.control}</td>
-        </tr>
-        <tr><td height="50" align="center" colspan="3">{$forms.fileUploadForm.btn_submit.control}</td></tr>
-      </table>
-    </td>
-  </tr>
-</table>
-{$forms.fileUploadForm.close}
-{/if}
diff --git a/WEB-INF/templates/time_files.tpl b/WEB-INF/templates/time_files.tpl
deleted file mode 100644 (file)
index f373815..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<table cellspacing="0" cellpadding="7" border="0" width="720">
-  <tr>
-    <td valign="top">
-      <table cellspacing="1" cellpadding="3" border="0" width="100%">
-        <tr>
-          <td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
-          <td width="35%" class="tableHeader">{$i18n.label.description}</td>
-{if $can_edit}
-          <td class="tableHeader">{$i18n.label.edit}</td>
-          <td class="tableHeader">{$i18n.label.delete}</td>
-{/if}
-        </tr>
-{if $files}
-  {foreach $files as $file}
-        <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
-          <td><a href="file_download.php?id={$file.id}">{$file.name|escape}</a></td>
-          <td>{$file.description|escape}</td>
-    {if $can_edit}
-          <td><a href="file_edit.php?id={$file.id}">{$i18n.label.edit}</a></td>
-          <td><a href="file_delete.php?id={$file.id}">{$i18n.label.delete}</a></td>
-    {/if}
-        </tr>
-  {/foreach}
-{/if}
-      </table>
-    </td>
-  </tr>
-</table>
-
-{if $can_edit}
-{$forms.fileUploadForm.open}
-<table cellspacing="0" cellpadding="7" border="0" width="720">
-  <tr>
-    <td align="center">
-      <table border="0" width="60%">
-        <tr>
-            <td align="right">{$i18n.label.description}:</td>
-            <td>{$forms.fileUploadForm.description.control}</td>
-            <td align="left">{$forms.fileUploadForm.newfile.control}</td>
-        </tr>
-        <tr><td height="50" align="center" colspan="3">{$forms.fileUploadForm.btn_submit.control}</td></tr>
-      </table>
-    </td>
-  </tr>
-</table>
-{$forms.fileUploadForm.close}
-{/if}
index f797cc6..9ca15e3 100644 (file)
@@ -82,9 +82,9 @@ if ($request->isPost()) {
   }
 } // isPost
 
-$smarty->assign('can_manage', $user->can('manage_projects'));
+$smarty->assign('can_edit', $user->can('manage_projects'));
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));
 $smarty->assign('files', $files);
 $smarty->assign('title', $i18n->get('title.project_files').': '.$project['name']);
-$smarty->assign('content_page_name', 'project_files.tpl');
+$smarty->assign('content_page_name', 'entity_files.tpl');
 $smarty->display('index.tpl');
index 6b76b23..2ba0efc 100644 (file)
@@ -88,5 +88,5 @@ $smarty->assign('can_edit', $canEdit);
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));
 $smarty->assign('files', $files);
 $smarty->assign('title', $i18n->get('title.time_files'));
-$smarty->assign('content_page_name', 'time_files.tpl');
+$smarty->assign('content_page_name', 'entity_files.tpl');
 $smarty->display('index.tpl');