diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-03-12 21:36:52 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-03-12 21:36:52 -0400 |
commit | 9b34631135f29480dda3ed2df463fbb5aab7c9e4 (patch) | |
tree | 46da2f342a440cc699b7aa9c61bd18d0d2ea01f5 /app/Template/dashboard/show.php | |
parent | f6b42eb8024b7db959f6d75118b3de0f96301262 (diff) |
Simplify dashboard to use new tasks list view
Diffstat (limited to 'app/Template/dashboard/show.php')
-rw-r--r-- | app/Template/dashboard/show.php | 70 |
1 files changed, 67 insertions, 3 deletions
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 @@ +<div class="page-header"> + <ul> + <?php if ($this->user->hasAccess('ProjectCreationController', 'create')): ?> + <li> + <?= $this->modal->medium('plus', t('New project'), 'ProjectCreationController', 'create') ?> + </li> + <?php endif ?> + <?php if ($this->app->config('disable_private_project', 0) == 0): ?> + <li> + <?= $this->modal->medium('lock', t('New private project'), 'ProjectCreationController', 'createPrivate') ?> + </li> + <?php endif ?> + <li> + <?= $this->url->icon('folder', t('Project management'), 'ProjectListController', 'show') ?> + </li> + <li> + <?= $this->modal->medium('dashboard', t('My activity stream'), 'ActivityController', 'user') ?> + </li> + <li> + <?= $this->modal->medium('calendar', t('My calendar'), 'CalendarController', 'user') ?> + </li> + </ul> +</div> + <div class="filter-box margin-bottom"> <form method="get" action="<?= $this->url->dir() ?>" class="search"> <?= $this->form->hidden('controller', array('controller' => 'SearchController')) ?> @@ -12,8 +36,48 @@ </form> </div> -<?= $this->render('dashboard/projects', array('paginator' => $project_paginator, 'user' => $user)) ?> -<?= $this->render('dashboard/tasks', array('paginator' => $task_paginator, 'user' => $user)) ?> -<?= $this->render('dashboard/subtasks', array('paginator' => $subtask_paginator, 'user' => $user)) ?> +<?php if (empty($results)): ?> + <p class="alert"><?= t('There is nothing assigned to you.') ?></p> +<?php else: ?> + <?php foreach ($results as $result): ?> + <?php if (! $result['paginator']->isEmpty()): ?> + <div class="page-header"> + <h2><?= $this->url->link($this->text->e($result['project_name']), 'BoardViewController', 'show', array('project_id' => $result['project_id'])) ?></h2> + </div> + + <div class="table-list"> + <?= $this->render('task_list/header', array( + 'paginator' => $result['paginator'], + )) ?> + + <?php foreach ($result['paginator']->getCollection() as $task): ?> + <div class="table-list-row color-<?= $task['color_id'] ?>"> + <?= $this->render('task_list/task_title', array( + 'task' => $task, + )) ?> + + <?= $this->render('task_list/task_details', array( + 'task' => $task, + )) ?> + + <?= $this->render('task_list/task_avatars', array( + 'task' => $task, + )) ?> + + <?= $this->render('task_list/task_icons', array( + 'task' => $task, + )) ?> + + <?= $this->render('task_list/task_subtasks', array( + 'task' => $task, + )) ?> + </div> + <?php endforeach ?> + </div> + + <?= $result['paginator'] ?> + <?php endif ?> + <?php endforeach ?> +<?php endif ?> <?= $this->hook->render('template:dashboard:show', array('user' => $user)) ?> |