diff options
| author | Frédéric Guillot <fred@kanboard.net> | 2018-06-07 15:02:10 -0700 | 
|---|---|---|
| committer | Frédéric Guillot <fred@kanboard.net> | 2018-06-07 15:02:10 -0700 | 
| commit | 9d4be201aaaeaac23f4b18fb6c91caca857a2f0f (patch) | |
| tree | 0b669aa0d7d382679100a69c0f9a59287b906568 | |
| parent | dfea2f23653644b574322a5199c120a32e1f29f3 (diff) | |
Add quick link assign me in different views
41 files changed, 94 insertions, 48 deletions
| diff --git a/app/Controller/TaskModificationController.php b/app/Controller/TaskModificationController.php index 07e9d932..dcf9ec2a 100644 --- a/app/Controller/TaskModificationController.php +++ b/app/Controller/TaskModificationController.php @@ -14,6 +14,19 @@ use Kanboard\Core\ExternalTask\ExternalTaskException;   */  class TaskModificationController extends BaseController  { +    public function assignToMe() +    { +        $task = $this->getTask(); +        $values = ['id' => $task['id'], 'owner_id' => $this->userSession->getId()]; + +        if (! $this->helper->projectRole->canUpdateTask($task)) { +            throw new AccessForbiddenException(t('You are not allowed to update tasks assigned to someone else.')); +        } + +        $this->taskModificationModel->update($values); +        $this->redirectAfterQuickAction($task); +    } +      /**       * Set the start date automatically       * @@ -22,12 +35,34 @@ class TaskModificationController extends BaseController      public function start()      {          $task = $this->getTask(); -        $values = array('id' => $task['id'], 'date_started' => time()); +        $values = ['id' => $task['id'], 'date_started' => time()]; +          if (! $this->helper->projectRole->canUpdateTask($task)) {              throw new AccessForbiddenException(t('You are not allowed to update tasks assigned to someone else.'));          } +          $this->taskModificationModel->update($values); -        $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']))); +        $this->redirectAfterQuickAction($task); +    } + +    protected function redirectAfterQuickAction(array $task) +    { +        switch ($this->request->getStringParam('redirect')) { +            case 'board': +                $this->response->redirect($this->helper->url->to('BoardViewController', 'show', ['project_id' => $task['project_id']])); +                break; +            case 'list': +                $this->response->redirect($this->helper->url->to('TaskListController', 'show', ['project_id' => $task['project_id']])); +                break; +            case 'dashboard': +                $this->response->redirect($this->helper->url->to('DashboardController', 'show', [], 'project-tasks-'.$task['project_id'])); +                break; +            case 'dashboard-tasks': +                $this->response->redirect($this->helper->url->to('DashboardController', 'tasks', ['user_id' => $this->userSession->getId()])); +                break; +            default: +                $this->response->redirect($this->helper->url->to('TaskViewController', 'show', ['project_id' => $task['project_id'], 'task_id' => $task['id']])); +        }      }      /** diff --git a/app/Locale/bs_BA/translations.php b/app/Locale/bs_BA/translations.php index 3ada54d7..a4a5a730 100644 --- a/app/Locale/bs_BA/translations.php +++ b/app/Locale/bs_BA/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Uredi opis',      'New internal link' => 'Nova unutrašnja veza',      'Display list of keyboard shortcuts' => 'Prikaži listu prečica na tastaturi', -    'Set start date' => 'Postavi početni datum',      'Avatar' => 'Avatar',      'Upload my avatar image' => 'Dodaj sliku za moj avatar',      'Remove my image' => 'Ukloni moju sliku', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/ca_ES/translations.php b/app/Locale/ca_ES/translations.php index 5e58db5f..abf83637 100644 --- a/app/Locale/ca_ES/translations.php +++ b/app/Locale/ca_ES/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Modifica la descripció',      'New internal link' => 'Nou enllaç intern',      'Display list of keyboard shortcuts' => 'Visualització de la llista de dreceres de teclat', -    'Set start date' => 'Comença',      'Avatar' => 'Avatar',      'Upload my avatar image' => 'Puja la imatge meu avatar',      'Remove my image' => 'Traieu la meva imatge', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php index a49c0f02..e6f314e6 100644 --- a/app/Locale/cs_CZ/translations.php +++ b/app/Locale/cs_CZ/translations.php @@ -1022,7 +1022,6 @@ return array(      // 'Edit description' => '',      // 'New internal link' => '',      // 'Display list of keyboard shortcuts' => '', -    // 'Set start date' => '',      // 'Avatar' => '',      // 'Upload my avatar image' => '',      // 'Remove my image' => '', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index d03bf808..3cb3b9f7 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Redigere beskrivelse',      'New internal link' => 'Ny intern henvisning',      'Display list of keyboard shortcuts' => 'Vise liste over tastaturgenveje', -    'Set start date' => 'Angive startdato',      'Avatar' => 'Ikon',      'Upload my avatar image' => 'Overføre ikon billede',      'Remove my image' => 'Fjerne billede', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index 56ecbd38..80011c61 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Beschreibung bearbeiten',      'New internal link' => 'Neue interne Verbindung',      'Display list of keyboard shortcuts' => 'Liste der Tastaturkürzel anzeigen', -    'Set start date' => 'Anfangsdatum setzen',      'Avatar' => 'Avatar',      'Upload my avatar image' => 'Mein Avatar Bild hochladen',      'Remove my image' => 'Mein Bild entfernen', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/el_GR/translations.php b/app/Locale/el_GR/translations.php index 0ea8238e..f61dab97 100644 --- a/app/Locale/el_GR/translations.php +++ b/app/Locale/el_GR/translations.php @@ -1022,7 +1022,6 @@ return array(      // 'Edit description' => '',      // 'New internal link' => '',      // 'Display list of keyboard shortcuts' => '', -    // 'Set start date' => '',      // 'Avatar' => '',      // 'Upload my avatar image' => '',      // 'Remove my image' => '', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index 2ab2df17..d24b6cf8 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Editar Descripción',      'New internal link' => 'Nuevo enlace interno',      'Display list of keyboard shortcuts' => 'Mostrar lista de atajos de teclado', -    'Set start date' => 'Establecer fecha de inicio',      'Avatar' => 'Avatar',      'Upload my avatar image' => 'Subir mi imagen de avatar',      'Remove my image' => 'Eliminar mi imagen', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index 03842edd..df0d4b84 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -1022,7 +1022,6 @@ return array(      // 'Edit description' => '',      // 'New internal link' => '',      // 'Display list of keyboard shortcuts' => '', -    // 'Set start date' => '',      // 'Avatar' => '',      // 'Upload my avatar image' => '',      // 'Remove my image' => '', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index 788df22e..79d37a32 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Modifier la description',      'New internal link' => 'Nouveau lien interne',      'Display list of keyboard shortcuts' => 'Afficher la liste des raccourcis claviers', -    'Set start date' => 'Définir la date de début',      'Avatar' => 'Avatar',      'Upload my avatar image' => 'Uploader mon image d\'avatar',      'Remove my image' => 'Supprimer mon image', @@ -1383,4 +1382,5 @@ return array(      'Edit tasks in bulk' => 'Modifier les tâches en masse',      'Choose the properties that you would like to change for the selected tasks.' => 'Choisissez les propriétés que vous souhaitez changer pour les tâches sélectionnées.',      'Configure this project' => 'Configurer ce projet', +    'Start now' => 'Débuter maintenant',  ); diff --git a/app/Locale/hr_HR/translations.php b/app/Locale/hr_HR/translations.php index f2f48309..e4e75876 100644 --- a/app/Locale/hr_HR/translations.php +++ b/app/Locale/hr_HR/translations.php @@ -1022,7 +1022,6 @@ return array(      // 'Edit description' => '',      // 'New internal link' => '',      // 'Display list of keyboard shortcuts' => '', -    'Set start date' => 'Postavi početni datum',      // 'Avatar' => '',      // 'Upload my avatar image' => '',      // 'Remove my image' => '', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index 0dab3a75..e31c8772 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Leírás szerkesztése',      'New internal link' => 'Új belső hivatkozás',      'Display list of keyboard shortcuts' => 'Gyorsbillentyűk listájának megjelenítése', -    'Set start date' => 'Kezdési dátum beállítása',      'Avatar' => 'Avatár',      'Upload my avatar image' => 'Saját avatárkép feltöltése',      'Remove my image' => 'Saját kép eltávolítása', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/id_ID/translations.php b/app/Locale/id_ID/translations.php index eba8e04c..95e3b406 100644 --- a/app/Locale/id_ID/translations.php +++ b/app/Locale/id_ID/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Edit deskripsi',      'New internal link' => 'Tautan internal baru',      'Display list of keyboard shortcuts' => 'Tampilkan daftar pintasan keyboard', -    'Set start date' => 'Atur tanggal mulai',      'Avatar' => 'Avatar',      'Upload my avatar image' => 'Unggah foto avatar saya',      'Remove my image' => 'Hapus foto saya', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index 1602ef2b..a871181e 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Modifica descrizione',      'New internal link' => 'Nuovo link interno',      'Display list of keyboard shortcuts' => 'Mostra una lista di scorciatoie da tastiera', -    'Set start date' => 'Imposta la data di inizio',      // 'Avatar' => '',      'Upload my avatar image' => 'Carica l\'immagine del mio avatar',      'Remove my image' => 'Rimuovi la mia immagine', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index f913dfaa..908e68cb 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => '説明を編集',      'New internal link' => '新しい内部リンク',      'Display list of keyboard shortcuts' => 'キーボードショートカットのリストを表示', -    'Set start date' => '開始する',      'Avatar' => 'アバター',      'Upload my avatar image' => '自分のアバター画像をアップロード',      'Remove my image' => '画像を削除', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/ko_KR/translations.php b/app/Locale/ko_KR/translations.php index 37648598..3627ddeb 100644 --- a/app/Locale/ko_KR/translations.php +++ b/app/Locale/ko_KR/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => '설명 수정',      'New internal link' => '새로운 내부 링크',      'Display list of keyboard shortcuts' => '키보드 숏컷 리스트 보여주기', -    'Set start date' => '시작일 설정',      'Avatar' => '아바타',      'Upload my avatar image' => '아바타 이미지 올리기',      'Remove my image' => '이미지 삭제', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/my_MY/translations.php b/app/Locale/my_MY/translations.php index c0a99895..19914d67 100644 --- a/app/Locale/my_MY/translations.php +++ b/app/Locale/my_MY/translations.php @@ -1022,7 +1022,6 @@ return array(      // 'Edit description' => '',      // 'New internal link' => '',      // 'Display list of keyboard shortcuts' => '', -    // 'Set start date' => '',      // 'Avatar' => '',      // 'Upload my avatar image' => '',      // 'Remove my image' => '', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php index 30cb0d62..701debf6 100644 --- a/app/Locale/nb_NO/translations.php +++ b/app/Locale/nb_NO/translations.php @@ -1022,7 +1022,6 @@ return array(      // 'Edit description' => '',      // 'New internal link' => '',      // 'Display list of keyboard shortcuts' => '', -    // 'Set start date' => '',      // 'Avatar' => '',      // 'Upload my avatar image' => '',      // 'Remove my image' => '', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index 572afd9d..3f01f399 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -1022,7 +1022,6 @@ return array(      // 'Edit description' => '',      // 'New internal link' => '',      // 'Display list of keyboard shortcuts' => '', -    // 'Set start date' => '',      // 'Avatar' => '',      // 'Upload my avatar image' => '',      // 'Remove my image' => '', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index 7c7162d2..b54de4b9 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Edytuj opis',      'New internal link' => 'Nowy wewnętrzny link',      'Display list of keyboard shortcuts' => 'Wyświetl skróty klawiszowe', -    'Set start date' => 'Ustaw datę rozpoczęcia',      // 'Avatar' => '',      'Upload my avatar image' => 'Prześlij avatar',      'Remove my image' => 'Usuń', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index 8becf6ee..897b61ae 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Editar a descrição',      'New internal link' => 'Novo link interno',      'Display list of keyboard shortcuts' => 'Ver a lista dos atalhos de teclado', -    'Set start date' => 'Definir a data de início',      'Avatar' => 'Avatar',      'Upload my avatar image' => 'Enviar a minha imagem de avatar',      'Remove my image' => 'Remover a minha imagem', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php index da7f279f..6dc762dd 100644 --- a/app/Locale/pt_PT/translations.php +++ b/app/Locale/pt_PT/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Editar descrição',      'New internal link' => 'Nova ligação interna',      'Display list of keyboard shortcuts' => 'Mostrar lista de atalhos do teclado', -    'Set start date' => 'Definir data de inicio',      'Avatar' => 'Avatar',      'Upload my avatar image' => 'Enviar a minha imagem de avatar',      'Remove my image' => 'Remover a minha imagem', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/ro_RO/translations.php b/app/Locale/ro_RO/translations.php index f77fcbd8..7fc23305 100644 --- a/app/Locale/ro_RO/translations.php +++ b/app/Locale/ro_RO/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Modifică descrierea',      'New internal link' => 'Legătură internă nouă',      'Display list of keyboard shortcuts' => 'Afișează lista de scurtături pe tastatură', -    'Set start date' => 'Definește data pornirii',      'Avatar' => 'Avatar',      'Upload my avatar image' => 'Încarcă o imagine de avatar',      'Remove my image' => 'Șterge imaginea mea', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index 8f8c43ba..1cb12065 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Изменение описания',      'New internal link' => 'Новая внутренняя ссылка',      'Display list of keyboard shortcuts' => 'Показать список клавиатурных сокращений', -    'Set start date' => 'Установить дату начала',      'Avatar' => 'Аватар',      'Upload my avatar image' => 'Загрузить моё изображение для аватара',      'Remove my image' => 'Удалить моё изображение', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index 1153fc5e..385ec793 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -1022,7 +1022,6 @@ return array(      // 'Edit description' => '',      // 'New internal link' => '',      // 'Display list of keyboard shortcuts' => '', -    // 'Set start date' => '',      // 'Avatar' => '',      // 'Upload my avatar image' => '',      // 'Remove my image' => '', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index 383aae54..4212c4c8 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -1022,7 +1022,6 @@ return array(      // 'Edit description' => '',      // 'New internal link' => '',      // 'Display list of keyboard shortcuts' => '', -    // 'Set start date' => '',      // 'Avatar' => '',      // 'Upload my avatar image' => '',      // 'Remove my image' => '', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index ebb938b2..b83cfb1e 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -1022,7 +1022,6 @@ return array(      // 'Edit description' => '',      // 'New internal link' => '',      // 'Display list of keyboard shortcuts' => '', -    // 'Set start date' => '',      // 'Avatar' => '',      // 'Upload my avatar image' => '',      // 'Remove my image' => '', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index a1bed63c..2fc3e6e7 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Açıklamayı güncelle',      'New internal link' => 'Yeni iç link',      'Display list of keyboard shortcuts' => 'Kısayol tuşları listesini göster', -    'Set start date' => 'Başlangıç tarihi belirle',      'Avatar' => 'Simge',      'Upload my avatar image' => 'Avatar resmimi yükle',      'Remove my image' => 'Resmimi kaldır', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/uk_UA/translations.php b/app/Locale/uk_UA/translations.php index 55fba6fe..4b0fb8f1 100644 --- a/app/Locale/uk_UA/translations.php +++ b/app/Locale/uk_UA/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Редагувати опис',      'New internal link' => 'Новий зв\'язок',      'Display list of keyboard shortcuts' => 'Показати перелік клавіатурних комбінацій', -    'Set start date' => 'Задати дату початку',      'Avatar' => 'Аватар',      'Upload my avatar image' => 'Завантажити зображення аватара',      'Remove my image' => 'Видалити зображення', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/vi_VN/translations.php b/app/Locale/vi_VN/translations.php index 3ab102a5..a1a05f2b 100644 --- a/app/Locale/vi_VN/translations.php +++ b/app/Locale/vi_VN/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => 'Chỉnh sửa mô tả',      'New internal link' => 'Liên kết nội bộ mới',      'Display list of keyboard shortcuts' => 'Hiển thị danh sách các phím tắt', -    'Set start date' => 'Đặt ngày bắt đầu',      'Avatar' => 'Hình đại diện',      'Upload my avatar image' => 'Tải lên hình ảnh đại diện của tôi',      'Remove my image' => 'Hủy bỏ hình ảnh của tôi', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index 7ec4f2c6..3eeae65b 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => '编辑描述',      'New internal link' => '新建内部链接',      'Display list of keyboard shortcuts' => '显示快捷键列表', -    'Set start date' => '开始任务',      'Avatar' => '我的头像',      'Upload my avatar image' => '上传我的头像',      'Remove my image' => '删除我的头像', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Locale/zh_TW/translations.php b/app/Locale/zh_TW/translations.php index 3b1b3af0..6d88000f 100644 --- a/app/Locale/zh_TW/translations.php +++ b/app/Locale/zh_TW/translations.php @@ -1022,7 +1022,6 @@ return array(      'Edit description' => '編輯描述',      'New internal link' => '新增内部連接',      'Display list of keyboard shortcuts' => '顯示快速鍵列表', -    'Set start date' => '開始任務',      'Avatar' => '頭像',      'Upload my avatar image' => '上傳我的頭像',      'Remove my image' => '删除我的頭像', @@ -1383,4 +1382,5 @@ return array(      // 'Edit tasks in bulk' => '',      // 'Choose the properties that you would like to change for the selected tasks.' => '',      // 'Configure this project' => '', +    // 'Start now' => '',  ); diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php index ece5efbe..396184dd 100644 --- a/app/Template/board/task_private.php +++ b/app/Template/board/task_private.php @@ -18,7 +18,7 @@          <div class="task-board-collapsed">              <div class="task-board-saving-icon" style="display: none;"><i class="fa fa-spinner fa-pulse"></i></div>              <?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> -                <?= $this->render('task/dropdown', array('task' => $task)) ?> +                <?= $this->render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?>                  <?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>              <?php else: ?>                  <strong><?= '#'.$task['id'] ?></strong> @@ -36,7 +36,7 @@              <div class="task-board-saving-icon" style="display: none;"><i class="fa fa-spinner fa-pulse fa-2x"></i></div>              <div class="task-board-header">                  <?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> -                    <?= $this->render('task/dropdown', array('task' => $task)) ?> +                    <?= $this->render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?>                      <?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>                  <?php else: ?>                      <strong><?= '#'.$task['id'] ?></strong> diff --git a/app/Template/dashboard/overview.php b/app/Template/dashboard/overview.php index f38c0d44..a352ce02 100644 --- a/app/Template/dashboard/overview.php +++ b/app/Template/dashboard/overview.php @@ -63,6 +63,7 @@                      <div class="table-list-row color-<?= $task['color_id'] ?>">                          <?= $this->render('task_list/task_title', array(                              'task' => $task, +                            'redirect' => 'dashboard',                          )) ?>                          <?= $this->render('task_list/task_details', array( diff --git a/app/Template/dashboard/tasks.php b/app/Template/dashboard/tasks.php index bde1e2f3..4392e40b 100644 --- a/app/Template/dashboard/tasks.php +++ b/app/Template/dashboard/tasks.php @@ -13,6 +13,7 @@              <div class="table-list-row color-<?= $task['color_id'] ?>">                  <?= $this->render('task_list/task_title', array(                      'task' => $task, +                    'redirect' => 'dashboard-tasks',                  )) ?>                  <?= $this->render('task_list/task_details', array( diff --git a/app/Template/task/details.php b/app/Template/task/details.php index cf305743..2712d49b 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -85,6 +85,9 @@                              <?= t('not assigned') ?>                          <?php endif ?>                          </span> +                        <?php if ($editable && $task['owner_id'] != $this->user->getId()): ?> +                            - <span><?= $this->url->link(t('Assign to me'), 'TaskModificationController', 'assignToMe', ['task_id' => $task['id'], 'project_id' => $task['project_id']]) ?></span> +                        <?php endif ?>                      </li>                      <?php if ($task['creator_username']): ?>                          <li> @@ -116,12 +119,14 @@                              <span><?= $this->dt->datetime($task['date_due']) ?></span>                          </li>                      <?php endif ?> -                    <?php if ($task['date_started']): ?> -                        <li> -                            <strong><?= t('Started:') ?></strong> +                    <li> +                        <strong><?= t('Started:') ?></strong> +                        <?php if ($task['date_started']): ?>                              <span><?= $this->dt->datetime($task['date_started']) ?></span> -                        </li> -                    <?php endif ?> +                        <?php elseif ($editable): ?> +                            <span><?= $this->url->link(t('Start now'), 'TaskModificationController', 'start', ['task_id' => $task['id'], 'project_id' => $task['project_id']]) ?></span> +                        <?php endif ?> +                    </li>                      <li>                          <strong><?= t('Created:') ?></strong>                          <span><?= $this->dt->datetime($task['date_creation']) ?></span> @@ -164,11 +169,5 @@          )) ?>      <?php endif ?> -    <?php if ($editable && empty($task['date_started'])): ?> -        <div class="buttons-header"> -            <?= $this->url->button('play', t('Set start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> -        </div> -    <?php endif ?> -      <?= $this->hook->render('template:task:details:bottom', array('task' => $task)) ?>  </section> diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php index 44fe6eeb..1bad6615 100644 --- a/app/Template/task/dropdown.php +++ b/app/Template/task/dropdown.php @@ -2,9 +2,14 @@      <a href="#" class="dropdown-menu dropdown-menu-link-icon"><strong>#<?= $task['id'] ?> <i class="fa fa-caret-down"></i></strong></a>      <ul>          <?php if ($this->projectRole->canUpdateTask($task)): ?> +            <?php if (array_key_exists('owner_id', $task) && $task['owner_id'] != $this->user->getId()): ?> +            <li> +                <?= $this->url->icon('hand-o-right', t('Assign to me'), 'TaskModificationController', 'assignToMe', ['task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => isset($redirect) ? $redirect : '']) ?> +            </li> +            <?php endif ?>              <?php if (array_key_exists('date_started', $task) && empty($task['date_started'])): ?>              <li> -                <?= $this->url->icon('play', t('Set the start date automatically'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> +                <?= $this->url->icon('play', t('Set the start date automatically'), 'TaskModificationController', 'start', ['task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => isset($redirect) ? $redirect : '']) ?>              </li>              <?php endif ?>              <li> diff --git a/app/Template/task_list/listing.php b/app/Template/task_list/listing.php index 7891b543..595a190b 100644 --- a/app/Template/task_list/listing.php +++ b/app/Template/task_list/listing.php @@ -15,6 +15,7 @@                  <?= $this->render('task_list/task_title', array(                      'task' => $task,                      'show_items_selection' => true, +                    'redirect' => 'list',                  )) ?>                  <?= $this->render('task_list/task_details', array( diff --git a/app/Template/task_list/task_title.php b/app/Template/task_list/task_title.php index 92d61b6c..662ce1e5 100644 --- a/app/Template/task_list/task_title.php +++ b/app/Template/task_list/task_title.php @@ -3,7 +3,7 @@          <?php if (isset($show_items_selection)): ?>              <input type="checkbox" data-list-item="selectable" name="tasks[]" value="<?= $task['id'] ?>">          <?php endif ?> -        <?= $this->render('task/dropdown', array('task' => $task)) ?> +        <?= $this->render('task/dropdown', array('task' => $task, 'redirect' => isset($redirect) ? $redirect : '')) ?>      <?php else: ?>          <strong><?= '#'.$task['id'] ?></strong>      <?php endif ?> diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 2f197e5f..c3410348 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -193,6 +193,7 @@ return array(      'Kanboard\\Controller\\CommentListController' => $baseDir . '/app/Controller/CommentListController.php',      'Kanboard\\Controller\\CommentMailController' => $baseDir . '/app/Controller/CommentMailController.php',      'Kanboard\\Controller\\ConfigController' => $baseDir . '/app/Controller/ConfigController.php', +    'Kanboard\\Controller\\CronjobController' => $baseDir . '/app/Controller/CronjobController.php',      'Kanboard\\Controller\\CurrencyController' => $baseDir . '/app/Controller/CurrencyController.php',      'Kanboard\\Controller\\CustomFilterController' => $baseDir . '/app/Controller/CustomFilterController.php',      'Kanboard\\Controller\\DashboardController' => $baseDir . '/app/Controller/DashboardController.php', @@ -234,6 +235,7 @@ return array(      'Kanboard\\Controller\\SwimlaneController' => $baseDir . '/app/Controller/SwimlaneController.php',      'Kanboard\\Controller\\TagController' => $baseDir . '/app/Controller/TagController.php',      'Kanboard\\Controller\\TaskAjaxController' => $baseDir . '/app/Controller/TaskAjaxController.php', +    'Kanboard\\Controller\\TaskBulkChangePropertyController' => $baseDir . '/app/Controller/TaskBulkChangePropertyController.php',      'Kanboard\\Controller\\TaskBulkController' => $baseDir . '/app/Controller/TaskBulkController.php',      'Kanboard\\Controller\\TaskBulkMoveColumnController' => $baseDir . '/app/Controller/TaskBulkMoveColumnController.php',      'Kanboard\\Controller\\TaskCreationController' => $baseDir . '/app/Controller/TaskCreationController.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 874359b5..b9e57895 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -319,6 +319,7 @@ class ComposerStaticInitbdc3716ceecc7570f8ff9a8407f0ca0e          'Kanboard\\Controller\\CommentListController' => __DIR__ . '/../..' . '/app/Controller/CommentListController.php',          'Kanboard\\Controller\\CommentMailController' => __DIR__ . '/../..' . '/app/Controller/CommentMailController.php',          'Kanboard\\Controller\\ConfigController' => __DIR__ . '/../..' . '/app/Controller/ConfigController.php', +        'Kanboard\\Controller\\CronjobController' => __DIR__ . '/../..' . '/app/Controller/CronjobController.php',          'Kanboard\\Controller\\CurrencyController' => __DIR__ . '/../..' . '/app/Controller/CurrencyController.php',          'Kanboard\\Controller\\CustomFilterController' => __DIR__ . '/../..' . '/app/Controller/CustomFilterController.php',          'Kanboard\\Controller\\DashboardController' => __DIR__ . '/../..' . '/app/Controller/DashboardController.php', @@ -360,6 +361,7 @@ class ComposerStaticInitbdc3716ceecc7570f8ff9a8407f0ca0e          'Kanboard\\Controller\\SwimlaneController' => __DIR__ . '/../..' . '/app/Controller/SwimlaneController.php',          'Kanboard\\Controller\\TagController' => __DIR__ . '/../..' . '/app/Controller/TagController.php',          'Kanboard\\Controller\\TaskAjaxController' => __DIR__ . '/../..' . '/app/Controller/TaskAjaxController.php', +        'Kanboard\\Controller\\TaskBulkChangePropertyController' => __DIR__ . '/../..' . '/app/Controller/TaskBulkChangePropertyController.php',          'Kanboard\\Controller\\TaskBulkController' => __DIR__ . '/../..' . '/app/Controller/TaskBulkController.php',          'Kanboard\\Controller\\TaskBulkMoveColumnController' => __DIR__ . '/../..' . '/app/Controller/TaskBulkMoveColumnController.php',          'Kanboard\\Controller\\TaskCreationController' => __DIR__ . '/../..' . '/app/Controller/TaskCreationController.php', | 
