2012-08-31 16:18:23 -04:00
|
|
|
<p class="breadcrumbs">
|
2015-08-04 16:45:24 -04:00
|
|
|
<a href="<?= \Meta\Base\site_url('') ?>">Genres</a> >
|
|
|
|
<a href="<?= \Meta\Base\site_url('genres/detail/'.$p['genre_id']) ?>"><?= $p['genre'] ?></a> >
|
|
|
|
<a href="<?= \Meta\Base\site_url('category/detail/'.$p['category_id']) ?>"><?= $p['category'] ?></a> >
|
2012-08-31 16:18:23 -04:00
|
|
|
<?= $section ?>
|
|
|
|
</p>
|
2015-08-04 16:45:24 -04:00
|
|
|
<form class="add" action="<?= \Meta\Base\site_url("section/add_data") ?>" method="post" onsubmit="window.edit_wysiwyg.toggle()">
|
2012-08-31 16:18:23 -04:00
|
|
|
<fieldset>
|
|
|
|
<legend>Add Data</legend>
|
|
|
|
<dl>
|
|
|
|
<!-- Weird tag wrapping is intentional for display: inline-block -->
|
|
|
|
<dt><label for="name">Name:</label></dt><dd>
|
|
|
|
<input type="text" name="name[]" id="section" /></dd>
|
|
|
|
|
|
|
|
<dt><label for="val">Value:</label></dt><dd>
|
2015-08-04 16:45:24 -04:00
|
|
|
<textarea id="val2" name="val[]" rows="5" cols="40"></textarea></dd>
|
2012-08-31 16:18:23 -04:00
|
|
|
|
|
|
|
<dt><input type="hidden" name="section_id" value="<?= $section_id ?>" /></dt><dd>
|
2012-09-10 11:45:39 -04:00
|
|
|
<button type="submit" class="save">Save Data</button></dd>
|
2012-08-31 16:18:23 -04:00
|
|
|
</dl>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
2015-06-04 14:30:42 -04:00
|
|
|
|
2012-09-13 19:16:51 -04:00
|
|
|
<h3>Data</h3>
|
2012-08-31 16:18:23 -04:00
|
|
|
<?php if ( ! empty($sdata)): ?>
|
2012-09-12 10:36:43 -04:00
|
|
|
<?php foreach($sdata as $d_id => $d): ?>
|
2012-08-31 16:18:23 -04:00
|
|
|
<?php foreach($d as $k => $v): ?>
|
2015-06-04 14:30:42 -04:00
|
|
|
<?php $class = (strpos($v, "<ul>") !== FALSE || strpos($v, "<br />") !== FALSE) ? 'multiline' : 'pair' ?>
|
2012-08-31 16:18:23 -04:00
|
|
|
<dl class="<?= $class ?>">
|
2012-09-12 10:36:43 -04:00
|
|
|
<dt>
|
|
|
|
<?= $k ?>
|
2015-06-04 14:30:42 -04:00
|
|
|
<span class="modify" data-type="data" data-id="<?=$d_id ?>" data-parent="<?= $section_id ?>">
|
2015-06-04 16:25:47 -04:00
|
|
|
<button class="edit">Edit Data</button>
|
|
|
|
<button class="delete">Delete Data</button>
|
2012-09-12 10:36:43 -04:00
|
|
|
</span>
|
|
|
|
</dt>
|
2012-08-31 16:18:23 -04:00
|
|
|
<dd><?= $v ?></dd>
|
|
|
|
</dl>
|
|
|
|
<?php endforeach ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
<?php endif ?>
|