[open-ils-commits] [GIT] Evergreen ILS branch rel_2_9 updated. 1d87ce873266737204ab36bbc134323b5cf1e7ce

Evergreen Git git at git.evergreen-ils.org
Fri Jun 3 11:00:49 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_9 has been updated
       via  1d87ce873266737204ab36bbc134323b5cf1e7ce (commit)
       via  2868b59701662a011c351a5c358c5337a9342f16 (commit)
      from  15dcff8bdf7539db6e463040c19385a4f0977d66 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1d87ce873266737204ab36bbc134323b5cf1e7ce
Author: Jason Stephenson <jstephenson at mvlcstaff.org>
Date:   Thu May 26 15:23:03 2016 -0400

    LP 1548993: Remember the Show More/Fewer Details button selection.
    
    The state of the Show More/Fewer Details button selection was
    previously not remembered across searches or across changes to
    advanced search.  This commit attempts to remedy that.
    
    Signed-off-by: Jason Stephenson <jstephenson at mvlcstaff.org>
    Signed-off-by: Jeanette Lundgren <jlundgren at cwmars.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    
    Conflicts:
    	Open-ILS/src/templates/opac/results.tt2

diff --git a/Open-ILS/src/templates/opac/parts/advanced/expert.tt2 b/Open-ILS/src/templates/opac/parts/advanced/expert.tt2
index 85e2ca2..c883336 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/expert.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/expert.tt2
@@ -1,6 +1,8 @@
 <form action="[% ctx.opac_root %]/results" method="get">
     <div class="header_middle">[% l("Expert Search") %]</div>
     <input type="hidden" name="_special" value="1" />
+    <input id="detail" type="hidden" name="detail_record_view"
+           value="[% show_detail_view %]"/>
     <table class="expert-search">
         <tbody id="adv_expert_rows_here">
             <tr id="adv_expert_row">
diff --git a/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2 b/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
index 4644600..f768c10 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
@@ -2,6 +2,8 @@
     <div class="header_middle">[% l("Numeric Search") %]</div>
     <input type="hidden" name="contains" value="contains" />
     <input type="hidden" name="_special" value="1" />
+    <input id="detail" type="hidden" name="detail_record_view"
+           value="[% show_detail_view %]"/>
     <div id='adv_numeric_block'>
             <label for="numeric_qtype"><strong>[% l("Field:") %]</strong></label>
                 <select id="numeric_qtype" name="qtype">
diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
index e35095b..feb3ecd 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -32,6 +32,8 @@
 
     <div id='adv_search_submit'>
         <input type="hidden" name="_adv" value="1" />
+        <input id="detail" type="hidden" name="detail_record_view"
+               value="[% show_detail_view %]"/>
         <span>
             <input id='search-submit-go' type="submit" value="[% l('Search') %]" title="[% l('Search') %]" class="opac-button"
                 onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index cda597c..7746601 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -47,7 +47,7 @@
         <div id="results_header_bar" [%- IF ctx.metarecord %]class="hidden"[% END -%]>
             <div id="results_header_inner">
                 <div class="results_header_btns">
-                    <a href="[% mkurl(ctx.opac_root _ '/home', {$loc_name => loc_value}, 1) %]" rel="nofollow" vocab="">[% l('Another Search') %]</a>
+                    <a href="[% mkurl(ctx.opac_root _ '/home', {$loc_name => loc_value, 'detail_record_view' => show_detail_view}, 1) %]" rel="nofollow" vocab="">[% l('Another Search') %]</a>
                 </div>
                 <div class="results_header_btns">
                     <a href="[% mkurl(ctx.opac_root _ '/advanced',{}, expert_search_parms.merge(browse_search_parms, facet_search_parms)) %]" rel="nofollow" vocab="">[% l('Advanced Search') %]</a>

commit 2868b59701662a011c351a5c358c5337a9342f16
Author: Jason Stephenson <jstephenson at mvlcstaff.org>
Date:   Thu May 19 15:53:48 2016 -0400

    LP 1548993: Restore Show More/Show Fewer Details button functionality.
    
    When using a show_more_details.default setting of true in config.tt2,
    the Show More/Show Fewer Details button functionality is broken.  The
    detail record view is always shown, regardless of the button's state.
    This patch attempts to repair the behavior so that the user can toggle
    the detail record view even though the default is set to true.
    
    Signed-off-by: Jason Stephenson <jstephenson at mvlcstaff.org>
    Signed-off-by: Jeanette Lundgren <jlundgren at cwmars.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    
    Conflicts:
    	Open-ILS/src/templates/opac/results.tt2

diff --git a/Open-ILS/src/templates/opac/parts/header.tt2 b/Open-ILS/src/templates/opac/parts/header.tt2
index b0d6883..8b60ba9 100644
--- a/Open-ILS/src/templates/opac/parts/header.tt2
+++ b/Open-ILS/src/templates/opac/parts/header.tt2
@@ -12,6 +12,19 @@
     is_advanced = CGI.param("_adv").size;
     is_special = CGI.param("_special").size;
 
