From: Thomas Berezansky Date: Thu, 29 Oct 2015 16:08:48 +0000 (-0400) Subject: LP#1487527: Add config.tt2 options and a basic search button X-Git-Tag: sprint4-merge-nov22~861 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8085a5959c799cfaed9d7db449c8c3e4150e6cee;p=working%2FEvergreen.git LP#1487527: Add config.tt2 options and a basic search button Also adding an optional results page hint Signed-off-by: Thomas Berezansky Signed-off-by: Kathy Lussier Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index ff8c6ad592..f91b5045ad 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -2114,3 +2114,8 @@ label[for*=expert_] font-weight: lighter; font-size: 70%; } + +#results-page-depth-hint { + text-align: center; + font-style: italic; +} diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index 9ce90a2d07..47df01b091 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -170,6 +170,18 @@ ctx.google_books_preview = 0; # # ctx.maintenance_message = "The system will not be available February 29, 2104."; +############################################################################## +# Depth Button/Checkbox +# Recommendation: Do not enable button for basic search without enabling the +# checkbox for the results page +ctx.depth_sel_checkbox = 1; # Results Page Checkbox Toggle +ctx.depth_sel_button = 1; # Basic Search Submit Button +ctx.depth_sel_depth = 0; # Depth to set to +ctx.depth_sel_button_label = l('All Libraries'); +ctx.depth_sel_button_class = 'opac-button'; +ctx.depth_sel_checkbox_label = l('Show results from all libraries'); +ctx.depth_sel_tooltip = l('Select this option to expand your results to all libraries while retaining the priority of your selected library\'s holdings.'); +ctx.depth_sel_resultshint = l('Showing results from all libraries'); ############################################################################## # Metarecords configuration diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2 index c2d271025c..ac13ce0958 100644 --- a/Open-ILS/src/templates/opac/parts/searchbar.tt2 +++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2 @@ -64,7 +64,11 @@ [%- END %] + onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden";[% IF ctx.depth_sel_button AND NOT took_care_of_form %] $("search-submit-go-depth").className="hidden";[% END %]}, 2000)'/> + [%- IF ctx.depth_sel_button AND NOT took_care_of_form %] + + [%- END %] diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2 index d49c5256f2..97e6eb5e14 100644 --- a/Open-ILS/src/templates/opac/results.tt2 +++ b/Open-ILS/src/templates/opac/results.tt2 @@ -91,12 +91,12 @@ [% l('Group Formats and Editions') %] [% END %] - [% IF loc_value != 1 %] - [% END %] [%- IF CGI.param('detail_record_view') @@ -112,6 +112,9 @@
+ [%- IF (ctx.depth_sel_checkbox OR ctx.depth_sel_button) AND CGI.param('depth') == ctx.depth_sel_depth AND ctx.depth_sel_resultshint %] +
[% ctx.depth_sel_resultshint | html %]
+ [%- END %] [% path = "opac/parts/result/" _ (ctx.records.size ? "table.tt2" : "lowhits.tt2"); INCLUDE $path %]