diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-08-07 12:51:03 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-08-07 12:51:03 -0400 |
commit | 69c6271c6e43451a3da945d60a5435e224e7c782 (patch) | |
tree | 348c8006d407975b1a55fa6eaa78368fba910575 /app/Template/header/creation_dropdown.php | |
parent | 590d2c239637269c66bcc39d7c72fda6a564efcc (diff) |
Convert application header to grid system
Diffstat (limited to 'app/Template/header/creation_dropdown.php')
-rw-r--r-- | app/Template/header/creation_dropdown.php | 22 |
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 ?> |