]> wagnertech.de Git - timetracker.git/commitdiff
A bit more work in progress on project attachments.
authorNik Okuntseff <support@anuko.com>
Fri, 15 Mar 2019 21:56:01 +0000 (21:56 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 15 Mar 2019 21:56:01 +0000 (21:56 +0000)
33 files changed:
WEB-INF/resources/ca.lang.php
WEB-INF/resources/cs.lang.php
WEB-INF/resources/da.lang.php
WEB-INF/resources/de.lang.php
WEB-INF/resources/en.lang.php
WEB-INF/resources/es.lang.php
WEB-INF/resources/et.lang.php
WEB-INF/resources/fa.lang.php
WEB-INF/resources/fi.lang.php
WEB-INF/resources/fr.lang.php
WEB-INF/resources/gr.lang.php
WEB-INF/resources/he.lang.php
WEB-INF/resources/hu.lang.php
WEB-INF/resources/it.lang.php
WEB-INF/resources/ja.lang.php
WEB-INF/resources/ko.lang.php
WEB-INF/resources/nl.lang.php
WEB-INF/resources/no.lang.php
WEB-INF/resources/pl.lang.php
WEB-INF/resources/pt-br.lang.php
WEB-INF/resources/pt.lang.php
WEB-INF/resources/ro.lang.php
WEB-INF/resources/ru.lang.php
WEB-INF/resources/sk.lang.php
WEB-INF/resources/sl.lang.php
WEB-INF/resources/sr.lang.php
WEB-INF/resources/sv.lang.php
WEB-INF/resources/tr.lang.php
WEB-INF/resources/zh-cn.lang.php
WEB-INF/resources/zh-tw.lang.php
WEB-INF/templates/project_files.tpl [new file with mode: 0644]
project_files.php
projects.php

index e524613aabffd317387e32a468a5a0d3f8f1dd0a..59ea97effc092428701e1fe4d4358c224c2d43b5 100644 (file)
@@ -274,6 +274,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Improve titles for consistency, so that each title explains correctly what each
index 2d7b36ff97b13c570e6bc23445e55155695b84a1..96f17769f4307691f3b472251c42f71f111b5e54 100644 (file)
@@ -284,6 +284,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Improve titles for consistency, so that each title explains correctly what each
index 662b21bd5e6a43bfe14fb16b98935d4e36f7d9a6..7a6ef813587084da3e054f2b08016cee3eb62b38 100644 (file)
@@ -262,6 +262,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'Fejl',
index 7d0dda0463f9180e564c539ed14a5e4400cbd009..bc7ba0c3af05abfad749be5342c846ad419faa8f 100644 (file)
@@ -250,6 +250,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'Fehler',
index 3e855d053a06b190179add7906d3014df6784923..8dc20118daf1176c0e25a4683708e9ce397c7785 100644 (file)
@@ -240,6 +240,7 @@ $i18n_key_words = array(
 'label.template' => 'Template',
 'label.attachments' => 'Attachments',
 'label.files' => 'Files',
+'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'Error',
index b314181e7c4cb6d5efaa9a981a7ebf8a81ff09d1..7978ff5575cbdfbd7c9135487b9c1a2c04fef3cf 100644 (file)
@@ -277,6 +277,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Translate the following.
index 7ffb16569732779e27f1970cba07764048670c64..94fb496e4d0ca4b6dfdd6744122ca5a78ee127df 100644 (file)
@@ -265,6 +265,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Improve titles for consistency, so that each title explains correctly what each
index e404d79c97dc53f4087102073f72d5093a26803b..17a76172e67435e0e8810fac4bb8f506b376c773 100644 (file)
@@ -272,6 +272,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'خطا',
index ac6e438f8e765513b747882c0be43529281de76d..661edd86c2a286c85f5b8f30971d2396dd33f651 100644 (file)
@@ -266,6 +266,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'Virhe',
index 5a38ee3fe1567cbed776dcb7737ec7fa4fb1afe4..b797b6ff14b48941f770f2d1cad448e50bc3e628 100644 (file)
@@ -260,6 +260,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'Erreur',
index 608b38783443502a857bbc861812e4146d4fb868..a69e6aa8c7d19292290eb9f4f6af1f8430ca0acf 100644 (file)
@@ -253,6 +253,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'Σφάλμα',
index f0a31aa2be31094ceb2d762789dfaac030203e14..8cc4d02270f4e067ac5a1826e680f7fec6819654 100644 (file)
@@ -283,6 +283,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'שגיאה',
index 0bc245f6f5c6c09ceb2c051ca3f35d9b68c5a244..8c2e730c627ec9c32c5fac8662b6be93ac65380a 100644 (file)
@@ -279,6 +279,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Translate the following.
index 54cf7e734332e6d95eae59a61673dd4086a5e771..c1a87b731b78128f4f1f142e2a483e98986a83a9 100644 (file)
@@ -257,6 +257,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Improve titles for consistency, so that each title explains correctly what each
index 0a443f956b9c9d72ac2f91290043ee3f1c52144c..3b48408c68d7d2732bfcd46020c05df1403e7dcc 100644 (file)
@@ -284,6 +284,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Translate the following.
index c4988fa35ef2eda978c12da76cb1129f2e9c8d18..1a77cde766063ab39d511559bddfe458fde16502 100644 (file)
@@ -284,6 +284,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Translate the following.
index c5a3b509b6fdd1ab9543b6314b504a133c81d68a..426a1428547fd3ae4357508de5d3734d19a75e57 100644 (file)
@@ -242,6 +242,7 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'Fout',
index 55cb9d86d35a755e693787ec5b60e1b3ab62a259..a37e8881bf93d6dd85afd0c77bbc8a0aabb5fb24 100644 (file)
@@ -281,6 +281,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Translate the following.
index 5a6ea8a9aaf687b1a4b53d0a04549025731c059d..9258b85120b92f0d6697b06a29c0131a5cec58bb 100644 (file)
@@ -267,6 +267,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'Błąd',
index 843258fbe8590fed1eff2a81b07e7dc065100a35..99d4d1c73a61c205838e7f489754ed2b8b93b9d5 100644 (file)
@@ -264,6 +264,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'Erro',
index 538ec9887131c222a3ccf7bb1d1924200002ad3e..8969cdcdd4eaf0289f01c78989986b43c90c7827 100644 (file)
@@ -269,6 +269,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Translate the following.
index 10803e21ffeacae99a73c809e36d2cbdb6a08816..74b843e981a9eeebea75a9f6624ff61b8ebe9878 100644 (file)
@@ -281,6 +281,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Improve titles for consistency, so that each title explains correctly what each
index 751d3a75cf1fa16803d1effe381d5b82cef671b7..c8dee6fc4d0a4322e57f5fed124d9022186c8401 100644 (file)
@@ -239,6 +239,7 @@ $i18n_key_words = array(
 'label.template' => 'Шаблон',
 'label.attachments' => 'Приложения',
 'label.files' => 'Файлы',
+'label.image' => 'Изображение',
 
 // Form titles.
 'title.error' => 'Ошибка',
index 81409771bc95d73ab8f9f2cb098b7a1c515dd9d0..34d92dd59ee4eb3e65dbe224d31d7d610f1153fc 100644 (file)
@@ -272,6 +272,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'Chyba',
index 712b3ee5c797304541d32c767a82568d959fca6b..a4cc8fef95c392fd3d3faaaec9adedbc0fb36356 100644 (file)
@@ -264,6 +264,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Translate the following.
index a454145492169bd10a81fb520b2f03a5f42693c6..7178d548cf6d59cc72d446c772b82a3515e48e87 100644 (file)
@@ -265,6 +265,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 'title.error' => 'Greška',
index 105b25f002861fb7de2e397c1e1ef84826c2e626..818a7db5e78d8eb10cd4d72c3b836567b3233f98 100644 (file)
@@ -261,6 +261,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Rubriker för formulär
 'title.error' => 'Fel',
index a02ed68ae9d8333ca2d1d37461f07121a7786dca..7608d155fdbefe8168f21a073b2099967a46ad79 100644 (file)
@@ -288,6 +288,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // Form titles.
index 33cd0898d2e9efc33d66ac1f4b957d569ad43cb0..ef133c96792d978ff98860abc2c02720c48ad396 100644 (file)
@@ -272,6 +272,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Translate the following.
index 12a328e20abd4773f811b2ef21f69ee1ecd51218..9aa1245183f14da9a0aebfedc7794a70915a833b 100644 (file)
@@ -279,6 +279,7 @@ $i18n_key_words = array(
 // 'label.template' => 'Template',
 // 'label.attachments' => 'Attachments',
 // 'label.files' => 'Files',
+// 'label.image' => 'Image',
 
 // Form titles.
 // TODO: Translate the following.
diff --git a/WEB-INF/templates/project_files.tpl b/WEB-INF/templates/project_files.tpl
new file mode 100644 (file)
index 0000000..0313e03
--- /dev/null
@@ -0,0 +1,102 @@
+<script>
+  function chLocation(newLocation) { document.location = newLocation; }
+</script>
+
+<table cellspacing="0" cellpadding="7" border="0" width="720">
+  <tr>
+    <td valign="top">
+{if $user->can('manage_projects')}
+      <table cellspacing="1" cellpadding="3" border="0" width="100%">
+  {if $inactive_projects}
+        <tr><td class="sectionHeaderNoBorder">{$i18n.form.projects.active_projects}</td></tr>
+  {/if}
+        <tr>
+          <td width="35%" class="tableHeader">{$i18n.label.image}</td>
+          <td width="35%" class="tableHeader">{$i18n.label.description}</td>
+  {if $show_files}
+          <td class="tableHeader">{$i18n.label.files}</td>
+  {/if}
+          <td class="tableHeader">{$i18n.label.edit}</td>
+          <td class="tableHeader">{$i18n.label.delete}</td>
+        </tr>
+  {if $active_projects}
+    {foreach $active_projects as $project}
+        <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
+          <td>{$project.name|escape}</td>
+          <td>{$project.description|escape}</td>
+      {if $show_files}
+          <td><a href="project_files.php?id={$project.id}">{$i18n.label.view}</a></td>
+      {/if}
+          <td><a href="project_edit.php?id={$project.id}">{$i18n.label.edit}</a></td>
+          <td><a href="project_delete.php?id={$project.id}">{$i18n.label.delete}</a></td>
+        </tr>
+    {/foreach}
+  {/if}
+      </table>
+
+      <table width="100%">
+        <tr>
+          <td align="center"><br>
+            <form><input type="button" onclick="chLocation('project_add.php');" value="{$i18n.button.add}"></form>
+          </td>
+        </tr>
+      </table>
+
+  {if $inactive_projects}
+      <table cellspacing="1" cellpadding="3" border="0" width="100%">
+        <tr><td class="sectionHeaderNoBorder">{$i18n.form.projects.inactive_projects}</td></tr>
+        <tr>
+          <td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
+          <td width="35%" class="tableHeader">{$i18n.label.description}</td>
+    {if $show_files}
+          <td class="tableHeader">{$i18n.label.files}</td>
+    {/if}
+          <td class="tableHeader">{$i18n.label.edit}</td>
+          <td class="tableHeader">{$i18n.label.delete}</td>
+        </tr>
+    {foreach $inactive_projects as $project}
+        <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
+          <td>{$project.name|escape}</td>
+          <td>{$project.description|escape}</td>
+      {if $show_files}
+          <td><a href="project_files.php?id={$project.id}">{$i18n.label.view}</a></td>
+      {/if}
+          <td><a href="project_edit.php?id={$project.id}">{$i18n.label.edit}</a></td>
+          <td><a href="project_delete.php?id={$project.id}">{$i18n.label.delete}</a></td>
+        </tr>
+    {/foreach}
+      </table>
+
+      <table width="100%">
+        <tr>
+          <td align="center"><br>
+            <form><input type="button" onclick="chLocation('project_add.php');" value="{$i18n.button.add}"></form>
+          </td>
+        </tr>
+      </table>
+  {/if}
+{else}
+      <table cellspacing="1" cellpadding="3" border="0" width="100%">
+        <tr>
+          <td class="tableHeader">{$i18n.label.thing_name}</td>
+          <td class="tableHeader">{$i18n.label.description}</td>
+    {if $show_files}
+          <td class="tableHeader">{$i18n.label.files}</td>
+    {/if}
+        </tr>
+  {if $active_projects}
+    {foreach $active_projects as $project}
+        <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
+          <td>{$project.name|escape}</td>
+          <td>{$project.description|escape}</td>
+      {if $show_files}
+          <td><a href="project_files.php?id={$project.id}">{$i18n.label.view}</a></td>
+      {/if}
+        </tr>
+    {/foreach}
+  {/if}
+      </table>
+{/if}
+    </td>
+  </tr>
+</table>
index baec9aa23fc5ac578c017fa3149b66e43f92a790..b069acb7fc4c8463bda2ae7123839cc96ef9578b 100644 (file)
@@ -27,8 +27,7 @@
 // +----------------------------------------------------------------------+
 
 require_once('initialize.php');
-import('form.Form');
-import('ttGroupHelper');
+import('ttProjectHelper');
 
 // Access checks.
 if (!(ttAccessAllowed('view_own_projects') || ttAccessAllowed('manage_projects'))) {
@@ -39,17 +38,18 @@ if (MODE_PROJECTS != $user->getTrackingMode() && MODE_PROJECTS_AND_TASKS != $use
   header('Location: feature_disabled.php');
   exit();
 }
+$cl_project_id = (int)$request->getParameter('id');
+$project = ttProjectHelper::get($cl_project_id);
+if (!$project) {
+  header('Location: access_denied.php');
+  exit();
+}
 // End of access checks.
 
-if($user->can('manage_projects')) {
-  $active_projects = ttGroupHelper::getActiveProjects();
-  $inactive_projects = ttGroupHelper::getInactiveProjects();
-} else
-  $active_projects = $user->getAssignedProjects();
+$files = null;
+// $files = ttAttachmentHelper::getProjectFiles();
 
-$smarty->assign('active_projects', $active_projects);
-$smarty->assign('inactive_projects', $inactive_projects);
-$smarty->assign('show_files', $user->isPluginEnabled('at'));
+$smarty->assign('files', $files);
 $smarty->assign('title', $i18n->get('title.project_files'));
-$smarty->assign('content_page_name', 'projects.tpl');
+$smarty->assign('content_page_name', 'project_files.tpl');
 $smarty->display('index.tpl');
index 97a86ba631b1a51d6c97dc532e48eb24e63a3cb6..236291cdbceda06f88ef980be4f808be8f782435 100644 (file)
@@ -27,7 +27,6 @@
 // +----------------------------------------------------------------------+
 
 require_once('initialize.php');
-import('form.Form');
 import('ttGroupHelper');
 
 // Access checks.