From dd8d7ef49d522a15dbf0d04f033f676580f30ad7 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 3 Jun 2017 17:31:32 -0400 Subject: Add configurable list of predefined subjects when sending a task by email --- app/Locale/bs_BA/translations.php | 2 ++ app/Locale/ca_ES/translations.php | 2 ++ app/Locale/cs_CZ/translations.php | 2 ++ app/Locale/da_DK/translations.php | 2 ++ app/Locale/de_DE/translations.php | 2 ++ app/Locale/el_GR/translations.php | 2 ++ app/Locale/es_ES/translations.php | 2 ++ app/Locale/fi_FI/translations.php | 2 ++ app/Locale/fr_FR/translations.php | 2 ++ app/Locale/hr_HR/translations.php | 2 ++ app/Locale/hu_HU/translations.php | 2 ++ app/Locale/id_ID/translations.php | 2 ++ app/Locale/it_IT/translations.php | 2 ++ app/Locale/ja_JP/translations.php | 2 ++ app/Locale/ko_KR/translations.php | 2 ++ app/Locale/my_MY/translations.php | 2 ++ app/Locale/nb_NO/translations.php | 2 ++ app/Locale/nl_NL/translations.php | 2 ++ app/Locale/pl_PL/translations.php | 2 ++ app/Locale/pt_BR/translations.php | 2 ++ app/Locale/pt_PT/translations.php | 2 ++ app/Locale/ru_RU/translations.php | 2 ++ app/Locale/sr_Latn_RS/translations.php | 2 ++ app/Locale/sv_SE/translations.php | 2 ++ app/Locale/th_TH/translations.php | 2 ++ app/Locale/tr_TR/translations.php | 2 ++ app/Locale/zh_CN/translations.php | 2 ++ app/Schema/Mysql.php | 7 ++++++- app/Schema/Postgres.php | 7 ++++++- app/Schema/Sqlite.php | 7 ++++++- app/Template/project_edit/show.php | 6 ++++++ app/Template/task_mail/create.php | 16 ++++++++++++++++ 32 files changed, 94 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/Locale/bs_BA/translations.php b/app/Locale/bs_BA/translations.php index f23077fc..32d3d02f 100644 --- a/app/Locale/bs_BA/translations.php +++ b/app/Locale/bs_BA/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ca_ES/translations.php b/app/Locale/ca_ES/translations.php index fb4c640d..0f5a2110 100644 --- a/app/Locale/ca_ES/translations.php +++ b/app/Locale/ca_ES/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php index 7c7244fb..75952c95 100644 --- a/app/Locale/cs_CZ/translations.php +++ b/app/Locale/cs_CZ/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index acecf83d..d9a1541c 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index 797dd993..ca25b828 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/el_GR/translations.php b/app/Locale/el_GR/translations.php index 3f31b0e6..560a823e 100644 --- a/app/Locale/el_GR/translations.php +++ b/app/Locale/el_GR/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index 8de5059f..b43b1188 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index 83c5ea66..07e7f674 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index 37a51c63..66a399b9 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -1337,4 +1337,6 @@ return array( 'Assign the task to its creator' => 'Assigner une tâche à son créateur', 'This task was sent by email to "%s" with subject "%s".' => 'Cette tâche a été envoyée par courrier électronique à « %s » avec le sujet « %s ».', 'Log this action in a comment' => 'Enregistrez cette action dans un commentaire', + 'Predefined Email Subjects' => 'Sujets de courrier électronique prédéfinis', + 'Write one subject by line.' => 'Écrivez un sujet par ligne.', ); diff --git a/app/Locale/hr_HR/translations.php b/app/Locale/hr_HR/translations.php index 090ec0c5..f676c31d 100644 --- a/app/Locale/hr_HR/translations.php +++ b/app/Locale/hr_HR/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index f2a01e16..16dd9a94 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/id_ID/translations.php b/app/Locale/id_ID/translations.php index 0d34be86..f857eec3 100644 --- a/app/Locale/id_ID/translations.php +++ b/app/Locale/id_ID/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index 2c544f75..ec7f0084 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index 5971fb67..f6749ba6 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ko_KR/translations.php b/app/Locale/ko_KR/translations.php index 42b1160a..6bc810ec 100644 --- a/app/Locale/ko_KR/translations.php +++ b/app/Locale/ko_KR/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/my_MY/translations.php b/app/Locale/my_MY/translations.php index 3374ad3c..c78bc737 100644 --- a/app/Locale/my_MY/translations.php +++ b/app/Locale/my_MY/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php index 618d89cf..b6042e99 100644 --- a/app/Locale/nb_NO/translations.php +++ b/app/Locale/nb_NO/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index fd7b26e6..6b39c893 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index a65df003..7922bf4b 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index dd0b9e90..7bbdb8dc 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php index 7f5110ec..23c7d7f1 100644 --- a/app/Locale/pt_PT/translations.php +++ b/app/Locale/pt_PT/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index fea13591..34357e01 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index dc4aae94..83d7c3da 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index d3e1b5ad..a04dfdcd 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 3b9d426c..4cb4b5e7 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index 0f99c4b5..d09e7bb0 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index 21466d0e..21175681 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 782338d4..20ef0080 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -8,7 +8,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 123; +const VERSION = 124; + +function version_124(PDO $pdo) +{ + $pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT'); +} function version_123(PDO $pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index e6096d74..a5b52b2b 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -8,7 +8,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 102; +const VERSION = 103; + +function version_103(PDO $pdo) +{ + $pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT'); +} function version_102(PDO $pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index ddcff861..3966d373 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -8,7 +8,12 @@ use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; use PDO; -const VERSION = 114; +const VERSION = 115; + +function version_115(PDO $pdo) +{ + $pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT'); +} function version_114(PDO $pdo) { diff --git a/app/Template/project_edit/show.php b/app/Template/project_edit/show.php index 62bd9af6..d4d0f8a6 100644 --- a/app/Template/project_edit/show.php +++ b/app/Template/project_edit/show.php @@ -63,5 +63,11 @@ form->number('priority_end', $values, $errors, array('tabindex="10"')) ?> +
+ + form->textarea('predefined_email_subjects', $values, $errors, array('tabindex="11"')) ?> +

+
+ modal->submitButtons(array('tabindex' => 11)) ?> diff --git a/app/Template/task_mail/create.php b/app/Template/task_mail/create.php index 4df81a6b..63a515ff 100644 --- a/app/Template/task_mail/create.php +++ b/app/Template/task_mail/create.php @@ -22,6 +22,22 @@ form->label(t('Subject'), 'subject') ?> form->text('subject', $values, $errors, array('required', 'tabindex="2"')) ?> + + + form->checkbox('add_comment', t('Log this action in a comment'), 1) ?> -- cgit v1.2.3