From a1e7e0176f86d7b06af1e23b376c4dae8955a0ab Mon Sep 17 00:00:00 2001 From: Art Rhyno Date: Mon, 13 Aug 2012 17:22:17 -0400 Subject: [PATCH] TPAC: Make "Show more details" in results optional Academic sites typically handle a lot of electronic content and want to bring most details about entries, such as availability, status, and URLs, on a results screen to the front. This adds a 'show_more_details.default' option in 'config.tt2' that can have the values 'true', 'false' and 'hide'. The 'true' and 'false' values set the default for the button to more and less respectively, and 'hide' suppresses the button from showing at all. Signed-off-by: Art Rhyno Signed-off-by: Dan Scott Conflicts: Open-ILS/src/templates/opac/parts/searchbar.tt2 Open-ILS/src/templates/opac/results.tt2 --- Open-ILS/src/templates/opac/parts/config.tt2 | 6 ++++++ Open-ILS/src/templates/opac/parts/searchbar.tt2 | 3 +++ Open-ILS/src/templates/opac/results.tt2 | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index 8b0e69f3c0..f6292a3825 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -74,6 +74,12 @@ allow_phone_notifications = 'true'; ############################################################################## # Misc. UI Settings ############################################################################## +# Option for full details as a default, esp. impt. for e-content +# that uses resolver plumbing. Valid values are 'true', 'false' and 'hide'. +# Setting this to 'true' shows full details by default but allows the link +# to appear for 'Show Fewer Details'. The 'hide' option shows full details +# and also suppresses the link from displaying at all. +show_more_details.default = 'false'; ############################################################################## # Size of the jacket image to display on the record detail summary. diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2 index 5eb3873f6d..675506e31c 100644 --- a/Open-ILS/src/templates/opac/parts/searchbar.tt2 +++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2 @@ -60,6 +60,9 @@ -%] + [%- IF (show_more_details.default == 'true' OR show_more_details.default == 'hide') AND !CGI.param('detail_record_view') %] + + [%- END %] diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2 index 92ae43ce7e..4ab53eb598 100644 --- a/Open-ILS/src/templates/opac/results.tt2 +++ b/Open-ILS/src/templates/opac/results.tt2 @@ -64,12 +64,16 @@ [% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') submit_on_change=1 %] + [%- IF show_more_details.default != 'hide' -%] + [%- END -%] + +