TPAC: Make "Show more details" in results optional feature/tpac_show_details_config_2_4
authorArt Rhyno <art632000@yahoo.ca>
Mon, 13 Aug 2012 21:22:17 +0000 (17:22 -0400)
committerDan Scott <dscott@laurentian.ca>
Wed, 8 May 2013 14:49:51 +0000 (10:49 -0400)
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 <art632000@yahoo.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/parts/config.tt2
Open-ILS/src/templates/opac/parts/searchbar.tt2
Open-ILS/src/templates/opac/results.tt2

index c8e87ef..718083e 100644 (file)
@@ -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.
index 0359c83..70819e6 100644 (file)
@@ -42,6 +42,9 @@
             INCLUDE build_org_selector arialabel=select_lib_label show_loc_groups=1
         -%]
     <span>
+    [%- IF (show_more_details.default == 'true' OR show_more_details.default == 'hide') AND !CGI.param('detail_record_view') %]
+        <input id="detail" type="hidden" name="detail_record_view" value="1"/>
+    [%- END %]
         <input id='search-submit-go' type="submit" value="[% l('Search') %]" alt="[% l('Search') %]" class="opac-button"
             onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
         <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt=''/>
index d199ce9..60803ba 100644 (file)
@@ -42,6 +42,8 @@
                     <label class="results_header_lbl">[% l('Sort by') %]
                     [% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') submit_on_change=1 %]
                     </label>
+
+                    [%- IF show_more_details.default != 'hide' -%]
                     <div class="results_header_div"></div>
 
                     <div class='results_header_sel' id='simple-detail-view-links'>
@@ -50,6 +52,8 @@
                         <a href="[% mkurl('', {detail_record_view => 1}) %]">[% l('Show More Details') %]</a>
                         [% END %]
                     </div>
+                    [%- END -%]
+
                     <div class="results_header_div"></div>
 
                     <label class="results_header_lbl">