diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-02-13 12:39:49 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-02-13 12:39:49 -0500 |
commit | 567d623446d7e98393fb542c88d6d3b18b05cf6f (patch) | |
tree | 5371d19e82be3f11bc5cd8bf931d3425ef90a435 /app/Template | |
parent | 5d20b93b3a4a9321c7f1126e005b1dd8cfae7324 (diff) |
Add setting option to disable private projects
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/app/layout.php | 2 | ||||
-rw-r--r-- | app/Template/config/project.php | 1 | ||||
-rw-r--r-- | app/Template/header.php | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/app/Template/app/layout.php b/app/Template/app/layout.php index 0550cef4..200cb0d7 100644 --- a/app/Template/app/layout.php +++ b/app/Template/app/layout.php @@ -7,10 +7,12 @@ <?= $this->url->link(t('New project'), 'ProjectCreation', 'create', array(), false, 'popover') ?> </li> <?php endif ?> + <?php if ($this->app->config('disable_private_project', 0) == 0): ?> <li> <i class="fa fa-lock fa-fw"></i> <?= $this->url->link(t('New private project'), 'ProjectCreation', 'createPrivate', array(), false, 'popover') ?> </li> + <?php endif ?> <li> <i class="fa fa-search fa-fw"></i> <?= $this->url->link(t('Search'), 'search', 'index') ?> diff --git a/app/Template/config/project.php b/app/Template/config/project.php index a212f65f..1d32a14f 100644 --- a/app/Template/config/project.php +++ b/app/Template/config/project.php @@ -16,6 +16,7 @@ <?= $this->form->text('project_categories', $values, $errors) ?> <p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p> + <?= $this->form->checkbox('disable_private_project', t('Disable private projects'), 1, isset($values['disable_private_project']) && $values['disable_private_project'] == 1) ?> <?= $this->form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?> <?= $this->form->checkbox('subtask_time_tracking', t('Trigger automatically subtask time tracking'), 1, $values['subtask_time_tracking'] == 1) ?> <?= $this->form->checkbox('cfd_include_closed_tasks', t('Include closed tasks in the cumulative flow diagram'), 1, $values['cfd_include_closed_tasks'] == 1) ?> diff --git a/app/Template/header.php b/app/Template/header.php index 72d89b80..a945411e 100644 --- a/app/Template/header.php +++ b/app/Template/header.php @@ -44,9 +44,11 @@ <?php if ($this->user->hasAccess('ProjectCreation', 'create')): ?> <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New project'), 'ProjectCreation', 'create', array(), false, 'popover') ?></li> <?php endif ?> + <?php if ($this->app->config('disable_private_project', 0) == 0): ?> <li> <i class="fa fa-lock fa-fw"></i><?= $this->url->link(t('New private project'), 'ProjectCreation', 'createPrivate', array(), false, 'popover') ?> </li> + <?php endif ?> </ul> </div> |