summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-02-16 17:28:11 -0500
committerFrederic Guillot <fred@kanboard.net>2016-02-16 17:28:11 -0500
commit5bbc903dcab12dcf53abc40bf67c2cd7898e0420 (patch)
tree9dfe65b5837ca42c6a9352b738dcc381151fbb19 /app/Template
parent5272a7a980ed192a87d2319a51c8185670f62141 (diff)
Start to implement a project overview page
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/project_header/views.php12
-rw-r--r--app/Template/project_overview/show.php66
2 files changed, 74 insertions, 4 deletions
diff --git a/app/Template/project_header/views.php b/app/Template/project_header/views.php
index 1219a213..f8fdbb02 100644
--- a/app/Template/project_header/views.php
+++ b/app/Template/project_header/views.php
@@ -1,18 +1,22 @@
<ul class="views">
- <li <?= $filters['controller'] === 'board' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->getRouterController() === 'ProjectOverview' ? 'class="active"' : '' ?>>
+ <i class="fa fa-eye fa-fw"></i>
+ <?= $this->url->link(t('Overview'), 'ProjectOverview', 'show', array('project_id' => $project['id']), false, 'view-overview', t('Keyboard shortcut: "%s"', 'v o')) ?>
+ </li>
+ <li <?= $this->app->getRouterController() === 'Board' ? 'class="active"' : '' ?>>
<i class="fa fa-th fa-fw"></i>
<?= $this->url->link(t('Board'), 'board', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-board', t('Keyboard shortcut: "%s"', 'v b')) ?>
</li>
- <li <?= $filters['controller'] === 'calendar' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->getRouterController() === 'Calendar' ? 'class="active"' : '' ?>>
<i class="fa fa-calendar fa-fw"></i>
<?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-calendar', t('Keyboard shortcut: "%s"', 'v c')) ?>
</li>
- <li <?= $filters['controller'] === 'listing' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->getRouterController() === 'Listing' ? 'class="active"' : '' ?>>
<i class="fa fa-list fa-fw"></i>
<?= $this->url->link(t('List'), 'listing', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-listing', t('Keyboard shortcut: "%s"', 'v l')) ?>
</li>
<?php if ($this->user->hasProjectAccess('gantt', 'project', $project['id'])): ?>
- <li <?= $filters['controller'] === 'gantt' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->getRouterController() === 'Gantt' ? 'class="active"' : '' ?>>
<i class="fa fa-sliders fa-fw"></i>
<?= $this->url->link(t('Gantt'), 'gantt', 'project', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-gantt', t('Keyboard shortcut: "%s"', 'v g')) ?>
</li>
diff --git a/app/Template/project_overview/show.php b/app/Template/project_overview/show.php
new file mode 100644
index 00000000..b53b1c26
--- /dev/null
+++ b/app/Template/project_overview/show.php
@@ -0,0 +1,66 @@
+<section id="main">
+ <?= $this->render('project_header/header', array(
+ 'project' => $project,
+ 'filters' => $filters,
+ )) ?>
+
+ <div class="project-overview-columns">
+ <?php foreach ($project['columns'] as $column): ?>
+ <div class="project-overview-column">
+ <strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong><br>
+ <span><?= $this->e($column['title']) ?></span>
+ </div>
+ <?php endforeach ?>
+ </div>
+
+ <?php if (! empty($project['description'])): ?>
+ <div class="page-header">
+ <h2><?= $this->e($project['name']) ?></h2>
+ </div>
+ <article class="markdown">
+ <?= $this->text->markdown($project['description']) ?>
+ </article>
+ <?php endif ?>
+
+ <div class="page-header">
+ <h2><?= t('Information') ?></h2>
+ </div>
+ <div class="listing">
+ <ul>
+
+ <?php if ($project['owner_id'] > 0): ?>
+ <li><?= t('Project owner: ') ?><strong><?= $this->e($project['owner_name'] ?: $project['owner_username']) ?></strong></li>
+ <?php endif ?>
+
+ <?php if (! empty($users)): ?>
+ <?php foreach ($roles as $role => $role_name): ?>
+ <?php if (isset($users[$role])): ?>
+ <li>
+ <?= $role_name ?>:
+ <strong><?= implode(', ', $users[$role]) ?></strong>
+ </li>
+ <?php endif ?>
+ <?php endforeach ?>
+ <?php endif ?>
+
+ <?php if ($project['start_date']): ?>
+ <li><?= t('Start date: ').$this->dt->date($project['start_date']) ?></li>
+ <?php endif ?>
+
+ <?php if ($project['end_date']): ?>
+ <li><?= t('End date: ').$this->dt->date($project['end_date']) ?></li>
+ <?php endif ?>
+
+ <?php if ($project['is_public']): ?>
+ <li><i class="fa fa-share-alt"></i> <?= $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li>
+ <li><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'feed', 'project', array('token' => $project['token']), false, '', '', true) ?></li>
+ <li><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ical', 'project', array('token' => $project['token'])) ?></li>
+ <?php endif ?>
+ </ul>
+ </div>
+
+ <div class="page-header">
+ <h2><?= t('Last activity') ?></h2>
+ </div>
+ <?= $this->render('event/events', array('events' => $events)) ?>
+</section>