From 9b34631135f29480dda3ed2df463fbb5aab7c9e4 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 12 Mar 2017 21:36:52 -0400 Subject: Simplify dashboard to use new tasks list view --- app/Template/dashboard/layout.php | 31 ---------------- app/Template/dashboard/projects.php | 55 ----------------------------- app/Template/dashboard/show.php | 70 +++++++++++++++++++++++++++++++++++-- app/Template/dashboard/sidebar.php | 17 --------- app/Template/dashboard/subtasks.php | 45 ------------------------ app/Template/dashboard/tasks.php | 53 ---------------------------- app/Template/task_list/listing.php | 64 ++++++++++++++++----------------- 7 files changed, 98 insertions(+), 237 deletions(-) delete mode 100644 app/Template/dashboard/layout.php delete mode 100644 app/Template/dashboard/projects.php delete mode 100644 app/Template/dashboard/sidebar.php delete mode 100644 app/Template/dashboard/subtasks.php delete mode 100644 app/Template/dashboard/tasks.php (limited to 'app/Template') diff --git a/app/Template/dashboard/layout.php b/app/Template/dashboard/layout.php deleted file mode 100644 index dbd16886..00000000 --- a/app/Template/dashboard/layout.php +++ /dev/null @@ -1,31 +0,0 @@ -
- - -
diff --git a/app/Template/dashboard/projects.php b/app/Template/dashboard/projects.php deleted file mode 100644 index 7e35b059..00000000 --- a/app/Template/dashboard/projects.php +++ /dev/null @@ -1,55 +0,0 @@ - -isEmpty()): ?> -

- - - - - - - - - - getCollection() as $project): ?> - - - - - - - - - -
order('Id', \Kanboard\Model\ProjectModel::TABLE.'.id') ?>order('', \Kanboard\Model\ProjectModel::TABLE.'.is_private') ?>order(t('Project'), \Kanboard\Model\ProjectModel::TABLE.'.name') ?>
- render('project/dropdown', array('project' => $project)) ?> - - - - - - user->hasProjectAccess('TaskGanttController', 'show', $project['id'])): ?> - url->link('', 'TaskGanttController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?> - - - url->link('', 'TaskListController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('List')) ?>  - url->link('', 'CalendarController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Calendar')) ?>  - - url->link($this->text->e($project['name']), 'BoardViewController', 'show', array('project_id' => $project['id'])) ?> - - - - - - - - - - - text->e($column['title']) ?> - -
- - - diff --git a/app/Template/dashboard/show.php b/app/Template/dashboard/show.php index b1d877cf..df5b03e0 100644 --- a/app/Template/dashboard/show.php +++ b/app/Template/dashboard/show.php @@ -1,3 +1,27 @@ + +
-render('dashboard/projects', array('paginator' => $project_paginator, 'user' => $user)) ?> -render('dashboard/tasks', array('paginator' => $task_paginator, 'user' => $user)) ?> -render('dashboard/subtasks', array('paginator' => $subtask_paginator, 'user' => $user)) ?> + +

