From f30b876933acf131cbdfbf89ae7717faffa85f2d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 6 Apr 2019 13:34:42 +0000 Subject: [PATCH] Merged to templates into one to keep things simple. --- .../{time_files.tpl => entity_files.tpl} | 0 WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/project_files.tpl | 47 ------------------- project_files.php | 4 +- time_files.php | 2 +- 5 files changed, 4 insertions(+), 51 deletions(-) rename WEB-INF/templates/{time_files.tpl => entity_files.tpl} (100%) delete mode 100644 WEB-INF/templates/project_files.tpl diff --git a/WEB-INF/templates/time_files.tpl b/WEB-INF/templates/entity_files.tpl similarity index 100% rename from WEB-INF/templates/time_files.tpl rename to WEB-INF/templates/entity_files.tpl diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 17d7a68c..adf3c05c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.63.4910 | Copyright © Anuko | +  Anuko Time Tracker 1.18.63.4911 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/project_files.tpl b/WEB-INF/templates/project_files.tpl deleted file mode 100644 index 6579f34f..00000000 --- a/WEB-INF/templates/project_files.tpl +++ /dev/null @@ -1,47 +0,0 @@ - - - - -
- - - - -{if $can_manage} - - -{/if} - -{if $files} - {foreach $files as $file} - - - - {if $can_manage} - - - {/if} - - {/foreach} -{/if} -
{$i18n.label.thing_name}{$i18n.label.description}{$i18n.label.edit}{$i18n.label.delete}
{$file.name|escape}{$file.description|escape}{$i18n.label.edit}{$i18n.label.delete}
-
- -{if $can_manage} -{$forms.fileUploadForm.open} - - - - -
- - - - - - - -
{$i18n.label.description}:{$forms.fileUploadForm.description.control}{$forms.fileUploadForm.newfile.control}
{$forms.fileUploadForm.btn_submit.control}
-
-{$forms.fileUploadForm.close} -{/if} diff --git a/project_files.php b/project_files.php index f797cc6b..9ca15e39 100644 --- a/project_files.php +++ b/project_files.php @@ -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'); diff --git a/time_files.php b/time_files.php index 6b76b23d..2ba0efce 100644 --- a/time_files.php +++ b/time_files.php @@ -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'); -- 2.20.1