+    # Check if we want to show the detail record view.  Doing this
+    # here because we don't want to repeat logic in multiple other
+    # files, nor do we want to add a new tt2 file just for this.  The
+    # below is currently needed for parts/result/table.tt2,
+    # parts/searchbar.tt2, and results.tt2.
+    show_detail_view = 0;
+    IF CGI.param("detail_record_view").defined;
+        show_detail_view = CGI.param("detail_record_view");
+    ELSIF show_more_details.default == "true" OR
+          show_more_details.default == "hide";
+        show_detail_view = 1;
+    END;
+
     #variables to use to remove parameters via mkurk
     expert_search_parms = ['tag','subfield','term','_special'];
     general_search_parms = ['page','sort','query','bool','contains','pubdate'];
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index 251d069..960d8c6 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -43,9 +43,7 @@
                     [%  FOR rec IN ctx.records;
                             attrs = {marc_xml => rec.marc_xml};
                             PROCESS get_marc_attrs args=attrs;
-                            IF CGI.param('detail_record_view')
-                                OR (show_more_details.default == 'true'
-                                OR show_more_details.default == 'hide');
+                            IF show_detail_view;
                                 attrs.title = attrs.title_extended;
                             END;
                             # note: rec.id refers to the record identifier, regardless
@@ -146,9 +144,7 @@ END;
                                                             [% format.label | html %]
                                                         [% END %]
                                                     [%- END %]
-                                                    [%- UNLESS CGI.param('detail_record_view')
-                                                            OR (show_more_details.default == 'true'
-                                                            OR show_more_details.default == 'hide');
+                                                    [%- UNLESS show_detail_view;
                                                             IF attrs.pubdate;
                                                                 pubdate_clean = attrs.pubdate | html;
                                                                 l(" ([_1])", pubdate_clean);
@@ -174,10 +170,7 @@ END;
                                                            [% END %]
                                                         [% END %]
 
-                                                        [%- IF CGI.param('detail_record_view')
-                                                            OR (show_more_details.default == 'true'
-                                                            OR show_more_details.default == 'hide');
-                                                        -%]
+                                                        [%- IF show_detail_view -%]
                                                         <!-- These fields are visible when viewing the results page in 'detailed' mode -->
                                                         [% UNLESS rec.mmr_id %]
                                                         <!-- Do not show publication-specific information on a metarecord search results page -->
diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2
index c2d2710..2b558fc 100644
--- a/Open-ILS/src/templates/opac/parts/searchbar.tt2
+++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2
@@ -60,9 +60,7 @@
         -%]
         </label>
     <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="detail" type="hidden" name="detail_record_view" value="[% show_detail_view %]"/>
         <input id='search-submit-go' type="submit" value="[% 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='[% l("Search In Progress") %]'/>
diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index f1bb957..cda597c 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -69,8 +69,8 @@
 
                     [%- IF show_more_details.default != 'hide' -%]
                     <div class='results_header_sel' id='simple-detail-view-links'>
-                        [% IF CGI.param('detail_record_view') %]
-                        <a href="[% mkurl('', {detail_record_view => ''}) %]" rel="nofollow" vocab="">[% l('Show Fewer Details') %]</a> [% ELSE %]
+                        [% IF show_detail_view %]
+                        <a href="[% mkurl('', {detail_record_view => 0}) %]" rel="nofollow" vocab="">[% l('Show Fewer Details') %]</a> [% ELSE %]
                         <a href="[% mkurl('', {detail_record_view => 1}) %]" rel="nofollow" vocab="">[% l('Show More Details') %]</a>
                         [% END %]
                     </div>
@@ -91,12 +91,6 @@
                             [% l('Group Formats and Editions') %]
                         </label>
                     [% END %]
-                    [%- IF CGI.param('detail_record_view')
-                        OR (show_more_details.default == 'true'
-                        OR show_more_details.default == 'hide');
-                    -%]
-                        <input type="hidden" name="detail_record_view" value="1" />
-                    [% END %]
             </div>
         </div>
     </div>

-----------------------------------------------------------------------

Summary of changes:
 .../src/templates/opac/parts/advanced/expert.tt2   |    2 ++
 .../src/templates/opac/parts/advanced/numeric.tt2  |    2 ++
 .../src/templates/opac/parts/advanced/search.tt2   |    2 ++
 Open-ILS/src/templates/opac/parts/header.tt2       |   13 +++++++++++++
 Open-ILS/src/templates/opac/parts/result/table.tt2 |   13 +++----------
 Open-ILS/src/templates/opac/parts/searchbar.tt2    |    4 +---
 Open-ILS/src/templates/opac/results.tt2            |   12 +++---------
 7 files changed, 26 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list