From: Dan Scott Date: Tue, 13 Jan 2015 21:30:35 +0000 (-0500) Subject: LP#1410532: TPAC "Show more details" config option X-Git-Tag: sprint4-merge-nov22~1639 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0a9ae15101471db50ca5483537b0c017b6a95524;p=working%2FEvergreen.git LP#1410532: TPAC "Show more details" config option Enable sites to either enable the "Show more details in search results" by default, or to turn on the detailed search results and hide the UI widget entirely. Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index 8b0e69f3c0..5ec568d414 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -81,6 +81,13 @@ allow_phone_notifications = 'true'; # Options are "small", "medium", and "large" record.summary.jacket_size = 'medium'; +############################################################################## +# 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'; ############################################################################## # Define the order in which facets are displayed. Only facets listed here diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index 80f2e140a9..6cbe41e02c 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -41,7 +41,9 @@ [% FOR rec IN ctx.records; attrs = {marc_xml => rec.marc_xml}; PROCESS get_marc_attrs args=attrs; - IF CGI.param('detail_record_view'); + IF CGI.param('detail_record_view') + OR (show_more_details.default == 'true' + OR show_more_details.default == 'hide'); attrs.title = attrs.title_extended; END; # note: rec.id refers to the record identifier, regardless @@ -168,7 +170,10 @@ END; [% END %] - [% IF CGI.param('detail_record_view') %] + [%- IF CGI.param('detail_record_view') + OR (show_more_details.default == 'true' + OR show_more_details.default == 'hide'); + -%] [% IF attrs.publisher %]