From: Garry Collum <gcollum@gmail.com>
Date: Wed, 10 Aug 2022 17:05:14 +0000 (+0000)
Subject: LP#1983729: Bootstrap Opac: fix copy navigation links in small screens
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=48774e526a2d42dcbf1c37d4489c7512e22b397a;p=evergreen%2Fequinox.git

LP#1983729: Bootstrap Opac: fix copy navigation links in small screens

This moves the previous, next, and Show more copies links out of the
copies table so that these values do not have incorrect labels on small
screens.

To test:
1. Retrieve a bib record with a large number of copies.
2. In a small screen notice that the previous, next, and show more copies
links are labeled, as Library and Call Number.
3. Apply the patch.
4. Repeat step 2.

Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: John Amundson <jamundson@cwmars.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
---

diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/copy_table.tt2
index b5b1bc1824..ca1139528e 100755
--- a/Open-ILS/src/templates-bootstrap/opac/parts/record/copy_table.tt2
+++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/copy_table.tt2
@@ -352,46 +352,40 @@ END; # FOREACH bib
 
 [%- END; # FOR copy_info
 %]
+
+    </tbody>
+</table>
+
         [% IF ctx.copy_limit < total_copies AND NOT serial_holdings %]
-            <tr class="offset">
+            <div class="row">
             [%- IF ctx.copy_offset > 0;
                 new_offset = ctx.copy_offset - ctx.copy_limit;
                 IF new_offset < 0; new_offset = 0; END %]
-                <td>
+                <div class="col">
                 <a href="[% mkurl('', {copy_offset => new_offset, copy_limit => ctx.copy_limit}) %]">&laquo; [%
                     l('Previous [_1]', ctx.copy_offset - new_offset) %]</a>
-                </td>
+               </div>
             [%- END %]
             [%- IF copies.size >= ctx.copy_limit AND (ctx.copy_offset + ctx.copy_limit < total_copies) %]
-                <td>
+                <div class="col text-right">
                     <a href="[% mkurl('', {copy_offset => ctx.copy_offset + ctx.copy_limit, copy_limit => ctx.copy_limit}) %]">[%
                     l('Next [_1]', ctx.copy_limit) %] &raquo;</a>
-                </td>
+                </div>
             [%- END %]
-            </tr>
+            </div>
         [% END %]
 
         [% IF NOT serial_holdings -%]
             [%- more_copies_limit = 50 %] [%# TODO: config %]
             [%- IF  ctx.copy_limit != more_copies_limit AND copies.size >= ctx.copy_limit AND ctx.copy_limit < total_copies %]
-                <tr class="not_serial">
-                    <td>
                         <div class="rdetail_show_copies">
                             <a href="[% mkurl('', {copy_limit => more_copies_limit, copy_offset => 0}) %]"><i class="fas fa-plus-square"></i> [% l('Show more copies') %]</a>
                         </div>
-                    </td>
-                </tr>
             [%- ELSIF ctx.copy_limit == more_copies_limit %]
-                <tr class="not_serial">
-                    <td>
                         <div  class="rdetail_show_copies">
                             <a href="[% mkurl('', {copy_limit => 0, copy_offset => 0}) %]"><i class="fas fa-minus-square"></i> [% l('Show fewer copies') %]</a>
                         </div>
-                    </td>
-                </tr>
             [%- END %]
         [%- END %]
-    </tbody>
-</table>
 </div>
 [% END %]