LP1908612 Bootstrap Opac - Limit to Available
authorGarry Collum <gcollum@gmail.com>
Mon, 10 May 2021 19:55:59 +0000 (15:55 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 23 Jul 2021 14:32:00 +0000 (10:32 -0400)
Adds the 'Show All Copies' and 'Show Only Available Copies' to the Bootstrap
Opac's copy screen.

Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>

Open-ILS/src/templates-bootstrap/opac/parts/record/copy_table.tt2

index 489c3f2..9d92513 100755 (executable)
@@ -12,6 +12,7 @@ IF serial_holdings;
         copies = copies.merge(units);
     END;
 END;
+available=ctx.available;
 
 FOREACH copy_info IN copies;
     IF copy_info.call_number_label != '##URI##';
@@ -67,6 +68,19 @@ IF has_copies or ctx.foreign_copies;
 </form>
 [% END %]
 [% END %]
+
+<div class="mt-3">
+[% IF available == 'true'; %]
+  <a href="[% mkurl('', {available => 'false' }) %]">
+      [% l('Show All Copies') %]
+  </a>
+[% END %]
+[% IF available == 'false'; %]
+  <a href="[% mkurl('', {available => 'true' }) %]">
+      [% l('Show Only Available Copies') %]
+  </a>
+[% END %]
+
 <table class="container-fluid table table-hover mt-4 miniTable copyTable w-100" >
     <thead>
         <tr>