--- /dev/null
+<?php if(!empty($TemplateData['search'])) { ?>
+<div class="window">
+ <div class="title-bar">
+ <div class="title-bar-text">Search</div>
+ <div class="title-bar-controls">
+ <button aria-label="Close" id="searchNoteWindowCloseButton"></button>
+ </div>
+ </div>
+ <div class="window-body">
+ <p>Display result for: <b><?php echo $TemplateData['search']; ?></b></p>
+ </div>
+</div>
+<script>
+ const searchNoteWindowCloseButton = document.getElementById('searchNoteWindowCloseButton');
+ searchNoteWindowCloseButton.addEventListener('click', () => {
+ window.location.href="index.php?p=tags&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>";
+ });
+</script>
+<?php } ?>
+
+<?php if(!empty($TemplateData['tags'])) { ?>
+ <h3>Tags for: <a href="index.php?p=collections&collection=<?php echo Summoner::ifset($TemplateData['loadedCollection'], 'id'); ?>"><?php echo Summoner::ifset($TemplateData['loadedCollection'], 'name'); ?></a></h3>
+
+ <?php foreach($TemplateData['tags'] as $k=>$v) { ?>
+ <h4 ><?php echo $v['displayname']; ?></h4>
+ <p>
+ <?php foreach($v['entries'] as $ek=>$ev) { ?>
+ <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $v['identifier']; ?>&fv=<?php echo urlencode($ev); ?>"><?php echo $ev; ?></a>,
+ <?php } ?>
+ </p>
+ <?php } ?>
+
+<?php } elseif(!empty($TemplateData['collections'])) { ?>
+ <h3>Please select a collection first</h3>
+ <div class="sunken-panel">
+ <table width="100%">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach($TemplateData['collections'] as $k=>$v) { ?>
+ <tr>
+ <td><a href="index.php?p=tags&collection=<?php echo $k; ?>"><?php echo $v['name']; ?></a></td>
+ <td><?php echo $v['description']; ?></td>
+ <tr>
+ <?php } ?>
+ </tbody>
+ </table>
+ </div>
+<?php } ?>