--- /dev/null
+<?php if(!empty($TemplateData['loadedCollection'])) { ?>
+
+ <h3 class="uk-h3">Manage Tags in: <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>"><?php echo $TemplateData['loadedCollection']['name']; ?></a></h3>
+ <p>
+ The actions are top down. If you choose to move and rename, only move will be executed.<br />
+ Deletion will remove without recover!<br />
+ If you rename and input an existing one a move will be done instead.<br />
+ Tag values are stored how they come and treated that way here (case sensitive).
+ In search they are case insensitive.
+ </p>
+
+ <?php if(!empty($TemplateData['tags'])) { ?>
+ <form method="post">
+ <?php foreach($TemplateData['tags'] as $k=>$v) { ?>
+ <div class="field-row">
+ <h4 class="uk-heading-line"><?php echo $v['displayname']; ?></h4>
+ </div>
+ <div class="field-row">
+ <label for="<?php echo $v['id']; ?>_use">Use</label>
+ <select name="fdata[<?php echo $v['id']; ?>][use]" id="<?php echo $v['id']; ?>_use">
+ <option value="">Please select</option>
+ <?php foreach($v['entries'] as $ek=>$ev) { ?>
+ <option value="<?php echo $ev; ?>"><?php echo $ev; ?></option>
+ <?php } ?>
+ </select>
+
+ <label for="<?php echo $v['id']; ?>_move">Move to (rename to existing)</label>
+ <select name="fdata[<?php echo $v['id']; ?>][move]" id="<?php echo $v['id']; ?>_move">
+ <option value="">Please select</option>
+ <?php foreach($v['entries'] as $ek=>$ev) { ?>
+ <option value="<?php echo $ev; ?>"><?php echo $ev; ?></option>
+ <?php } ?>
+ </select>
+
+ <label for="<?php echo $v['id']; ?>_rename" >Rename</label>
+ <input type="text" autocomplete="off"
+ name="fdata[<?php echo $v['id']; ?>][rename]" id="<?php echo $v['id']; ?>_rename">
+
+ <input type="checkbox" name="fdata[<?php echo $v['id']; ?>][doDelete]" value="1"
+ id="<?php echo $v['id']; ?>_doDelete">
+ <label for="<?php echo $v['id']; ?>_doDelete">Delete</label>
+ </div>
+ <?php } ?>
+
+ <div class="field-row">
+ <input type="submit" name="submitForm" value="Save" />
+ </div>
+ </form>
+ <?php } ?>
+
+<?php } else { ?>
+<h3>Please select a collection first</h3>
+<div class="sunken-panel">
+ <table width="100%">
+ <thead>
+ <tr>
+ <th width="100px">Name</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach($TemplateData['collections'] as $k=>$v) { ?>
+ <tr>
+ <td><a href="index.php?p=managetags&collection=<?php echo $k; ?>"><?php echo $v['name']; ?></a></td>
+ <td><?php echo $v['description']; ?></td>
+ <tr>
+ <?php } ?>
+ </tbody>
+ </table>
+</div>
+<?php } ?>
?>
<menu role="tablist">
-
<?php foreach($_menuShow as $entry) { ?>
<li role="tab" <?php if($_requestMode == $entry['action']) echo 'aria-selected="true"'; ?>>
<a href="index.php?p=<?php echo $entry['action']; ?>"><?php echo $entry['text']; ?></a>
</li>
- <?php }
- if(!empty($_menuManage)) {
- foreach($_menuManage as $entry) { ?>
- <li role="tab" <?php if($_requestMode == $entry['action']) echo 'aria-selected="true"'; ?>>
- <a href="index.php?p=<?php echo $entry['action']; ?>"><?php echo $entry['text']; ?></a>
- </li>
- <?php }
- } ?>
+ <?php } ?>
<li role="tab">
<a href="index.php?p=auth">
<?php if($Doomguy->isSignedIn() === true) { echo "Logout"; } else { echo "Login"; } ?>
<li role="tab">
<a id="showNavSearch" href="#" onclick="showNavSearch();">Search</a>
</li>
- <li role="tag" <?php if($_requestMode == 'advancedsearch') echo 'aria-selected="true"'; ?>>
+ <li role="tab" <?php if($_requestMode == 'advancedsearch') echo 'aria-selected="true"'; ?>>
<a href="index.php?p=advancedsearch">Advanced search</a>
</li>
+<?php if(!empty($_menuManage)) { ?>
+ <li role="tab"><a href="">Manage:</a></li>
+ <?php foreach($_menuManage as $entry) { ?>
+ <li role="tab" <?php if($_requestMode == $entry['action']) echo 'aria-selected="true"'; ?>>
+ <a href="index.php?p=<?php echo $entry['action']; ?>"><?php echo $entry['text']; ?></a>
+ </li>
+ <?php } ?>
+<?php } ?>
</menu>
+
<dialog id="navSearchDialog" class="window">
<div class="title-bar">
<div class="title-bar-text">Search</div>