LP1903767 - Bootstrap Opac: Make other formats and editions more visible.
authorGarry Collum <gcollum@gmail.com>
Fri, 22 Jul 2022 18:08:43 +0000 (18:08 +0000)
committerMichele Morgan <mmorgan@noblenet.org>
Wed, 28 Sep 2022 16:12:07 +0000 (12:12 -0400)
This patch does the following:

1. Moves "Other Formats and Editions" below # of holds and available items.
2. Changes "Other Options" to "Other Formats and Editions" and makes the
header tage and <h2> tag consistent with other header tags.
3. Resizes <h2> tags.
4. Removes bullets and changes the margins of some of the table/list displays
under the <h2> headers.
5. Fixes the alignment of the button group that contains Place Hold.

For Testing:

1. Find a record that contains other formats and editions.  In concerto
record #71 contains other formats and editions.
2. Notice that you have to click the More Details button to view the Other
Formats.
3. Apply the patch.
4. Other Formats and Editions now appear under the Available Copies and
Holds heading.  You no longer have to push the More Details button.

Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Gina Monti <gmonti@biblio.org>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>

Open-ILS/src/templates-bootstrap/opac/css/style.css.tt2
Open-ILS/src/templates-bootstrap/opac/parts/record/copy_counts.tt2
Open-ILS/src/templates-bootstrap/opac/parts/record/series.tt2
Open-ILS/src/templates-bootstrap/opac/parts/record/summary.tt2

index 128adb3..b774292 100755 (executable)
@@ -929,6 +929,11 @@ div#rdetail_actions_div {
     [%- END %]
 }
 
+div#rdetail_copy_counts {
+    margin-top; 1em;
+}
+
+/*
 span#rdetail_copy_counts {
     display: inline-block;
     vertical-align: top;
@@ -942,6 +947,7 @@ span#rdetail_copy_counts {
     padding-right: 1em;
     [%- END %]
 }
+*/
 
 span#rdetail_hold_counts {
     display: inline-block;
@@ -2407,12 +2413,19 @@ a.opac-button-header:hover, #dash_wrapper a.opac-button:hover {
     width: 100%;
 }
 
-#rdetail_record_details {
+.rdetail_record_details {
     clear: both;
     margin-top: 1em;
 }
 
-.rdetail_content {
+h2.rdetail_record_details, #rdetail_copy_counts h2, h2.rdetail_contents,
+h2.rdetail_related_subjects, h2.rdetail_related_series,
+h2.rdetail_other_formats, h2.rdetail_uris {
+    font-size: [% css_fonts.size_biggest %];
+    font-weight: bold;
+}
+
+.rdetail_content, .rdetail_subject {
     [% IF rtl == 't' -%]
     margin-right: 1.5em;
     padding-right: 1.5em;
index 407662d..24f5797 100755 (executable)
@@ -1,7 +1,7 @@
 <div id="rdetail_copy_counts">
     <h2>[% l('Available copies') %]</h2>
 
-    <ul>
+    <ul class="no-bullets">
     [%- depths = ctx.copy_summary.size;
         depth = 0;
         displayed_ous = {};
@@ -52,7 +52,7 @@
     </ul>
 
     <h2>[% l('Holds') %]</h2>
-    <ul><li>
+    <ul class="no-bullets"><li>
     [%
         # If org hiding is enabled/relevant, only show
         # counts for copies within the hiding scope.
index ea93d55..cb484d4 100755 (executable)
@@ -59,7 +59,7 @@ END;
 [%- series_anchors = PROCESS render_series;
     IF series_anchors.length > 0; %]
 <h2 class='rdetail_related_series'>[% l('Search for related items by series') %]</h2>
-<ul>
+<ul class="no-bullets">
     [% series_anchors %]
 </ul>
 [%- END %]
index e41c270..94ae7f5 100755 (executable)
@@ -74,7 +74,7 @@ ctx.metalinks.push('
                     <button id="btnMore" data-toggle="collapse" data-target="#demo"
                         class="btn btn-action btn-sm my-3"><i class="fas fa-info-circle" aria-hidden="true"></i> [%l ("More Details") %]</button>
                     <div id="demo" class="collapse">
-                        <h2 id='rdetail_record_details'>[% l("Record details") %]</h2>
+                        <h2 class='rdetail_record_details'>[% l("Record details") %]</h2>
                         <ul class="list-unstyled">
                             [%- IF attrs.hl.isbn.size; FOR isbn IN attrs.hl.isbn %]
                             <li class='rdetail_isbns'>
@@ -255,6 +255,33 @@ ctx.metalinks.push('
                         [%- INCLUDE "opac/parts/record/contents.tt2" %]
                         [%- INCLUDE "opac/parts/record/subjects.tt2" %]
                         [%- INCLUDE "opac/parts/record/series.tt2" %]
+
+                    </div>
+
+                </div>
+                <script>
+                    $(document).ready(function() {
+                        $('#demo').on('hidden.bs.collapse', function () {
+                            $('#btnMore').html("<i class='fas fa-info-circle' aria-hidden='true'></i> [%l ('More Details') %]");
+                        })
+                        $('#demo').on('shown.bs.collapse', function () {
+                            $('#btnMore').html("<i class='fas fa-info-circle' aria-hidden='true'></i> [%l ('Fewer Details') %]");
+                        })
+                    });
+                    </script>
+
+               <div id="copy_hold_counts">
+
+                [%-
+                # Hold/copy summary
+                IF ctx.copy_summary.0.count;
+                INCLUDE "opac/parts/record/copy_counts.tt2";
+                %]
+
+
+                [%- END %]
+
+                </div> <!-- metarecord_population -->
                         <div>
                             [%-
                             # l( 'mmr id = ' _ ctx.mmr_id );
@@ -267,7 +294,7 @@ ctx.metalinks.push('
 
                             IF args.mmr_unique_bib.size > 1;
                             %]
-                            <h3>[% l("More Options") %]</h3>
+                            <h2 class="rdetail_other_formats">[% l("Other Formats and Editions") %]</h2>
                             <span class="metarecord_population_format">
                                 [%- IF mmr_attrs.format_label;
 
@@ -326,37 +353,11 @@ ctx.metalinks.push('
                             [% args = save_args; %]
                         </div>
 
-                    </div>
-
-                </div>
-                <script>
-                    $(document).ready(function() {
-                        $('#demo').on('hidden.bs.collapse', function () {
-                            $('#btnMore').html("<i class='fas fa-info-circle' aria-hidden='true'></i> [%l ('More Details') %]");
-                        })
-                        $('#demo').on('shown.bs.collapse', function () {
-                            $('#btnMore').html("<i class='fas fa-info-circle' aria-hidden='true'></i> [%l ('Fewer Details') %]");
-                        })
-                    });
-                    </script>
-
-               <div id="copy_hold_counts">
-
-                [%-
-                # Hold/copy summary
-                IF ctx.copy_summary.0.count;
-                INCLUDE "opac/parts/record/copy_counts.tt2";
-                %]
-
-
-                [%- END %]
-
-                </div> <!-- metarecord_population -->
             </div>
             <!--rdetail_title_div-->
 
             <div class="col-lg-4">
-             <div id="actions" class="mx-auto btn-group btn-group-vertical dropright mt-3">
+             <div id="actions" class="mx-auto btn-group-vertical dropright mt-3">
                 [%- search_ou = ctx.search_ou;
                 IF ctx.place_unfillable ||
                 ( attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size