summaryrefslogtreecommitdiff
path: root/app/Templates/category_index.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-08-30 14:08:46 -0800
committerFrédéric Guillot <fred@kanboard.net>2014-08-30 14:08:46 -0800
commit9194a2604d79ef97994d01c35fb454f745b5412c (patch)
tree365dd4294e536c440610bee4f07a1bffb00d00eb /app/Templates/category_index.php
parente1eba08398c6c6ece684f9db6dedb0dff5d43071 (diff)
Projects management refactoring
Diffstat (limited to 'app/Templates/category_index.php')
-rw-r--r--app/Templates/category_index.php80
1 files changed, 36 insertions, 44 deletions
diff --git a/app/Templates/category_index.php b/app/Templates/category_index.php
index 18e81b78..4635406e 100644
--- a/app/Templates/category_index.php
+++ b/app/Templates/category_index.php
@@ -1,49 +1,41 @@
-<section id="main">
- <div class="page-header">
- <h2><?= t('Categories for the project "%s"', $project['name']) ?></h2>
- <ul>
- <li><a href="?controller=project"><?= t('All projects') ?></a></li>
- </ul>
- </div>
- <section>
-
- <?php if (! empty($categories)): ?>
- <table>
- <tr>
- <th><?= t('Category Name') ?></th>
- <th><?= t('Actions') ?></th>
- </tr>
- <?php foreach ($categories as $category_id => $category_name): ?>
- <tr>
- <td><?= Helper\escape($category_name) ?></td>
- <td>
- <ul>
- <li>
- <a href="?controller=category&amp;action=edit&amp;project_id=<?= $project['id'] ?>&amp;category_id=<?= $category_id ?>"><?= t('Edit') ?></a>
- </li>
- <li>
- <a href="?controller=category&amp;action=confirm&amp;project_id=<?= $project['id'] ?>&amp;category_id=<?= $category_id ?>"><?= t('Remove') ?></a>
- </li>
- </ul>
- </td>
- </tr>
- <?php endforeach ?>
- </table>
- <?php endif ?>
+<div class="page-header">
+ <h2><?= t('Categories') ?></h2>
+</div>
- <h3><?= t('Add a new category') ?></h3>
- <form method="post" action="?controller=category&amp;action=save&amp;project_id=<?= $project['id'] ?>" autocomplete="off">
+<?php if (! empty($categories)): ?>
+<table>
+ <tr>
+ <th><?= t('Category Name') ?></th>
+ <th><?= t('Actions') ?></th>
+ </tr>
+ <?php foreach ($categories as $category_id => $category_name): ?>
+ <tr>
+ <td><?= Helper\escape($category_name) ?></td>
+ <td>
+ <ul>
+ <li>
+ <a href="?controller=category&amp;action=edit&amp;project_id=<?= $project['id'] ?>&amp;category_id=<?= $category_id ?>"><?= t('Edit') ?></a>
+ </li>
+ <li>
+ <a href="?controller=category&amp;action=confirm&amp;project_id=<?= $project['id'] ?>&amp;category_id=<?= $category_id ?>"><?= t('Remove') ?></a>
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+<?php endif ?>
- <?= Helper\form_csrf() ?>
- <?= Helper\form_hidden('project_id', $values) ?>
+<h3><?= t('Add a new category') ?></h3>
+<form method="post" action="?controller=category&amp;action=save&amp;project_id=<?= $project['id'] ?>" autocomplete="off">
- <?= Helper\form_label(t('Category Name'), 'name') ?>
- <?= Helper\form_text('name', $values, $errors, array('autofocus required')) ?>
+ <?= Helper\form_csrf() ?>
+ <?= Helper\form_hidden('project_id', $values) ?>
- <div class="form-actions">
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
- </div>
- </form>
+ <?= Helper\form_label(t('Category Name'), 'name') ?>
+ <?= Helper\form_text('name', $values, $errors, array('autofocus required')) ?>
- </section>
-</section> \ No newline at end of file
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ </div>
+</form> \ No newline at end of file