summaryrefslogtreecommitdiff
path: root/app/Template/dashboard/overview.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-04-08 13:58:25 -0400
committerFrederic Guillot <fred@kanboard.net>2017-04-08 13:58:25 -0400
commitd7b0cfbbe57fae9afbf9637afa7e54d3bf708747 (patch)
treeced408d01329538bd34b659018a7cd11e04aa982 /app/Template/dashboard/overview.php
parentfe9f3ba707d1caf9348ae17e0566eabd505fbce2 (diff)
Improve dashboard
Diffstat (limited to 'app/Template/dashboard/overview.php')
-rw-r--r--app/Template/dashboard/overview.php93
1 files changed, 93 insertions, 0 deletions
diff --git a/app/Template/dashboard/overview.php b/app/Template/dashboard/overview.php
new file mode 100644
index 00000000..e732a387
--- /dev/null
+++ b/app/Template/dashboard/overview.php
@@ -0,0 +1,93 @@
+<div class="filter-box margin-bottom">
+ <form method="get" action="<?= $this->url->dir() ?>" class="search">
+ <?= $this->form->hidden('controller', array('controller' => 'SearchController')) ?>
+ <?= $this->form->hidden('action', array('action' => 'index')) ?>
+
+ <div class="input-addon">
+ <?= $this->form->text('search', array(), array(), array('placeholder="'.t('Search').'"'), 'input-addon-field') ?>
+ <div class="input-addon-item">
+ <?= $this->render('app/filters_helper') ?>
+ </div>
+ </div>
+ </form>
+</div>
+
+<?php if (! $project_paginator->isEmpty()): ?>
+ <div class="table-list">
+ <?= $this->render('project_list/header', array('paginator' => $project_paginator)) ?>
+ <?php foreach ($project_paginator->getCollection() as $project): ?>
+ <div class="table-list-row table-border-left">
+ <div>
+ <?php if ($this->user->hasProjectAccess('ProjectViewController', 'show', $project['id'])): ?>
+ <?= $this->render('project/dropdown', array('project' => $project)) ?>
+ <?php else: ?>
+ <strong><?= '#'.$project['id'] ?></strong>
+ <?php endif ?>
+
+ <span class="table-list-title <?= $project['is_active'] == 0 ? 'status-closed' : '' ?>">
+ <?= $this->url->link($this->text->e($project['name']), 'BoardViewController', 'show', array('project_id' => $project['id'])) ?>
+ </span>
+
+ <?php if ($project['is_private']): ?>
+ <i class="fa fa-lock fa-fw" title="<?= t('Private project') ?>"></i>
+ <?php endif ?>
+ </div>
+ <div class="table-list-details">
+ <?php foreach ($project['columns'] as $column): ?>
+ <strong title="<?= t('Task count') ?>"><?= $column['nb_open_tasks'] ?></strong>
+ <small><?= $this->text->e($column['title']) ?></small>
+ <?php endforeach ?>
+ </div>
+ </div>
+ <?php endforeach ?>
+ </div>
+
+ <?= $project_paginator ?>
+<?php endif ?>
+
+<?php if (empty($overview_paginator)): ?>
+ <p class="alert"><?= t('There is nothing assigned to you.') ?></p>
+<?php else: ?>
+ <?php foreach ($overview_paginator 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,
+ 'user_id' => $user['id'],
+ )) ?>
+ </div>
+ <?php endforeach ?>
+ </div>
+
+ <?= $result['paginator'] ?>
+ <?php endif ?>
+ <?php endforeach ?>
+<?php endif ?>
+
+<?= $this->hook->render('template:dashboard:show', array('user' => $user)) ?>