]> 91.132.146.200 Git - bibliotheca-php.git/commitdiff
fixed #5 and added #1
authorBanana <mail@bananas-playground.net>
Sat, 3 Apr 2021 16:24:54 +0000 (18:24 +0200)
committerBanana <mail@bananas-playground.net>
Sat, 3 Apr 2021 16:24:54 +0000 (18:24 +0200)
CHANGELOG
webclient/view/default/advancedsearch/advancedsearch.html
webclient/view/default/collections/collections.html
webclient/view/default/collections/collections_pagination.html [new file with mode: 0644]
webclient/view/default/tool/tool-imdbweb.html

index 5804c49accbe36b63da0281180fa3674ffb6e4ba..e65a485f54308a2e142d942940421f2113a7bb0e 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -25,6 +25,8 @@
                Currently used to allow whitespace in a tag
        * Mass edit of entries. Entries found with advanced search can now be editied.
                Upload fields are not supported yet.
+       * Fixed bug #5
+       * Added feature #1. Collections overview has pagination at the bottom too.
 
 1.0 - Castle 20210106
        * First usable version
index b46a57ab18901c078e574ad5b22dc54bfeac86c8..13ec271fdf5ac74f694a8c1be12f57ee7376f26d 100644 (file)
@@ -46,7 +46,7 @@
        <div class="uk-width-1-2">
                <h4>Syntax</h4>
                <p>To search within the collection default search field, like the ordinary search, just type the search term and go.</p>
-               <p>To search within the possible fields of a collection type the field identifier followed by : and then a space.</p>
+               <p>To search within the possible fields of a collection type the field identifier followed by : and then a space. Not every search operator does make sense with tag search fields.</p>
                eg.: <code>title: bourne</code>
                <p>Available fields in <b><?php echo Summoner::ifset($TemplateData['loadedCollection'], 'name'); ?></b> are:</p>
                <pre style="white-space: normal">
index edd562b26b6931a16e9ebeb89a6b9e2c74aaa714..7d49c4269254445efb6036d389a68837712a8ce6 100644 (file)
@@ -2,37 +2,7 @@
 <div class="uk-grid-small uk-grid-match uk-grid">
        <div class="uk-width-3-4">
                <ul class="uk-pagination" >
-                       <?php
-                               if($TemplateData['pagination']['curPage'] > 1) {
-                                       echo '<li><a href="index.php?'.Summoner::createFromParameterLinkQuery($TemplateData['pagination']['currentGetParameters'],array('page'=>($TemplateData['pagination']['curPage']-1))).'">
-                                               <span uk-pagination-previous></span></a></li>';
-                               }
-                               $ellipsisShown = 0;
-
-                               for($i=1;$i<=$TemplateData['pagination']['pages'];$i++) {
-                                       $active = '';
-                                       if($i == $TemplateData['pagination']['curPage']) $active = 'uk-active';
-                                       if(in_array($i,$TemplateData['pagination']['visibleRange'])) {
-                                               echo '<li class="'.$active.'"><a href="index.php?'.Summoner::createFromParameterLinkQuery($TemplateData['pagination']['currentGetParameters'],array('page'=>$i)).'"
-                                                       title="Goto page '.$i.'">'.$i.'</a></li>';
-                                       }
-                                       else {
-                                               if($i < $TemplateData['pagination']['currentRangeStart'] && $ellipsisShown == 0) {
-                                                       echo '<li class="uk-disabled"><span>&hellip;</span></li>';
-                                                       $ellipsisShown = 1;
-                                               }
-                                               if($i > $TemplateData['pagination']['currentRangeEnd'] && ($ellipsisShown == 0 || $ellipsisShown == 1)) {
-                                                       echo '<li class="uk-disabled"><span>&hellip;</span></li>';
-                                                       $ellipsisShown = 2;
-                                               }
-                                       }
-                               }
-
-                               if($TemplateData['pagination']['curPage'] < $TemplateData['pagination']['pages']) {
-                                       echo '<li><a href="index.php?'.Summoner::createFromParameterLinkQuery($TemplateData['pagination']['currentGetParameters'],array('page'=>($TemplateData['pagination']['curPage']+1))).'">
-                                               <span uk-pagination-next></span></a></li>';
-                               }
-                       ?>
+                       <?php require Summoner::themefile('collections/collections_pagination.html', UI_THEME); ?>
                </ul>
        </div>
        <div class="uk-width-1-4">
        </div>
 </div>
 <?php } ?>
+
+<?php if(!empty($TemplateData['pagination']) && $TemplateData['pagination']['pages'] > 1) { ?>
+<div class="uk-grid-small uk-grid-match uk-grid">
+       <div class="uk-width-3-4">
+               <ul class="uk-pagination" >
+                       <?php require Summoner::themefile('collections/collections_pagination.html', UI_THEME); ?>
+               </ul>
+       </div>
+</div>
+<?php } ?>
diff --git a/webclient/view/default/collections/collections_pagination.html b/webclient/view/default/collections/collections_pagination.html
new file mode 100644 (file)
index 0000000..fdfb8cc
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+if($TemplateData['pagination']['curPage'] > 1) {
+       echo '<li><a href="index.php?'.Summoner::createFromParameterLinkQuery($TemplateData['pagination']['currentGetParameters'],array('page'=>($TemplateData['pagination']['curPage']-1))).'">
+                                               <span uk-pagination-previous></span></a></li>';
+}
+$ellipsisShown = 0;
+
+for($i=1;$i<=$TemplateData['pagination']['pages'];$i++) {
+       $active = '';
+       if($i == $TemplateData['pagination']['curPage']) $active = 'uk-active';
+       if(in_array($i,$TemplateData['pagination']['visibleRange'])) {
+               echo '<li class="'.$active.'"><a href="index.php?'.Summoner::createFromParameterLinkQuery($TemplateData['pagination']['currentGetParameters'],array('page'=>$i)).'"
+                                                       title="Goto page '.$i.'">'.$i.'</a></li>';
+       }
+       else {
+               if($i < $TemplateData['pagination']['currentRangeStart'] && $ellipsisShown == 0) {
+                       echo '<li class="uk-disabled"><span>&hellip;</span></li>';
+                       $ellipsisShown = 1;
+               }
+               if($i > $TemplateData['pagination']['currentRangeEnd'] && ($ellipsisShown == 0 || $ellipsisShown == 1)) {
+                       echo '<li class="uk-disabled"><span>&hellip;</span></li>';
+                       $ellipsisShown = 2;
+               }
+       }
+}
+
+if($TemplateData['pagination']['curPage'] < $TemplateData['pagination']['pages']) {
+       echo '<li><a href="index.php?'.Summoner::createFromParameterLinkQuery($TemplateData['pagination']['currentGetParameters'],array('page'=>($TemplateData['pagination']['curPage']+1))).'">
+                                               <span uk-pagination-next></span></a></li>';
+}
+?>
index a2f2b0de83a3c953f9a5d2d4f248bf66ca1ce98f..6ac167e8a0e137cadd4cdcc14dee1253ce27fcd3 100644 (file)
@@ -1,6 +1,4 @@
 <p><b>Limitations</b></p>
-<p>Picture: Use URL to manually save and upload.</p>
-<p>Rating: Works only if the rating matches 1:1.</p>
 <p>Data will be overwritten</p>
 
 <form class="uk-form-horizontal uk-margin-small" method="post" enctype="multipart/form-data">