From b6546c4547eb47a06f80b6d0ffa474d3929602f9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 14 Apr 2019 17:07:13 +0000 Subject: [PATCH] Work in progress on configurable display options. --- WEB-INF/resources/ca.lang.php | 5 ++ WEB-INF/resources/cs.lang.php | 5 ++ WEB-INF/resources/da.lang.php | 5 ++ WEB-INF/resources/de.lang.php | 6 ++ WEB-INF/resources/en.lang.php | 4 ++ WEB-INF/resources/es.lang.php | 5 ++ WEB-INF/resources/et.lang.php | 6 ++ WEB-INF/resources/fa.lang.php | 5 ++ WEB-INF/resources/fi.lang.php | 5 ++ WEB-INF/resources/fr.lang.php | 5 ++ WEB-INF/resources/gr.lang.php | 6 ++ WEB-INF/resources/he.lang.php | 5 ++ WEB-INF/resources/hu.lang.php | 5 ++ WEB-INF/resources/it.lang.php | 6 ++ WEB-INF/resources/ja.lang.php | 5 ++ WEB-INF/resources/ko.lang.php | 5 ++ WEB-INF/resources/nl.lang.php | 6 ++ WEB-INF/resources/no.lang.php | 5 ++ WEB-INF/resources/pl.lang.php | 5 ++ WEB-INF/resources/pt-br.lang.php | 5 ++ WEB-INF/resources/pt.lang.php | 5 ++ WEB-INF/resources/ro.lang.php | 5 ++ WEB-INF/resources/ru.lang.php | 4 ++ WEB-INF/resources/sk.lang.php | 5 ++ WEB-INF/resources/sl.lang.php | 5 ++ WEB-INF/resources/sr.lang.php | 5 ++ WEB-INF/resources/sv.lang.php | 5 ++ WEB-INF/resources/tr.lang.php | 5 ++ WEB-INF/resources/zh-cn.lang.php | 5 ++ WEB-INF/resources/zh-tw.lang.php | 5 ++ WEB-INF/templates/display_options.tpl | 22 +++++++ WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/group_edit.tpl | 6 +- display_options.php | 84 +++++++++++++++++++++++++++ roles.php | 11 ---- week_view.php | 4 -- 36 files changed, 265 insertions(+), 17 deletions(-) create mode 100644 WEB-INF/templates/display_options.tpl create mode 100644 display_options.php diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 8cf71c52..b0b66f12 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -574,6 +574,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -652,4 +653,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 004666c7..8689ee12 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -587,6 +587,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -665,4 +666,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index c53d33df..6c9b4b90 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -545,6 +545,7 @@ $i18n_key_words = array( 'form.group_edit.12_hours' => '12 timers', 'form.group_edit.24_hours' => '24 timers', // TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', 'form.group_edit.tracking_mode' => 'Registrerings tilstand', 'form.group_edit.mode_time' => 'Tid', @@ -623,5 +624,9 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index d5969a70..c7e2225b 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -520,6 +520,8 @@ $i18n_key_words = array( // Group Settings form. See example at https://timetracker.anuko.com/group_edit.php. 'form.group_edit.12_hours' => '12 Stunden', 'form.group_edit.24_hours' => '24 Stunden', +// TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', 'form.group_edit.show_holidays' => 'Zeige Feiertage', 'form.group_edit.tracking_mode' => 'Nachverfolgung', 'form.group_edit.mode_time' => 'Zeit', @@ -595,4 +597,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index a4db5945..001b6387 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -508,6 +508,7 @@ $i18n_key_words = array( // Group Settings form. See example at https://timetracker.anuko.com/group_edit.php. 'form.group_edit.12_hours' => '12 hours', 'form.group_edit.24_hours' => '24 hours', +'form.group_edit.display_options' => 'Display options', 'form.group_edit.show_holidays' => 'Show holidays', 'form.group_edit.tracking_mode' => 'Tracking mode', 'form.group_edit.mode_time' => 'time', @@ -579,4 +580,7 @@ $i18n_key_words = array( 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 26a2fa5b..b22caf23 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -588,6 +588,7 @@ $i18n_key_words = array( 'form.group_edit.12_hours' => '12 horas', 'form.group_edit.24_hours' => '24 horas', // TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -667,4 +668,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 7b76db2e..684d1799 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -549,6 +549,8 @@ $i18n_key_words = array( // Group Settings form. See example at https://timetracker.anuko.com/group_edit.php. 'form.group_edit.12_hours' => '12 tundi', 'form.group_edit.24_hours' => '24 tundi', +// TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', 'form.group_edit.show_holidays' => 'Näita pühi', 'form.group_edit.tracking_mode' => 'Jälgimise režiim', 'form.group_edit.mode_time' => 'ajaarvestus', @@ -624,4 +626,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 79e96aaa..f1beb392 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -568,6 +568,7 @@ $i18n_key_words = array( 'form.group_edit.12_hours' => '12 ساعت', 'form.group_edit.24_hours' => '24 ساعت', // TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', 'form.group_edit.tracking_mode' => 'حالت رهگیری', 'form.group_edit.mode_time' => 'زمان', @@ -647,4 +648,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 45a3b1a4..6c2a539d 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -551,6 +551,7 @@ $i18n_key_words = array( 'form.group_edit.12_hours' => '12-tuntinen', 'form.group_edit.24_hours' => '24-tuntinen', // TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', 'form.group_edit.tracking_mode' => 'Seurantamuoto', 'form.group_edit.mode_time' => 'aika', @@ -629,4 +630,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 5b395872..ea8e8973 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -542,6 +542,7 @@ $i18n_key_words = array( 'form.group_edit.12_hours' => '12 heures', 'form.group_edit.24_hours' => '24 heures', // TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', 'form.group_edit.tracking_mode' => 'Mode suivi', 'form.group_edit.mode_time' => 'Heures', @@ -619,4 +620,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 5b18358f..745f054e 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -529,6 +529,8 @@ $i18n_key_words = array( // Group Settings form. See example at https://timetracker.anuko.com/group_edit.php. 'form.group_edit.12_hours' => '12 ώρες', 'form.group_edit.24_hours' => '24 ώρες', +// TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', 'form.group_edit.show_holidays' => 'Προβολή διακοπών', 'form.group_edit.tracking_mode' => 'Λειτουργία καταγραφής', 'form.group_edit.mode_time' => 'χρόνος', @@ -607,4 +609,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 02c24d6d..670fe0a7 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -573,6 +573,7 @@ $i18n_key_words = array( 'form.group_edit.12_hours' => '12 שעות', 'form.group_edit.24_hours' => '24 שעות', // TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', 'form.group_edit.tracking_mode' => 'סוג מעקב', 'form.group_edit.mode_time' => 'זמן', @@ -651,4 +652,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index a7b899fa..527b59a6 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -579,6 +579,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -657,4 +658,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 464a9978..55ef72b4 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -543,6 +543,8 @@ $i18n_key_words = array( // Group Settings form. See example at https://timetracker.anuko.com/group_edit.php. 'form.group_edit.12_hours' => '12 ore', 'form.group_edit.24_hours' => '24 ore', +// TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', 'form.group_edit.show_holidays' => 'Mostra vacanze', 'form.group_edit.tracking_mode' => 'Modalità di registrazione', 'form.group_edit.mode_time' => 'tempo', @@ -621,4 +623,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 223581c6..a9325f5b 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -582,6 +582,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -660,4 +661,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index ed85c0fd..feb023fc 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -580,6 +580,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -658,4 +659,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index ce42aa21..d368422f 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -503,6 +503,8 @@ $i18n_key_words = array( // Group Settings form. See example at https://timetracker.anuko.com/group_edit.php. 'form.group_edit.12_hours' => '12 uurs', 'form.group_edit.24_hours' => '24 uurs', +// TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', 'form.group_edit.show_holidays' => 'Toon vakantiedagen', 'form.group_edit.tracking_mode' => 'Bijhouden', 'form.group_edit.mode_time' => 'tijd', @@ -574,4 +576,8 @@ $i18n_key_words = array( 'form.timesheet_view.approve_body' => "Jouw tijdenoverzicht %s is goedgekeurd.

%s", 'form.timesheet_view.disapprove_subject' => 'Tijdenoverzicht afgekeurd', 'form.timesheet_view.disapprove_body' => "Jouw tijdenoverzicht %s is afgekeurd.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 5b747949..21fa6316 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -579,6 +579,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -657,4 +658,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index f8b6d171..9fe7ba99 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -554,6 +554,7 @@ $i18n_key_words = array( 'form.group_edit.12_hours' => '12 godzin', 'form.group_edit.24_hours' => '24 godziny', // TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', 'form.group_edit.tracking_mode' => 'Tryb śledzenia', 'form.group_edit.mode_time' => 'czas', @@ -632,4 +633,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 3aac39c6..81e46da1 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -549,6 +549,7 @@ $i18n_key_words = array( 'form.group_edit.12_hours' => '12 horas', 'form.group_edit.24_hours' => '24 horas', // TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', 'form.group_edit.tracking_mode' => 'Modo de acompanhamento', 'form.group_edit.mode_time' => 'tempo', @@ -627,4 +628,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index bd2bddf4..ee882f20 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -561,6 +561,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -639,4 +640,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index fced1bef..a8d12d4f 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -582,6 +582,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -660,4 +661,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index bc86bbac..c0a65ed3 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -499,6 +499,7 @@ $i18n_key_words = array( // Group Settings form. See example at https://timetracker.anuko.com/group_edit.php. 'form.group_edit.12_hours' => '12 часов', 'form.group_edit.24_hours' => '24 часа', +'form.group_edit.display_options' => 'Опции отображения', 'form.group_edit.show_holidays' => 'Показывать праздники', 'form.group_edit.tracking_mode' => 'Режим работы', 'form.group_edit.mode_time' => 'время', @@ -570,4 +571,7 @@ $i18n_key_words = array( 'form.timesheet_view.approve_body' => "Ваш табель %s одобрен.

%s", 'form.timesheet_view.disapprove_subject' => 'Табель не одобрен', 'form.timesheet_view.disapprove_body' => "Ваш табель %s не одобрен.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +'form.display_options.note_on_separate_row' => 'Комментарий в отдельном ряду', ); diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index ca952a6c..8fbf03a8 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -562,6 +562,7 @@ $i18n_key_words = array( 'form.group_edit.12_hours' => '12-hodinový', 'form.group_edit.24_hours' => '24-hodinový', // TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', 'form.group_edit.tracking_mode' => 'Režim sledovania', 'form.group_edit.mode_time' => 'čas', @@ -640,4 +641,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 9a8e59e1..9224b889 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -556,6 +556,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -634,4 +635,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index f7ca03f7..d4b250d6 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -552,6 +552,7 @@ $i18n_key_words = array( 'form.group_edit.12_hours' => '12 časova', 'form.group_edit.24_hours' => '24 časova', // TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', 'form.group_edit.tracking_mode' => 'Način evidencije', 'form.group_edit.mode_time' => 'vreme', @@ -630,4 +631,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index ebdbd5a6..fd0fdf49 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -549,6 +549,7 @@ $i18n_key_words = array( 'form.group_edit.12_hours' => '12-timmars', 'form.group_edit.24_hours' => '24-timmars', // TODO: translate the following. +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', 'form.group_edit.tracking_mode' => 'Spårningsmetod', 'form.group_edit.mode_time' => 'Endast tid', @@ -627,4 +628,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 1f27d4bf..2865e9aa 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -595,6 +595,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -673,4 +674,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 4246cae0..e9a8f487 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -565,6 +565,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -643,4 +644,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index fc3efcc5..952b46a7 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -572,6 +572,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.group_edit.12_hours' => '12 hours', // 'form.group_edit.24_hours' => '24 hours', +// 'form.group_edit.display_options' => 'Display options', // 'form.group_edit.show_holidays' => 'Show holidays', // 'form.group_edit.tracking_mode' => 'Tracking mode', // 'form.group_edit.mode_time' => 'time', @@ -650,4 +651,8 @@ $i18n_key_words = array( // 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", // 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', // 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", + +// Display Options form. See example at https://timetracker.anuko.com/display_options.php. +// TODO: translate the following. +// 'form.display_options.note_on_separate_row' => 'Note on separate row', ); diff --git a/WEB-INF/templates/display_options.tpl b/WEB-INF/templates/display_options.tpl new file mode 100644 index 00000000..a4fe69e3 --- /dev/null +++ b/WEB-INF/templates/display_options.tpl @@ -0,0 +1,22 @@ +{$forms.displayOptionsForm.open} + + + + + + + + + + + + + + + + + + + +
{$i18n.title.time}
{$forms.displayOptionsForm.time_note_on_separate_row.control} {$i18n.label.what_is_it}
 
{$i18n.title.reports}
{$forms.displayOptionsForm.report_note_on_separate_row.control} {$i18n.label.what_is_it}
 
{$forms.displayOptionsForm.btn_save.control}
+{$forms.displayOptionsForm.close} diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 8b7badc6..7bcd2359 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + {/if} @@ -70,6 +70,10 @@ function handleTaskRequiredCheckbox() { + + + + diff --git a/display_options.php b/display_options.php new file mode 100644 index 00000000..222cc25d --- /dev/null +++ b/display_options.php @@ -0,0 +1,84 @@ +getConfig()); + +if ($request->isPost()) { + $cl_time_note_on_separate_row = trim($request->getParameter('time_note_on_separate_row')); + $cl_report_note_on_separate_row = trim($request->getParameter('report_note_on_separate_row')); +} else { + $cl_time_note_on_separate_row = $config->getDefinedValue('time_note_on_separate_row'); + $cl_report_note_on_separate_row = $config->getDefinedValue('report_note_on_separate_row'); +} + +$form = new Form('displayOptionsForm'); +// $form->addInput(array('type'=>'checkbox','name'=>'time_client','value'=>$cl_time_client)); +// $form->addInput(array('type'=>'checkbox','name'=>'time_cf_1','value'=>$cl_time_cf_1)); +// $form->addInput(array('type'=>'checkbox','name'=>'time_project','value'=>$cl_time_project)); +// $form->addInput(array('type'=>'checkbox','name'=>'time_task','value'=>$cl_time_task)); +// $form->addInput(array('type'=>'checkbox','name'=>'time_start','value'=>$cl_time_start)); +// $form->addInput(array('type'=>'checkbox','name'=>'time_finish','value'=>$cl_time_finish)); +// $form->addInput(array('type'=>'checkbox','name'=>'time_duration','value'=>$cl_time_duration)); +// $form->addInput(array('type'=>'checkbox','name'=>'time_note','value'=>$cl_time_note)); +$form->addInput(array('type'=>'checkbox','name'=>'time_note_on_separate_row','value'=>$cl_time_note_on_separate_row)); +// TODO: consider adding other fields (timesheet, work_units, invoice, approved, cost, paid)? + +// Reports. +$form->addInput(array('type'=>'checkbox','name'=>'report_note_on_separate_row','value'=>$cl_report_note_on_separate_row)); +// TODO: add PDF break controller here. + +$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); + +if ($request->isPost()){ + if ($err->no()) { + // Update config. + $config->setDefinedValue('time_note_on_separate_row', $cl_time_note_on_separate_row); + $config->setDefinedValue('report_note_on_separate_row', $cl_report_note_on_separate_row); + if ($user->updateGroup(array('config' => $config->getConfig()))) { + header('Location: success.php'); + exit(); + } else + $err->add($i18n->get('error.db')); + } +} + +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('title', $i18n->get('title.display_options')); +$smarty->assign('content_page_name', 'display_options.tpl'); +$smarty->display('index.tpl'); diff --git a/roles.php b/roles.php index fe68329d..cd17da3c 100644 --- a/roles.php +++ b/roles.php @@ -36,19 +36,8 @@ if (!ttAccessAllowed('manage_roles')) { header('Location: access_denied.php'); exit(); } -$group_id = (int)$request->getParameter('group_id'); -if ($group_id && !$user->isGroupValid($group_id)) { - header('Location: access_denied.php'); - exit(); -} // End of access checks. -if ($group_id) { - // We are passed a valid group_id (most likely from group_edit.php). - // Set on behalf group accordingly. - $user->setOnBehalfGroup($group_id); -} - $smarty->assign('active_roles', ttTeamHelper::getActiveRolesForUser()); $smarty->assign('inactive_roles', ttTeamHelper::getInactiveRolesForUser()); $smarty->assign('title', $i18n->get('title.roles')); diff --git a/week_view.php b/week_view.php index 9f809af3..0d369bf9 100644 --- a/week_view.php +++ b/week_view.php @@ -34,10 +34,6 @@ if (!ttAccessAllowed('manage_advanced_settings')) { header('Location: access_denied.php'); exit(); } -if (!$user->isPluginEnabled('wv')) { - header('Location: feature_disabled.php'); - exit(); -} if ($request->isPost()) { $cl_week_note = $request->getParameter('week_note'); -- 2.20.1
 Anuko Time Tracker 1.18.65.4936 | Copyright © Anuko | +  Anuko Time Tracker 1.18.65.4937 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/group_edit.tpl b/WEB-INF/templates/group_edit.tpl index 0565d763..90622789 100644 --- a/WEB-INF/templates/group_edit.tpl +++ b/WEB-INF/templates/group_edit.tpl @@ -48,7 +48,7 @@ function handleTaskRequiredCheckbox() { {if $user->can('manage_roles')}
{$i18n.label.roles}:{$i18n.label.configure}{$i18n.label.configure}
{$i18n.label.week_start}: {$forms.groupForm.start_week.control}
{$i18n.form.group_edit.display_options}:{$i18n.label.configure}
{$i18n.form.group_edit.show_holidays}: {$forms.groupForm.show_holidays.control} {$i18n.label.what_is_it}