]> 91.132.146.200 Git - bibliotheca-php.git/commitdiff
theme 98 tags view
authorBanana <mail@bananas-playground.net>
Mon, 10 Apr 2023 10:06:15 +0000 (12:06 +0200)
committerBanana <mail@bananas-playground.net>
Mon, 10 Apr 2023 10:06:15 +0000 (12:06 +0200)
webclient/view/98/tags/tags.html [new file with mode: 0644]

diff --git a/webclient/view/98/tags/tags.html b/webclient/view/98/tags/tags.html
new file mode 100644 (file)
index 0000000..e63ee27
--- /dev/null
@@ -0,0 +1,53 @@
+<?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 } ?>