LP#1410532: TPAC "Show more details" config option
authorDan Scott <dscott@laurentian.ca>
Tue, 13 Jan 2015 21:30:35 +0000 (16:30 -0500)
committerBen Shum <bshum@biblio.org>
Mon, 16 Feb 2015 09:29:46 +0000 (04:29 -0500)
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 <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>

Open-ILS/src/templates/opac/parts/config.tt2
Open-ILS/src/templates/opac/parts/result/table.tt2

index 8b0e69f..5ec568d 100644 (file)
@@ -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 
index 80f2e14..6cbe41e 100644 (file)
@@ -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;
                                                         </tr>
                                                         [% 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');
+                                                        -%]
                                                         <!-- These fields are visible when viewing the results page in 'detailed' mode -->
 
                                                         [% IF attrs.publisher %]