diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-10-05 19:40:57 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-10-05 19:40:57 -0400 |
commit | d138834dcf902534f78237939926e97fd9a0eebe (patch) | |
tree | a6247b9ed98079899c9e21d43044030b69088bee /app/Templates/project_index.php | |
parent | 7f5a871f84639a90eebd0ac1d0ee7f759e220cf6 (diff) |
Regular users are able to create private projects
Diffstat (limited to 'app/Templates/project_index.php')
-rw-r--r-- | app/Templates/project_index.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/app/Templates/project_index.php b/app/Templates/project_index.php index 8b103c52..044ab95f 100644 --- a/app/Templates/project_index.php +++ b/app/Templates/project_index.php @@ -1,11 +1,12 @@ <section id="main"> <div class="page-header"> <h2><?= t('Projects') ?><span id="page-counter"> (<?= $nb_projects ?>)</span></h2> - <?php if (Helper\is_admin()): ?> <ul> - <li><a href="?controller=project&action=create"><?= t('New project') ?></a></li> + <?php if (Helper\is_admin()): ?> + <li><?= Helper\a(t('New project'), 'project', 'create') ?></li> + <?php endif ?> + <li><?= Helper\a(t('New private project'), 'project', 'create', array('private' => 1)) ?></li> </ul> - <?php endif ?> </div> <section> <?php if (empty($active_projects) && empty($inactive_projects)): ?> @@ -17,7 +18,10 @@ <ul class="project-listing"> <?php foreach ($active_projects as $project): ?> <li> - <a href="?controller=project&action=show&project_id=<?= $project['id'] ?>"><?= Helper\escape($project['name']) ?></a> + <?php if ($project['is_private']): ?> + <i class="fa fa-lock"></i> + <?php endif ?> + <?= Helper\a(Helper\escape($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?> </li> <?php endforeach ?> </ul> @@ -28,7 +32,10 @@ <ul class="project-listing"> <?php foreach ($inactive_projects as $project): ?> <li> - <a href="?controller=project&action=show&project_id=<?= $project['id'] ?>"><?= Helper\escape($project['name']) ?></a> + <?php if ($project['is_private']): ?> + <i class="fa fa-lock"></i> + <?php endif ?> + <?= Helper\a(Helper\escape($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?> </li> <?php endforeach ?> </ul> |