+ + + isEmpty()): ?> + + +
+ render('task_list/header', array( + 'paginator' => $result['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( + 'task' => $task, + )) ?> + + render('task_list/task_subtasks', array( + 'task' => $task, + )) ?> +
+ +
+ + + + + hook->render('template:dashboard:show', array('user' => $user)) ?> diff --git a/app/Template/dashboard/sidebar.php b/app/Template/dashboard/sidebar.php deleted file mode 100644 index 7507b00d..00000000 --- a/app/Template/dashboard/sidebar.php +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/app/Template/dashboard/subtasks.php b/app/Template/dashboard/subtasks.php deleted file mode 100644 index d86b1ef9..00000000 --- a/app/Template/dashboard/subtasks.php +++ /dev/null @@ -1,45 +0,0 @@ - -isEmpty()): ?> -

- - - - - - - - hook->render('template:dashboard:subtasks:header:before-timetracking', array('paginator' => $paginator)) ?> - - - getCollection() as $subtask): ?> - - - - - - hook->render('template:dashboard:subtasks:rows', array('subtask' => $subtask)) ?> - - - -
order('Id', \Kanboard\Model\TaskModel::TABLE.'.id') ?>order(t('Project'), 'project_name') ?>order(t('Task'), 'task_name') ?>order(t('Subtask'), \Kanboard\Model\SubtaskModel::TABLE.'.title') ?>
- render('task/dropdown', array('task' => array('id' => $subtask['task_id'], 'project_id' => $subtask['project_id']))) ?> - - url->link($this->text->e($subtask['project_name']), 'BoardViewController', 'show', array('project_id' => $subtask['project_id'])) ?> - - url->link($this->text->e($subtask['task_name']), 'TaskViewController', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?> - - subtask->renderToggleStatus(array('project_id' => $subtask['project_id']), $subtask) ?> - - - text->e($subtask['time_spent']).'h' ?> - - - - text->e($subtask['time_estimated']).'h' ?> - -
- - - diff --git a/app/Template/dashboard/tasks.php b/app/Template/dashboard/tasks.php deleted file mode 100644 index 427b903d..00000000 --- a/app/Template/dashboard/tasks.php +++ /dev/null @@ -1,53 +0,0 @@ - -isEmpty()): ?> -

- - - - - - - - - - - - getCollection() as $task): ?> - - - - - - - - - - -
order('Id', \Kanboard\Model\TaskModel::TABLE.'.id') ?>order(t('Project'), 'project_name') ?>order(t('Task'), \Kanboard\Model\TaskModel::TABLE.'.title') ?>order(t('Priority'), \Kanboard\Model\TaskModel::TABLE.'.priority') ?>order(t('Due date'), \Kanboard\Model\TaskModel::TABLE.'.date_due') ?>order(t('Column'), 'column_title') ?>
- render('task/dropdown', array('task' => $task)) ?> - - url->link($this->text->e($task['project_name']), 'BoardViewController', 'show', array('project_id' => $task['project_id'])) ?> - - url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - - = 0): ?> - Ptext->e($task['priority'])?> - - - - text->e($task['time_spent']).'h' ?> - - - - text->e($task['time_estimated']).'h' ?> - - - dt->date($task['date_due']) ?> - - text->e($task['column_title']) ?> -
- - - diff --git a/app/Template/task_list/listing.php b/app/Template/task_list/listing.php index b3c66aa6..97393972 100644 --- a/app/Template/task_list/listing.php +++ b/app/Template/task_list/listing.php @@ -1,40 +1,38 @@ -
- projectHeader->render($project, 'TaskListController', 'show') ?> +projectHeader->render($project, 'TaskListController', 'show') ?> - isEmpty()): ?> -

- isEmpty()): ?> -
- render('task_list/header', array( - 'paginator' => $paginator, - 'project' => $project, - )) ?> +isEmpty()): ?> +

+isEmpty()): ?> +
+ render('task_list/header', array( + 'paginator' => $paginator, + 'project' => $project, + )) ?> - getCollection() as $task): ?> -
- render('task_list/task_title', array( - 'task' => $task, - )) ?> + getCollection() as $task): ?> +
+ render('task_list/task_title', array( + 'task' => $task, + )) ?> - render('task_list/task_details', array( - 'task' => $task, - )) ?> + render('task_list/task_details', array( + 'task' => $task, + )) ?> - render('task_list/task_avatars', array( - 'task' => $task, - )) ?> + render('task_list/task_avatars', array( + 'task' => $task, + )) ?> - render('task_list/task_icons', array( - 'task' => $task, - )) ?> + render('task_list/task_icons', array( + 'task' => $task, + )) ?> - render('task_list/task_subtasks', array( - 'task' => $task, - )) ?> -
- -
+ render('task_list/task_subtasks', array( + 'task' => $task, + )) ?> +
+ +
- - -
+ + -- cgit v1.2.3