LP#1670425: RTL improvements to new advanced search limiter block
authorKathy Lussier <klussier@masslnc.org>
Wed, 12 Apr 2017 02:37:20 +0000 (22:37 -0400)
committerBen Shum <ben@evergreener.net>
Wed, 12 Apr 2017 21:51:32 +0000 (17:51 -0400)
Add some extra divs to the block with associated styling so that the advanced
search limiter block displays correctly for right-to-left languages. Also, add
some CSS to the rtl stylesheet so that padding and margins are added to the
correct side of blocks.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <ben@evergreener.net>
Open-ILS/src/templates/opac/css/style-rtl.css.tt2
Open-ILS/src/templates/opac/css/style.css.tt2
Open-ILS/src/templates/opac/parts/result/adv_filter.tt2
Open-ILS/src/templates/opac/parts/searchbar.tt2

index bbdc645..3b1082b 100644 (file)
@@ -63,6 +63,12 @@ div.result_table_utils_cont{text-align:right;float:right;}
 #acct_checked_tabs .align, #acct_holds_tabs .align, #acct_prefs_tabs .align{float:right;}
 #acct_checked_main_header th, #acct_holds_main_header th, #acct_checked_hist_header th, acct_holds_hist_header th, #acct_list_header th, #acct_list_header_anon th, #temp_list_holds th, #acct_messages_main_header th, #ebook_circs_main_table th, #ebook_holds_main_table th {text-align:right;}
 .myopac_payments_table th{text-align:right;}
+
+/* styling for advanced search filters that display with searchbar */
+.adv_filter_results_block_label{padding: 4px 12px 4px 0px;}
+.adv_filter_results_group_wrapper{margin-right: 1em;}
+.remove_filter{margin-right: 3px;}
+
 div#facet_sidebar{float:right;margin-left:1em;}
 .facet_box_temp .header .title{float:right;padding-right:12px;}
 .facet_box_temp .header a.button{float:left;padding-left:6px;}
index 4954368..bf5f163 100644 (file)
@@ -1082,8 +1082,19 @@ div.adv_search_available {
     display: inline-block;
     margin-left: 1em;
     margin-bottom: 8px;
-    }
+}
+
+.adv_filter_results_group_header {
+    display: inline-block;
+}
 
+.adv_filter_results_group_values {
+    display: inline;
+}
+
+.adv_search_result_filter {
+    display: inline-block;
+}
 
 .remove_filter {
    font-size: 16px;
@@ -1095,6 +1106,14 @@ a.remove_filter {
     color: [% css_colors.accent_dark %];
 }
 
+#filter_hits {
+     display: inline-block;
+}
+
+#refine_search_link {
+    display: inline-block;
+}
+
 [%- IF we_want_to_turn_on_facet_styling.defined; %]
 /* some facet styling */
 .facetClassContainer { margin: 2px; border: 1px solid [% css_colors.accent_light %]; }
index 367c816..ae2ef7a 100644 (file)
@@ -13,8 +13,8 @@ FOR filter IN ctx.query_struct.filters;
 -%]
          <div class="adv_filter_results_group_wrapper">
            <div class="adv_filter_results_group">
-            <h4 class="title">[% IF filter.negate; l('Not'); END %] [% (crad.description || crad.label) | html %]</h4>
-            [% temp = [];
+           <div class="adv_filter_results_group_header"> <h4 class="title">[% IF filter.negate; l('Not'); END %] [% (crad.description || crad.label) | html %]</h4></div>
+           <div class="adv_filter_results_group_values"> [% temp = [];
                FOR fval IN fvalues;
                 thing = ctx.search_ccvm('ctype',fname,'code',fval).0;
                 display_value = thing.search_label || thing.value;
@@ -26,17 +26,18 @@ FOR filter IN ctx.query_struct.filters;
             %]
                  <span class="adv_search_result_filter">
                     [% display_value | html %]
-                      [% UNLESS loop.last; 
-                         l('OR');
-                      END %]
                  </span>
-
+                 [% UNLESS loop.last %]
+                  <span class="adv_search_result_filter"> [% l('OR') %] </span>
+                 [% END %]
             [% END; # FOR %]
+             </div>
               <a class="button remove_filter"
               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="">&times; </a>
-             </div>
+
+            </div>
            </div>
     [%- END; # IF crad -%]
 
index 5dfcecd..5e25605 100644 (file)
@@ -148,9 +148,9 @@ END;
     [% END %]
     [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %]
     <div class="refine_search result_block_visible">
-        [ <a href="[% mkurl(ctx.opac_root _ '/advanced') %]">[%
+        <span id="refine_search_link">[ <a href="[% mkurl(ctx.opac_root _ '/advanced') %]">[%
             l('Refine My Original Search')
-        %]</a> ]
+        %]</a> ]</span>
     </div>
     [% END %]