summaryrefslogtreecommitdiff
path: root/app/Template/header/creation_dropdown.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-08-07 12:51:03 -0400
committerFrederic Guillot <fred@kanboard.net>2016-08-07 12:51:03 -0400
commit69c6271c6e43451a3da945d60a5435e224e7c782 (patch)
tree348c8006d407975b1a55fa6eaa78368fba910575 /app/Template/header/creation_dropdown.php
parent590d2c239637269c66bcc39d7c72fda6a564efcc (diff)
Convert application header to grid system
Diffstat (limited to 'app/Template/header/creation_dropdown.php')
-rw-r--r--app/Template/header/creation_dropdown.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/Template/header/creation_dropdown.php b/app/Template/header/creation_dropdown.php
new file mode 100644
index 00000000..d3b9e7cb
--- /dev/null
+++ b/app/Template/header/creation_dropdown.php
@@ -0,0 +1,22 @@
+<?php $has_project_creation_access = $this->user->hasAccess('ProjectCreationController', 'create'); ?>
+<?php $is_private_project_enabled = $this->app->config('disable_private_project', 0) == 0; ?>
+
+<?php if ($has_project_creation_access || (!$has_project_creation_access && $is_private_project_enabled)): ?>
+ <div class="dropdown">
+ <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-plus fa-fw"></i><i class="fa fa-caret-down"></i></a>
+ <ul>
+ <?php if ($has_project_creation_access): ?>
+ <li><i class="fa fa-plus fa-fw"></i>
+ <?= $this->url->link(t('New project'), 'ProjectCreationController', 'create', array(), false, 'popover') ?>
+ </li>
+ <?php endif ?>
+ <?php if ($is_private_project_enabled): ?>
+ <li>
+ <i class="fa fa-lock fa-fw"></i>
+ <?= $this->url->link(t('New private project'), 'ProjectCreationController', 'createPrivate', array(), false, 'popover') ?>
+ </li>
+ <?php endif ?>
+ <?= $this->hook->render('template:header:creation-dropdown') ?>
+ </ul>
+ </div>
+<?php endif ?>