summaryrefslogtreecommitdiff
path: root/app/Template/project_list/listing.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-19 18:27:57 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-19 18:27:57 -0500
commita43f71dda953ab1ca130af875b221569e4767f05 (patch)
tree33d6f7e650110bbdc5e7bf415b3f5da7735e74d6 /app/Template/project_list/listing.php
parentb5c56d4239c1f4e5c1b7894803c899b595797a26 (diff)
Redesign project list view
Diffstat (limited to 'app/Template/project_list/listing.php')
-rw-r--r--app/Template/project_list/listing.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/app/Template/project_list/listing.php b/app/Template/project_list/listing.php
new file mode 100644
index 00000000..9c5dfe0e
--- /dev/null
+++ b/app/Template/project_list/listing.php
@@ -0,0 +1,47 @@
+<div class="page-header">
+ <ul>
+ <?= $this->hook->render('template:project-list:menu:before') ?>
+
+ <?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 ?>
+
+ <?php if ($this->user->hasAccess('ProjectUserOverviewController', 'managers')): ?>
+ <li><?= $this->url->icon('user', t('Users overview'), 'ProjectUserOverviewController', 'managers') ?></li>
+ <?php endif ?>
+
+ <?php if ($this->user->hasAccess('ProjectGanttController', 'show')): ?>
+ <li><?= $this->url->icon('sliders', t('Projects Gantt chart'), 'ProjectGanttController', 'show') ?></li>
+ <?php endif ?>
+
+ <?= $this->hook->render('template:project-list:menu:after') ?>
+ </ul>
+</div>
+<?php if ($paginator->isEmpty()): ?>
+ <p class="alert"><?= t('There is no project.') ?></p>
+<?php else: ?>
+ <div class="table-list">
+ <?= $this->render('project_list/header', array('paginator' => $paginator)) ?>
+ <?php foreach ($paginator->getCollection() as $project): ?>
+ <div class="table-list-row table-border-left">
+ <?= $this->render('project_list/project_title', array(
+ 'project' => $project,
+ )) ?>
+
+ <?= $this->render('project_list/project_details', array(
+ 'project' => $project,
+ )) ?>
+ </div>
+ <?php endforeach ?>
+ </div>
+
+ <?= $paginator ?>
+<?php endif ?>