From: Nik Okuntseff Date: Sat, 6 Apr 2019 13:34:42 +0000 (+0000) Subject: Merged to templates into one to keep things simple. X-Git-Tag: timetracker_1.19-1~125 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f30b876933acf131cbdfbf89ae7717faffa85f2d;p=timetracker.git Merged to templates into one to keep things simple. --- diff --git a/WEB-INF/templates/entity_files.tpl b/WEB-INF/templates/entity_files.tpl new file mode 100644 index 00000000..f373815f --- /dev/null +++ b/WEB-INF/templates/entity_files.tpl @@ -0,0 +1,47 @@ + + + + +
+ + + + +{if $can_edit} + + +{/if} + +{if $files} + {foreach $files as $file} + + + + {if $can_edit} + + + {/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_edit} +{$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/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/WEB-INF/templates/time_files.tpl b/WEB-INF/templates/time_files.tpl deleted file mode 100644 index f373815f..00000000 --- a/WEB-INF/templates/time_files.tpl +++ /dev/null @@ -1,47 +0,0 @@ - - - - -
- - - - -{if $can_edit} - - -{/if} - -{if $files} - {foreach $files as $file} - - - - {if $can_edit} - - - {/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_edit} -{$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');