Add a board selector instead of the list of projects

This commit is contained in:
Frédéric Guillot
2014-06-20 21:59:59 -03:00
parent 08621f99e6
commit b513313c2f
12 changed files with 62 additions and 19 deletions

View File

@@ -4,15 +4,6 @@
<h2>
<?= t('Project "%s"', $current_project_name) ?>
</h2>
<ul>
<?php foreach ($projects as $project_id => $project_name): ?>
<?php if ($project_id != $current_project_id): ?>
<li>
<a href="?controller=board&amp;action=show&amp;project_id=<?= $project_id ?>"><?= Helper\escape($project_name) ?></a>
</li>
<?php endif ?>
<?php endforeach ?>
</ul>
</div>
<div class="project-menu">

View File

@@ -31,8 +31,14 @@
<?php else: ?>
<header>
<nav>
<a class="logo" href="?">kan<span>board</span></a>
<a class="logo" href="?">kanboard</a>
<ul>
<?php if (isset($board_selector)): ?>
<li>
<?= Helper\form_select('board-selector', $board_selector) ?>
</li>
<?php endif ?>
<li <?= isset($menu) && $menu === 'boards' ? 'class="active"' : '' ?>>
<a href="?controller=board"><?= t('Boards') ?></a>
</li>