diff options
author | Craig Crosby <creecros@gmail.com> | 2019-07-02 22:52:22 -0400 |
---|---|---|
committer | fguillot <fred@kanboard.net> | 2019-07-02 19:52:22 -0700 |
commit | 48acf99fd10da2bb755d56f9dfd7c0210e76abeb (patch) | |
tree | 042eff2af1822c77b40591d938f5eafe26add05a /app | |
parent | efed94b23d592647f889ef03b144a91e8fbb6098 (diff) |
Sort columns by due date
Diffstat (limited to 'app')
35 files changed, 90 insertions, 0 deletions
diff --git a/app/Controller/TaskReorderController.php b/app/Controller/TaskReorderController.php index 32bdfc52..ae03ac2c 100644 --- a/app/Controller/TaskReorderController.php +++ b/app/Controller/TaskReorderController.php @@ -29,6 +29,9 @@ class TaskReorderController extends BaseController case 'assignee': $this->taskReorderModel->reorderByAssignee($project['id'], $swimlaneID, $columnID, $direction); break; + case 'due-date': + $this->taskReorderModel->reorderByDueDate($project['id'], $swimlaneID, $columnID, $direction); + break; } $this->response->redirect($this->helper->url->to('BoardViewController', 'show', ['project_id' => $project['id']])); diff --git a/app/Locale/bs_BA/translations.php b/app/Locale/bs_BA/translations.php index 00d6dced..a54a957b 100644 --- a/app/Locale/bs_BA/translations.php +++ b/app/Locale/bs_BA/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/ca_ES/translations.php b/app/Locale/ca_ES/translations.php index 3465eb9a..eae7ba21 100644 --- a/app/Locale/ca_ES/translations.php +++ b/app/Locale/ca_ES/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php index 09417227..79751c53 100644 --- a/app/Locale/cs_CZ/translations.php +++ b/app/Locale/cs_CZ/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index 14abf101..6480f66e 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -1398,6 +1398,8 @@ return array( 'Reorder this column by assignee and priority (DESC)' => 'Sortere denne kolonne efter ansvarlig og prioritet (DESC)', 'Reorder this column by assignee (A-Z)' => 'Sortere denne kolonne efter ansvarlig (A-Z)', 'Reorder this column by assignee (Z-A)' => 'Sortere denne kolonne efter ansvarlig (Z-A)', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', '%s moved the task #%d "%s" to the project "%s"' => '%s flyttede opgave #%d "%s" til projekt "%s"', 'Task #%d "%s" has been moved to the project "%s"' => 'Opgave #%d "%s" er flyttet til projekt "%s"', 'Move the task to another column when due date is less than a certain number of days' => 'Flytte opgave til anden kolonne når afleveringsdato er mindre end et bestemt antal dage', diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index bf18e22c..04e63399 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/el_GR/translations.php b/app/Locale/el_GR/translations.php index fb159353..e95d4ca9 100644 --- a/app/Locale/el_GR/translations.php +++ b/app/Locale/el_GR/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index c4ab1d4f..654ca873 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index e3aaa9f5..93c12d88 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index 496ffced..1c1b7944 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -1398,6 +1398,8 @@ return array( 'Reorder this column by assignee and priority (DESC)' => 'Réorganiser cette colonne par assigné et par priorité (DESC)', 'Reorder this column by assignee (A-Z)' => 'Réorganiser cette colonne par assigné (A-Z)', 'Reorder this column by assignee (Z-A)' => 'Réorganiser cette colonne par assigné (Z-A)', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', '%s moved the task #%d "%s" to the project "%s"' => '%s a déplacé la tâche #%d « %s » vers le projet « %s »', 'Task #%d "%s" has been moved to the project "%s"' => 'La tâche #%d « %s » a été déplacée vers le projet « %s »', 'Move the task to another column when the due date is less than a certain number of days' => 'Déplaçer la tâche dans une autre colonne lorsque la date d\'échéance est inférieure à un certain nombre de jour', diff --git a/app/Locale/hr_HR/translations.php b/app/Locale/hr_HR/translations.php index e065f259..b7124b2e 100644 --- a/app/Locale/hr_HR/translations.php +++ b/app/Locale/hr_HR/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index 145f5272..7a9e7c94 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -1398,6 +1398,8 @@ return array( 'Reorder this column by assignee and priority (DESC)' => 'Oszlop átrendezése felelős és prioritás szerint (csökkenő)', 'Reorder this column by assignee (A-Z)' => 'Oszlop átrendezése felelős szerint (A-Z)', 'Reorder this column by assignee (Z-A)' => 'Oszlop átrendezése felelős szerint (Z-A)', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/id_ID/translations.php b/app/Locale/id_ID/translations.php index 1956afc4..b25de324 100644 --- a/app/Locale/id_ID/translations.php +++ b/app/Locale/id_ID/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index 9aff5eb6..c9e3ab5f 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -1398,6 +1398,8 @@ return array( 'Reorder this column by assignee and priority (DESC)' => 'Ordina questa colonna per assegnatario e per priorità (DESC)', 'Reorder this column by assignee (A-Z)' => 'Ordina questa colonna per assegnatario (ASC)', 'Reorder this column by assignee (Z-A)' => 'Ordina questa colonna per assegnatario (DESC)', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index c8e0f848..e04cf550 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -1398,6 +1398,8 @@ return array( 'Reorder this column by assignee and priority (DESC)' => '担当者と優先度で並び替える(降順)', 'Reorder this column by assignee (A-Z)' => '担当者で並び替える(A-Z)', 'Reorder this column by assignee (Z-A)' => '担当者で並び替える(Z-A)', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/ko_KR/translations.php b/app/Locale/ko_KR/translations.php index 81c92af5..43587347 100644 --- a/app/Locale/ko_KR/translations.php +++ b/app/Locale/ko_KR/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/my_MY/translations.php b/app/Locale/my_MY/translations.php index cb15be20..453e0179 100644 --- a/app/Locale/my_MY/translations.php +++ b/app/Locale/my_MY/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php index af2503ce..71114aae 100644 --- a/app/Locale/nb_NO/translations.php +++ b/app/Locale/nb_NO/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index c68c1206..1b96b636 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index 968769ca..e10d4072 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index 506a03ee..1e8ec99a 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -1398,6 +1398,8 @@ return array( 'Reorder this column by assignee and priority (DESC)' => 'Reordenar esta coluna por designado e prioridade (decrescente)', 'Reorder this column by assignee (A-Z)' => 'Reordenar esta coluna por designado (A-Z)', 'Reorder this column by assignee (Z-A)' => 'Reordenar esta coluna por designado (Z-A)', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', '%s moved the task #%d "%s" to the project "%s"' => '%s moveu a tarefa #%d "%s" para o projeto "%s"', 'Task #%d "%s" has been moved to the project "%s"' => 'Tarefa #%d "%s" foi movida para o projeto "%s"', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php index afc5693e..ac2c5b57 100644 --- a/app/Locale/pt_PT/translations.php +++ b/app/Locale/pt_PT/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/ro_RO/translations.php b/app/Locale/ro_RO/translations.php index 3aecadbb..1d1498d3 100644 --- a/app/Locale/ro_RO/translations.php +++ b/app/Locale/ro_RO/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index 3d317bf6..aac6b536 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/sk_SK/translations.php b/app/Locale/sk_SK/translations.php index 479bd35f..9c57277b 100644 --- a/app/Locale/sk_SK/translations.php +++ b/app/Locale/sk_SK/translations.php @@ -1398,6 +1398,8 @@ return array( 'Reorder this column by assignee and priority (DESC)' => 'Zoradiť stĺpec podľa pridelenia a priority (ZOST)', 'Reorder this column by assignee (A-Z)' => 'Zoradiť stĺpec podľa pridelenia (A-Z)', 'Reorder this column by assignee (Z-A)' => 'Zoradiť stĺpec podľa pridelenia (Z-A)', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index 9ce006c5..84070546 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index 3cc100de..a5b87bd3 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index b0bebbdd..43c8a090 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index a5aee73d..8920aa70 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/uk_UA/translations.php b/app/Locale/uk_UA/translations.php index 0ac42ab9..c20aa2f5 100644 --- a/app/Locale/uk_UA/translations.php +++ b/app/Locale/uk_UA/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/vi_VN/translations.php b/app/Locale/vi_VN/translations.php index 7d1f3359..467609d2 100644 --- a/app/Locale/vi_VN/translations.php +++ b/app/Locale/vi_VN/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index 013ded31..bc914864 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -1398,6 +1398,8 @@ return array( 'Reorder this column by assignee and priority (DESC)' => '按指派和优先级倒序重排', 'Reorder this column by assignee (A-Z)' => '按指派重排(A-Z)', 'Reorder this column by assignee (Z-A)' => '按指派倒序重排(Z-A)', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', '%s moved the task #%d "%s" to the project "%s"' => '%s 已将任务 #%d "%s" 移动到项目"%s" ', 'Task #%d "%s" has been moved to the project "%s"' => '任务 #%d "%s" 已被移动到项目 "%s"', 'Move the task to another column when the due date is less than a certain number of days' => '当任务即将在指定天数内超期时移动到另一栏', diff --git a/app/Locale/zh_TW/translations.php b/app/Locale/zh_TW/translations.php index 57e0333f..6343e98d 100644 --- a/app/Locale/zh_TW/translations.php +++ b/app/Locale/zh_TW/translations.php @@ -1398,6 +1398,8 @@ return array( // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', + // 'Reorder this column by due date (ASC)' => '', + // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when due date is less than a certain number of days' => '', diff --git a/app/Model/TaskReorderModel.php b/app/Model/TaskReorderModel.php index db72274c..c7fc6f6d 100644 --- a/app/Model/TaskReorderModel.php +++ b/app/Model/TaskReorderModel.php @@ -61,6 +61,23 @@ class TaskReorderModel extends Base $this->db->closeTransaction(); } + public function reorderByDueDate($projectID, $swimlaneID, $columnID, $direction) + { + $this->db->startTransaction(); + + $taskIDs = $this->db->table(TaskModel::TABLE) + ->eq('project_id', $projectID) + ->eq('swimlane_id', $swimlaneID) + ->eq('column_id', $columnID) + ->orderBy('date_due', $direction) + ->asc('id') + ->findAllByColumn('id'); + + $this->reorderTasks($taskIDs); + + $this->db->closeTransaction(); + } + protected function reorderTasks(array $taskIDs) { $i = 1; diff --git a/app/Template/board/table_column.php b/app/Template/board/table_column.php index 5515945b..0ede0db3 100644 --- a/app/Template/board/table_column.php +++ b/app/Template/board/table_column.php @@ -67,6 +67,12 @@ <li> <?= $this->url->icon('sort-alpha-desc', t('Reorder this column by assignee (Z-A)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'assignee', 'direction' => 'desc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']]) ?> </li> + <li> + <?= $this->url->icon('sort-numeric-asc', t('Reorder this column by due date (ASC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'due-date', 'direction' => 'asc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']]) ?> + </li> + <li> + <?= $this->url->icon('sort-numeric-desc', t('Reorder this column by due date (DESC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'due-date', 'direction' => 'desc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']]) ?> + </li> <?php endif ?> <?= $this->hook->render('template:board:column:dropdown', array('swimlane' => $swimlane, 'column' => $column)) ?> |