summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Template/project_gantt/show.php10
-rw-r--r--app/Template/project_list/show.php14
-rw-r--r--app/Template/project_user_overview/layout.php10
3 files changed, 34 insertions, 0 deletions
diff --git a/app/Template/project_gantt/show.php b/app/Template/project_gantt/show.php
index 74248d5d..725f348d 100644
--- a/app/Template/project_gantt/show.php
+++ b/app/Template/project_gantt/show.php
@@ -1,6 +1,16 @@
<section id="main">
<div class="page-header">
<ul>
+ <?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 ?>
<li>
<?= $this->url->icon('folder', t('Projects list'), 'ProjectListController', 'show') ?>
</li>
diff --git a/app/Template/project_list/show.php b/app/Template/project_list/show.php
index 92101429..a6364585 100644
--- a/app/Template/project_list/show.php
+++ b/app/Template/project_list/show.php
@@ -2,12 +2,26 @@
<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>
diff --git a/app/Template/project_user_overview/layout.php b/app/Template/project_user_overview/layout.php
index 5c739297..9115ef3c 100644
--- a/app/Template/project_user_overview/layout.php
+++ b/app/Template/project_user_overview/layout.php
@@ -1,6 +1,16 @@
<section id="main">
<div class="page-header">
<ul>
+ <?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 ?>
<li>
<?= $this->url->icon('folder', t('Projects list'), 'ProjectListController', 'show') ?>
</li>