From af80607509fae805aae37ba966f24aa50986fe9d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 24 Feb 2019 17:33:22 +0000 Subject: [PATCH] Work on progress on report approval plugin. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 1 + WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/plugins.tpl | 8 +++++++- plugins.php | 5 +++++ 33 files changed, 43 insertions(+), 2 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 8b3d5d6f..692fc357 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -270,6 +270,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 17ea3e26..55845055 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -280,6 +280,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 2a786b14..11295b15 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -257,6 +257,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'Fejl', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 5e72116b..99ec9086 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -245,6 +245,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'Fehler', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 1fdd6111..361b9d81 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -235,6 +235,7 @@ $i18n_key_words = array( 'label.timesheet' => 'Timesheet', 'label.submitted' => 'Submitted', 'label.approved' => 'Approved', +'label.approval' => 'Report approval', // Form titles. 'title.error' => 'Error', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 559e3286..37ba0d2d 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -273,6 +273,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Translate the following. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 71a1288c..0d514ba1 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -260,6 +260,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index b5bed52c..f30109a0 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -267,6 +267,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'خطا', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index c10ca5ea..97065c45 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -261,6 +261,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'Virhe', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index b937b771..150e018f 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -255,6 +255,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'Erreur', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index c5e8d5e8..28ebbe44 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -248,6 +248,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'Σφάλμα', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index b2a7dfd1..7dbb615c 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -278,6 +278,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'שגיאה', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index f6bceaee..57cec891 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -274,6 +274,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Translate the following. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index fc8a0815..92b17f59 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -252,6 +252,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 7f83a767..680cd280 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -279,6 +279,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Translate the following. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index aa40a094..af3099ce 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -279,6 +279,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Translate the following. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index ee170cee..ce08d758 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -238,6 +238,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'Fout', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index e43dad9b..3b6925d0 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -277,6 +277,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Translate the following. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 9b243eef..27985c62 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -262,6 +262,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'Błąd', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 71fcef6f..7afd6f8b 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -259,6 +259,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'Erro', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 0723acff..68173183 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -264,6 +264,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Translate the following. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index b94bcd98..e279672d 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -277,6 +277,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 19bedf9b..6edbfbed 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -234,6 +234,7 @@ $i18n_key_words = array( 'label.timesheet' => 'Табель учёта', 'label.submitted' => 'Подано', 'label.approved' => 'Одобрено', +'label.approval' => 'Одобрение отчётов', // Form titles. 'title.error' => 'Ошибка', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index d3525c0d..f593a8ab 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -267,6 +267,7 @@ $i18n_key_words = array( // 'label.quota' => 'Quota', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'Chyba', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index fedc796a..86695a4a 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -260,6 +260,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Translate the following. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 22910078..3c8df923 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -260,6 +260,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. 'title.error' => 'Greška', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 480650e4..516ab130 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -256,6 +256,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Rubriker för formulär 'title.error' => 'Fel', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 87b44ca0..7b926fd7 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -283,6 +283,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // Form titles. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 9d03e7b0..57fc9ebe 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -267,6 +267,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Translate the following. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index e488dbd6..130683d2 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -274,6 +274,7 @@ $i18n_key_words = array( // 'label.timesheet' => 'Timesheet', // 'label.submitted' => 'Submitted', // 'label.approved' => 'Approved', +// 'label.approval' => 'Report approval', // Form titles. // TODO: Translate the following. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2ed9b3f0..2358030b 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- +{if isTrue('APPROVAL_DEBUG')} + + + + +{/if} {if isTrue('TIMESHEET_DEBUG')} - + {/if} diff --git a/plugins.php b/plugins.php index 64615aa2..0981cb77 100644 --- a/plugins.php +++ b/plugins.php @@ -51,6 +51,7 @@ if ($request->isPost()) { $cl_quotas = $request->getParameter('quotas'); $cl_week_view = $request->getParameter('week_view'); $cl_work_units = $request->getParameter('work_units'); + $cl_approval = $request->getParameter('approval'); $cl_timesheets = $request->getParameter('timesheets'); } else { // Note: we get here in get, and also in post when group changes. @@ -69,6 +70,7 @@ if ($request->isPost()) { $cl_quotas = in_array('mq', $plugins); $cl_week_view = in_array('wv', $plugins); $cl_work_units = in_array('wu', $plugins); + $cl_approval = in_array('ap', $plugins); $cl_timesheets = in_array('ts', $plugins); } @@ -88,6 +90,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'locking','value'=>$cl_locking, $form->addInput(array('type'=>'checkbox','name'=>'quotas','value'=>$cl_quotas,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_view,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'work_units','value'=>$cl_work_units,'onchange'=>'handlePluginCheckboxes()')); +$form->addInput(array('type'=>'checkbox','name'=>'approval','value'=>$cl_approval)); $form->addInput(array('type'=>'checkbox','name'=>'timesheets','value'=>$cl_timesheets)); // Submit button. $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -123,6 +126,8 @@ if ($request->isPost()) { $plugins .= ',wv'; if ($cl_work_units) $plugins .= ',wu'; + if ($cl_approval) + $plugins .= ',ap'; if ($cl_timesheets) $plugins .= ',ts'; -- 2.20.1
 Anuko Time Tracker 1.18.43.4769 | Copyright © Anuko | +  Anuko Time Tracker 1.18.43.4770 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/plugins.tpl b/WEB-INF/templates/plugins.tpl index e252e32a..ce0cd52a 100644 --- a/WEB-INF/templates/plugins.tpl +++ b/WEB-INF/templates/plugins.tpl @@ -134,10 +134,16 @@ function handlePluginCheckboxes() { {$forms.pluginsForm.work_units.control} {$i18n.label.configure}
{$forms.pluginsForm.approval.control}
{$forms.pluginsForm.timesheets.control}