From 18cb7ad0a4a96be63030f5207b74a195c8b6cd6c Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 24 Jun 2016 15:43:34 -0400 Subject: Expose tags to the user interface (first prototype) --- app/Template/board/task_footer.php | 10 ++ app/Template/task/details.php | 259 ++++++++++++++------------- app/Template/task/public.php | 7 +- app/Template/task/show.php | 1 + app/Template/task_creation/show.php | 4 +- app/Template/task_gantt_creation/show.php | 5 +- app/Template/task_modification/edit_task.php | 4 +- 7 files changed, 158 insertions(+), 132 deletions(-) (limited to 'app/Template') diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index f6cbff70..37d13605 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -18,6 +18,16 @@ + +
+ +
+ +
diff --git a/app/Template/task/details.php b/app/Template/task/details.php index fe2bba67..695957f9 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -4,146 +4,157 @@ hook->render('template:task:details:top', array('task' => $task)) ?>
-
-
    -
  • - - - - - - - - -
  • -
  • - -
  • - +
    +
    +
    • - text->e($task['reference']) ?> + + + + + + + +
    • - -
    • - text->e($task['score']) ?> +
    • - - -
    • - - url->link(t('Public link'), 'TaskViewController', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?> -
    • - - -
    • - - url->link(t('Back to the board'), 'BoardViewController', 'readonly', array('token' => $project['token'])) ?> -
    • - -
    • + +
    • + text->e($task['reference']) ?> +
    • + + +
    • + text->e($task['score']) ?> +
    • + + +
    • + + url->link(t('Public link'), 'TaskViewController', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?> +
    • + + +
    • + + url->link(t('Back to the board'), 'BoardViewController', 'readonly', array('token' => $project['token'])) ?> +
    • + +
    • - hook->render('template:task:details:first-column', array('task' => $task)) ?> -
    -
    -
    -
      - + hook->render('template:task:details:first-column', array('task' => $task)) ?> +
    +
    +
    +
      + +
    • + + text->e($task['category_name']) ?> +
    • + + +
    • + + text->e($task['swimlane_name']) ?> +
    • +
    • - - text->e($task['category_name']) ?> + + text->e($task['column_title']) ?>
    • - -
    • - - text->e($task['swimlane_name']) ?> + +
    • - -
    • - - text->e($task['column_title']) ?> -
    • -
    • - - -
    • - hook->render('template:task:details:second-column', array('task' => $task)) ?> -
    -
    -
    -
      -
    • - - - - text->e($task['assignee_name'] ?: $task['assignee_username']) ?> - - + hook->render('template:task:details:second-column', array('task' => $task)) ?> +
    +
    +
    +
      +
    • + + + + text->e($task['assignee_name'] ?: $task['assignee_username']) ?> + + + + +
    • + +
    • + + text->e($task['creator_name'] ?: $task['creator_username']) ?> +
    • + + +
    • + + dt->date($task['date_due']) ?> +
    • + + +
    • + + +
    • - - - +
    • - - text->e($task['creator_name'] ?: $task['creator_username']) ?> + +
    • - - -
    • - - dt->date($task['date_due']) ?> -
    • - - -
    • - - -
    • - - -
    • - - -
    • - + - hook->render('template:task:details:third-column', array('task' => $task)) ?> -
    -
    -
    -
      -
    • - - dt->datetime($task['date_creation']) ?> -
    • -
    • - - dt->datetime($task['date_modification']) ?> -
    • - -
    • - - dt->datetime($task['date_completed']) ?> -
    • - - -
    • - - dt->datetime($task['date_started']) ?> -
    • - - -
    • - - dt->datetime($task['date_moved']) ?> -
    • - + hook->render('template:task:details:third-column', array('task' => $task)) ?> +
    +
    +
    +
      +
    • + + dt->datetime($task['date_creation']) ?> +
    • +
    • + + dt->datetime($task['date_modification']) ?> +
    • + +
    • + + dt->datetime($task['date_completed']) ?> +
    • + + +
    • + + dt->datetime($task['date_started']) ?> +
    • + + +
    • + + dt->datetime($task['date_moved']) ?> +
    • + - hook->render('template:task:details:fourth-column', array('task' => $task)) ?> -
    + hook->render('template:task:details:fourth-column', array('task' => $task)) ?> +
+
+ +
+
    + +
  • text->e($tag) ?>
  • + +
+
+
diff --git a/app/Template/task/public.php b/app/Template/task/public.php index 94782163..b8405ff7 100644 --- a/app/Template/task/public.php +++ b/app/Template/task/public.php @@ -1,5 +1,10 @@
- render('task/details', array('task' => $task, 'project' => $project, 'editable' => false)) ?> + render('task/details', array( + 'task' => $task, + 'tags' => $tags, + 'project' => $project, + 'editable' => false, + )) ?> render('task/description', array( 'task' => $task, diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 2b54eea8..80786715 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -2,6 +2,7 @@ render('task/details', array( 'task' => $task, + 'tags' => $tags, 'project' => $project, 'editable' => $this->user->hasProjectAccess('TaskModificationController', 'edit', $project['id']), )) ?> diff --git a/app/Template/task_creation/show.php b/app/Template/task_creation/show.php index 7bebbfe9..cd752eba 100644 --- a/app/Template/task_creation/show.php +++ b/app/Template/task_creation/show.php @@ -7,8 +7,7 @@ form->csrf() ?>
- form->label(t('Title'), 'title') ?> - form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"'), 'form-input-large') ?> + task->selectTitle($values, $errors) ?> form->label(t('Description'), 'description') ?> form->textarea( @@ -23,6 +22,7 @@ 'markdown-editor' ) ?> + task->selectTags($project) ?> render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?> diff --git a/app/Template/task_gantt_creation/show.php b/app/Template/task_gantt_creation/show.php index 683bc8c8..d1bfa67c 100644 --- a/app/Template/task_gantt_creation/show.php +++ b/app/Template/task_gantt_creation/show.php @@ -8,12 +8,11 @@ form->hidden('position', $values) ?>
- form->label(t('Title'), 'title') ?> - form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"'), 'form-input-large') ?> + task->selectTitle($values, $errors) ?> form->label(t('Description'), 'description') ?> form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"', 'tabindex="2"'), 'markdown-editor') ?> - + task->selectTags($project) ?> render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?>
diff --git a/app/Template/task_modification/edit_task.php b/app/Template/task_modification/edit_task.php index 0707fd9a..d8f18743 100644 --- a/app/Template/task_modification/edit_task.php +++ b/app/Template/task_modification/edit_task.php @@ -7,8 +7,8 @@ form->hidden('project_id', $values) ?>
- form->label(t('Title'), 'title') ?> - form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"')) ?> + task->selectTitle($values, $errors) ?> + task->selectTags($project, $tags) ?> task->selectAssignee($users_list, $values, $errors) ?> task->selectCategory($categories_list, $values, $errors) ?> task->selectPriority($project, $values) ?> -- cgit v1.2.3