2012-08-31 16:18:23 -04:00
|
|
|
<p class="breadcrumbs">
|
|
|
|
<a href="<?= miniMVC\site_url('') ?>">Genres</a> > <?= $genre ?>
|
|
|
|
</p>
|
2012-06-13 13:49:10 -04:00
|
|
|
|
2012-09-13 19:16:51 -04:00
|
|
|
<form class="add" action="<?= miniMVC\site_url("genre/add_category") ?>" method="post">
|
2012-06-13 13:49:10 -04:00
|
|
|
<fieldset>
|
2012-08-31 16:18:23 -04:00
|
|
|
<legend>Add Category</legend>
|
2012-06-13 13:49:10 -04:00
|
|
|
<dl>
|
|
|
|
<!-- Weird tag wrapping is intentional for display: inline-block -->
|
|
|
|
<dt><label for="category">Category name:</label></dt><dd>
|
|
|
|
<input type="text" name="category" id="category" /></dd>
|
|
|
|
|
|
|
|
<dt><input type="hidden" name="genre_id" value="<?= $genre_id ?>" /></dt><dd>
|
2012-09-10 11:45:39 -04:00
|
|
|
<button type="submit" class="save">Add Category</button></dd>
|
2012-06-13 13:49:10 -04:00
|
|
|
</dl>
|
|
|
|
</fieldset>
|
2012-08-31 16:18:23 -04:00
|
|
|
</form>
|
2012-09-13 19:16:51 -04:00
|
|
|
<h3>Categories</h3>
|
|
|
|
<ul class="list">
|
2012-08-31 16:18:23 -04:00
|
|
|
<?php foreach($categories as $id => $cat): ?>
|
2012-09-10 11:45:39 -04:00
|
|
|
<li>
|
2015-06-04 14:30:42 -04:00
|
|
|
<a href="<?= miniMVC\site_url("category/detail/{$id}") ?>"><?= $cat ?></a>
|
|
|
|
<span class="modify" data-type="category" data-id="<?=$id ?>" data-parent="<?=$genre_id ?>">
|
2015-06-04 16:25:47 -04:00
|
|
|
<button class="edit">Edit Category</button>
|
|
|
|
<button class="delete">Delete Category</button>
|
2012-09-10 11:45:39 -04:00
|
|
|
</span>
|
|
|
|
</li>
|
2012-08-31 16:18:23 -04:00
|
|
|
<?php endforeach ?>
|
|
|
|
</ul>
|
|
|
|
|