PINES Customizations to OPAC - Advanced Search
authorTerran McCanna <tmccanna@georgialibraries.org>
Tue, 29 Dec 2020 18:35:58 +0000 (13:35 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Sat, 19 Nov 2022 19:58:15 +0000 (14:58 -0500)
Fix problems with advanced search filter display on search results page.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates-bootstrap/opac/parts/result/adv_filter.tt2
Open-ILS/src/templates-bootstrap/opac/parts/searchbar.tt2

index 39a4207..3c4e638 100755 (executable)
@@ -11,48 +11,50 @@ FOR filter IN ctx.query_struct.filters;
     IF crad AND NOT pubdate_filters.grep('^' _ filter.name _ '$').size;
         remove_filter = 'fi:' _ fname;
 -%]
-         <div class="adv_filter_results_group_wrapper" id="1">
+         <div class="adv_filter_results_group_wrapper" id="1" style="float:left;margin-bottom:25px;">
            <div class="adv_filter_results_group">
-           <div class="adv_filter_results_group_header"> <h5 class="title">[% IF filter.negate; l('Not'); END %] [% (crad.description || crad.label) | html %]</h5></div>
-           <div class="adv_filter_results_group_values d-inline-block align-middle"> [% temp = [];
-               FOR fval IN fvalues;
-                thing = ctx.search_ccvm('ctype',fname,'code',fval).0;
-                display_value = thing.search_label || thing.value;
-                IF display_value.defined;
-                 temp.push(display_value);
-                END;
-               END;
-               FOR display_value IN temp.sort;
-            %]
-                 <span class="adv_search_result_filter">
-                    [% display_value | html %]
-                 </span>
-                 [% UNLESS loop.last %]
-                  <span class="adv_search_result_filter"> [% l('OR') %] </span>
-                 [% END %]
-            [% END; # FOR %]
-             </div>
-              <a class="button remove_filter btn btn-deny btn-sm"
-              title="[% l('Remove [_1] filter', (crad.description || crad.label)) %]"
-              aria-label="[% l('Remove [_1] filter', (crad.description || crad.label)) %]"
-              href="[% mkurl('', {}, [remove_filter]) %]" rel="nofollow" vocab=""><span class="text-white">&times;</span> </a>
-            </div>
-           </div>
+               <div class="adv_filter_results_group_header d-inline-block align-middle"  style="font-size:1.1em;font-weight:bold;"> [% IF filter.negate; l('Not'); END %] [% (crad.description || crad.label) | html %]:</div>
+               <div class="adv_filter_results_group_values d-inline-block align-middle" style="font-size:1.1em;"> [% temp = [];
+                   FOR fval IN fvalues;
+                    thing = ctx.search_ccvm('ctype',fname,'code',fval).0;
+                    display_value = thing.search_label || thing.value;
+                    IF display_value.defined;
+                     temp.push(display_value);
+                    END;
+                   END;
+                   FOR display_value IN temp.sort;
+                %]
+                     <span class="adv_search_result_filter" style="font-size:1.1em;">
+                        [% display_value | html %]
+                     </span>
+                     [% UNLESS loop.last %]
+                      <span class="adv_search_result_filter" style="font-size:1em;font-style:italic;"> [% l('or') %] </span>
+                     [% END %]
+                [% END; # FOR %]
+                 </div>
+                  <a class="button remove_filter btn btn-deny btn-sm"
+                  title="[% l('Remove [_1] filter', (crad.description || crad.label)) %]"
+                  aria-label="[% l('Remove [_1] filter', (crad.description || crad.label)) %]"
+                  href="[% mkurl('', {}, [remove_filter]) %]" rel="nofollow" vocab=""><span class="text-white">&times;</span> </a>
+                </div>
            </div>
     [%- END; # IF crad -%]
 
 [%-  IF filter.name == 'locations'; locs = ctx.search_acpl('id',filter.args) -%]
-    <div class="adv_filter_results_group_wrapper" id="2">
+    <div class="adv_filter_results_group_wrapper d-inline-block align-middle" id="2" style="float:left;margin-bottom:25px;">
       <div class="adv_filter_results_group">
-            <h4 class="title">[% IF filter.negate; l('Not'); END %] </h4>
+            <span class="title" style="font-weight:bold;font-size:1.1em;">[% IF filter.negate; l('Not'); END %] [% l('Shelving Location') %]: </span>
             [% temp = [];
                FOR loc IN locs;
                 temp.push(loc.name);
                END;
                FOR display_name IN temp.sort; %]
-                  <span class="adv_search_result_filter">
+                  <span class="adv_search_result_filter" style="font-size:1.1em;">
                     [% display_name | html%]
                   </span>
+                [% UNLESS loop.last %]
+                      <span class="adv_search_result_filter" style="font-size:1em;font-style:italic;"> [% l('or') %] </span>
+                [% END %]
             [% END; # FOR %]
             <a class="button remove_filter btn btn-deny btn-sm"
               title="[% l('Remove location filter') %]"
@@ -65,10 +67,10 @@ FOR filter IN ctx.query_struct.filters;
     date1 = CGI.param('date1') | html;
     date2 = CGI.param('date2') | html;
 -%]
-    <div class="adv_filter_results_group_wrapper" id="3">
+    <div class="adv_filter_results_group_wrapper" id="3" style="float:left;margin-bottom:25px;">
       <div class="adv_filter_results_group">
-            <h5 class="title">[% IF filter.negate; l('Not'); END %] [% l('Publication Year') %]</h5>
-              <span class="adv_search_result_filter">
+            <span class="title" style="font-weight:bold;font-size:1.1em;">[% IF filter.negate; l('Not'); END %] [% l('Publication Year') %]: </span>
+              <span class="adv_search_result_filter" style="font-size:1.1em;">
               [% IF    filter.name == 'date1'      %][% l('[_1]', date1) %]
               [% ELSIF filter.name == 'before'  %][% l('Before [_1]', date1) %]
               [% ELSIF filter.name == 'after'   %][% l('After [_1]', date1) %]
index 660818b..2ef8a3b 100755 (executable)
@@ -179,11 +179,11 @@ END;
     [% IF ctx.query_struct.filters.size > 0 %]
         [% stuff = INCLUDE 'opac/parts/result/adv_filter.tt2' %]
         [% IF stuff %]
-        <h3 class="sr-only">[% l('Search Results filters') %]</h3>
-        <div id="adv_filter_results_block" class="adv_filter_results_hide">
-        <span class="adv_filter_results_block_label">[% l('Filtered by:') %]</span>
-            [% stuff %]
-        </div>
+            <h3 class="sr-only">[% l('Search Results filters') %]</h3>
+            <div id="adv_filter_results_block" class="adv_filter_results_hide">
+                <div class="adv_filter_results_block_label" style="text-align:left;">[% l('Filtered by:') %]</div>
+                [% stuff %]
+            </div>
         [% END %]
     [% END %]
     [% IF ctx.search_summary.suggestions.one_class_one_term %]