From 5d5ba443370df91d59812db5691fa846a9854837 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 9 May 2015 22:09:09 -0400 Subject: Update task links, assignee and time tracking (#775), group links by label (#669) Merge and modification of pull-request #785 --- app/Template/board/tasklinks.php | 3 ++ app/Template/tasklink/create.php | 10 +++- app/Template/tasklink/edit.php | 34 +++++++++++++ app/Template/tasklink/show.php | 100 +++++++++++++++++++++++++++------------ 4 files changed, 115 insertions(+), 32 deletions(-) create mode 100644 app/Template/tasklink/edit.php (limited to 'app/Template') diff --git a/app/Template/board/tasklinks.php b/app/Template/board/tasklinks.php index 9c4f52ca..f934cff9 100644 --- a/app/Template/board/tasklinks.php +++ b/app/Template/board/tasklinks.php @@ -9,6 +9,9 @@ false, $link['is_active'] ? '' : 'task-link-closed' ) ?> + + [e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?>] + diff --git a/app/Template/tasklink/create.php b/app/Template/tasklink/create.php index acf9d6d1..3394271a 100644 --- a/app/Template/tasklink/create.php +++ b/app/Template/tasklink/create.php @@ -5,7 +5,7 @@
formCsrf() ?> - formHidden('task_id', $values) ?> + formHidden('task_id', array('task_id' => $task['id'])) ?> formHidden('opposite_task_id', $values) ?> formLabel(t('Label'), 'link_id') ?> @@ -16,7 +16,13 @@ 'title', $values, $errors, - array('required', 'data-dst-field="opposite_task_id"', 'data-search-url="'.$this->u('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"'), + array( + 'required', + 'placeholder="'.t('Start to type task title...').'"', + 'title="'.t('Start to type task title...').'"', + 'data-dst-field="opposite_task_id"', + 'data-search-url="'.$this->u('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"', + ), 'task-autocomplete') ?>
diff --git a/app/Template/tasklink/edit.php b/app/Template/tasklink/edit.php new file mode 100644 index 00000000..267bd627 --- /dev/null +++ b/app/Template/tasklink/edit.php @@ -0,0 +1,34 @@ + + + + + formCsrf() ?> + formHidden('id', $values) ?> + formHidden('task_id', $values) ?> + formHidden('opposite_task_id', $values) ?> + + formLabel(t('Label'), 'link_id') ?> + formSelect('link_id', $labels, $values, $errors) ?> + + formLabel(t('Task'), 'title') ?> + formText( + 'title', + $values, + $errors, + array( + 'required', + 'placeholder="'.t('Start to type task title...').'"', + 'title="'.t('Start to type task title...').'"', + 'data-dst-field="opposite_task_id"', + 'data-search-url="'.$this->u('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"', + ), + 'task-autocomplete') ?> + +
+ + + a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> +
+ \ No newline at end of file diff --git a/app/Template/tasklink/show.php b/app/Template/tasklink/show.php index 75e3c376..d4a3939b 100644 --- a/app/Template/tasklink/show.php +++ b/app/Template/tasklink/show.php @@ -2,63 +2,103 @@ - + - - - + + + + - - - - + $grouped_links): ?> + + + + + + + + - + - - - + + +
- + formCsrf() ?> formHidden('task_id', array('task_id' => $task['id'])) ?> formHidden('opposite_task_id', array()) ?> - + formSelect('link_id', $link_label_list, array(), array()) ?> - + formText( 'title', array(), array(), - array('required', 'data-dst-field="opposite_task_id"', 'data-search-url="'.$this->u('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"'), + array( + 'required', + 'placeholder="'.t('Start to type task title...').'"', + 'title="'.t('Start to type task title...').'"', + 'data-dst-field="opposite_task_id"', + 'data-search-url="'.$this->u('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"', + ), 'task-autocomplete') ?> - +
+ -- cgit v1.2.3