From 3b3e8033696e408e699b911c042361d62ce7b7ac Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 19 Feb 2017 17:08:00 -0500 Subject: Redesign task list view --- app/Template/board/task_footer.php | 12 ++--- app/Template/board/task_private.php | 3 +- app/Template/task_list/listing.php | 35 ++++++++++++ app/Template/task_list/show.php | 66 ----------------------- app/Template/task_list/sort_menu.php | 32 +++++++++++ app/Template/task_list/task_avatars.php | 20 +++++++ app/Template/task_list/task_details.php | 23 ++++++++ app/Template/task_list/task_icons.php | 94 +++++++++++++++++++++++++++++++++ app/Template/task_list/task_title.php | 11 ++++ 9 files changed, 222 insertions(+), 74 deletions(-) create mode 100644 app/Template/task_list/listing.php delete mode 100644 app/Template/task_list/show.php create mode 100644 app/Template/task_list/sort_menu.php create mode 100644 app/Template/task_list/task_avatars.php create mode 100644 app/Template/task_list/task_details.php create mode 100644 app/Template/task_list/task_icons.php create mode 100644 app/Template/task_list/task_title.php (limited to 'app/Template') diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index 74c1b74d..79b7c3e9 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -57,11 +57,11 @@ - - task-board-date-today + task-date-today $task['date_due']): ?> - task-board-date-overdue + task-date-overdue "> @@ -117,9 +117,9 @@ -
- dt->age($task['date_creation']) ?> - dt->age($task['date_moved']) ?> +
+ dt->age($task['date_creation']) ?> + dt->age($task['date_moved']) ?>
diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php index 1be64fcf..c4afc0bf 100644 --- a/app/Template/board/task_private.php +++ b/app/Template/board/task_private.php @@ -32,6 +32,7 @@
+
user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> render('task/dropdown', array('task' => $task)) ?> @@ -54,8 +55,6 @@
hook->render('template:board:private:task:after-title', array('task' => $task)) ?> - - render('board/task_footer', array( 'task' => $task, 'not_editable' => $not_editable, diff --git a/app/Template/task_list/listing.php b/app/Template/task_list/listing.php new file mode 100644 index 00000000..76803a5c --- /dev/null +++ b/app/Template/task_list/listing.php @@ -0,0 +1,35 @@ +
+ projectHeader->render($project, 'TaskListController', 'show') ?> + + isEmpty()): ?> +

+ isEmpty()): ?> +
+
+ render('task_list/sort_menu', array('paginator' => $paginator)) ?> +
+ getCollection() as $task): ?> +
+ render('task_list/task_title', array( + 'task' => $task, + )) ?> + + render('task_list/task_details', array( + 'task' => $task, + )) ?> + + render('task_list/task_avatars', array( + 'task' => $task, + )) ?> + + render('task_list/task_icons', array( + 'project' => $project, + 'task' => $task, + )) ?> +
+ +
+ + + +
diff --git a/app/Template/task_list/show.php b/app/Template/task_list/show.php deleted file mode 100644 index 8454d13f..00000000 --- a/app/Template/task_list/show.php +++ /dev/null @@ -1,66 +0,0 @@ -
- projectHeader->render($project, 'TaskListController', 'show') ?> - - isEmpty()): ?> -

- isEmpty()): ?> - - - - - - - - - - - - - getCollection() as $task): ?> - - - - - - - - - - - - -
order(t('Id'), 'tasks.id') ?>order(t('Swimlane'), 'tasks.swimlane_id') ?>order(t('Column'), 'tasks.column_id') ?>order(t('Category'), 'tasks.category_id') ?>order(t('Priority'), \Kanboard\Model\TaskModel::TABLE.'.priority') ?>order(t('Title'), 'tasks.title') ?>order(t('Assignee'), 'users.username') ?>order(t('Due date'), 'tasks.date_due') ?>order(t('Status'), 'tasks.is_active') ?>
- user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> - render('task/dropdown', array('task' => $task)) ?> - - # - - - text->e($task['swimlane_name']) ?> - - text->e($task['column_name']) ?> - - text->e($task['category_name']) ?> - - Ptext->e($task['priority'])?> - - url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> - - - text->e($task['assignee_name'] ?: $task['assignee_username']) ?> - - - - - dt->date($task['date_due']) ?> - - - - - - -
- - - -
diff --git a/app/Template/task_list/sort_menu.php b/app/Template/task_list/sort_menu.php new file mode 100644 index 00000000..48081fe0 --- /dev/null +++ b/app/Template/task_list/sort_menu.php @@ -0,0 +1,32 @@ + diff --git a/app/Template/task_list/task_avatars.php b/app/Template/task_list/task_avatars.php new file mode 100644 index 00000000..6a43b1a6 --- /dev/null +++ b/app/Template/task_list/task_avatars.php @@ -0,0 +1,20 @@ + +
+ user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> + class="task-board-change-assignee" + data-url="url->href('TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> + + class="task-board-assignee"> + + avatar->small( + $task['owner_id'], + $task['assignee_username'], + $task['assignee_name'], + $task['assignee_email'], + $task['assignee_avatar_path'], + 'avatar-inline' + ) ?>text->e($task['assignee_name'] ?: $task['assignee_username']) ?> + +
+ \ No newline at end of file diff --git a/app/Template/task_list/task_details.php b/app/Template/task_list/task_details.php new file mode 100644 index 00000000..33ae380a --- /dev/null +++ b/app/Template/task_list/task_details.php @@ -0,0 +1,23 @@ +
+ text->e($task['project_name']) ?> > + text->e($task['swimlane_name']) ?> > + text->e($task['column_name']) ?> + + + + user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> + url->link( + $this->text->e($task['category_name']), + 'TaskModificationController', + 'edit', + array('task_id' => $task['id'], 'project_id' => $task['project_id']), + false, + 'js-modal-medium' . (! empty($task['category_description']) ? ' tooltip' : ''), + ! empty($task['category_description']) ? $this->text->markdownAttribute($task['category_description']) : t('Change category') + ) ?> + + text->e($task['category_name']) ?> + + + +
\ No newline at end of file diff --git a/app/Template/task_list/task_icons.php b/app/Template/task_list/task_icons.php new file mode 100644 index 00000000..da08a43f --- /dev/null +++ b/app/Template/task_list/task_icons.php @@ -0,0 +1,94 @@ +
+ + + text->e($task['reference']) ?> + + + + + + + + + + + + text->e($task['score']) ?> + + + + + + text->e($task['time_spent']) ?>/text->e($task['time_estimated']) ?>h + + + + + + + dt->date($task['date_due']) ?> + + + + + + + + + + + + + + + + + + + + +   + + + +   + + + 0): ?> + user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> + modal->medium( + 'comments-o', + $task['nb_comments'], + 'CommentListController', + 'show', + array('task_id' => $task['id'], 'project_id' => $task['project_id']), + $task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments']) + ) ?> + +   + + + + + + + + + + +
+ dt->age($task['date_creation']) ?> + dt->age($task['date_moved']) ?> +
+ + + + + task->formatPriority($project, $task) ?> +
diff --git a/app/Template/task_list/task_title.php b/app/Template/task_list/task_title.php new file mode 100644 index 00000000..5e9c7284 --- /dev/null +++ b/app/Template/task_list/task_title.php @@ -0,0 +1,11 @@ +
+ user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> + render('task/dropdown', array('task' => $task)) ?> + + + + + + url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])) ?> + +
-- cgit v1.2.3