[open-ils-commits] [GIT] Evergreen ILS branch master updated. 8a5406b3d5651d6e837a0c27ed41457b8fe0492e

Evergreen Git git at git.evergreen-ils.org
Tue Mar 1 21:26:00 EST 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, master has been updated
       via  8a5406b3d5651d6e837a0c27ed41457b8fe0492e (commit)
       via  53e14a671271d4656c290dcbf57851b8f10276f5 (commit)
       via  37224a38f4bae6ff580de68edc1a1e30ed17aa1f (commit)
       via  8c208fce8a1f57495228ccac6ec2284a5b4635d2 (commit)
       via  1d8d6880715e16e02ed890d7f4f14cf6011b6a6a (commit)
       via  1d00b52f7f3be90f51255173b3b0c0c75a68043c (commit)
       via  9c7cbe681bf9dd73e4a2e5879dca9d6f51239e9f (commit)
       via  e1a82e7adaf4e8debeb6df6c0ecd3dba4a4b70c2 (commit)
       via  de3c63f9a97ea4a4fda5c7cf9969c3505fdae3a2 (commit)
       via  af054babb1d88980430e83d475aabca2350f7001 (commit)
       via  6bace7bca1efa91dc823822cee4e14bd3429193b (commit)
       via  bbef8b9ebf4ada174df9ef00ececc6f9924b5c2f (commit)
      from  fd435363e7af964c699032b5eba4eb56c14c899e (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 8a5406b3d5651d6e837a0c27ed41457b8fe0492e
Author: Ben Shum <ben at evergreener.net>
Date:   Tue Mar 1 21:25:40 2016 -0500

    LP#1519055: Stamping upgrade script for electronic resources filter
    
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index edb2de6..544eb7a 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0963', :eg_version); -- jboyer/bshum
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0964', :eg_version); -- jlitrell/kmlussier/bshum
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql b/Open-ILS/src/sql/Pg/upgrade/0964.data.electronic-resources.sql
similarity index 93%
rename from Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql
rename to Open-ILS/src/sql/Pg/upgrade/0964.data.electronic-resources.sql
index b634c36..b1ba02a 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0964.data.electronic-resources.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0964', :eg_version);
 
 INSERT INTO config.coded_value_map
     (id, ctype, code, opac_visible, value, search_label) VALUES

commit 53e14a671271d4656c290dcbf57851b8f10276f5
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Mon Feb 29 11:08:25 2016 -0500

    LP#1519055: Fix to sql to get seed data values and to reingest instruction
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 9348d1a..e234361 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -7056,7 +7056,7 @@ INSERT INTO config.coded_value_map
 
 -- Electronic search format, not opac_visible
 INSERT INTO config.coded_value_map
-    (id, ctype, code, value, opac_visible, search_label) VALUES
+    (id, ctype, code, opac_visible, value, search_label) VALUES
 (712, 'search_format', 'electronic', FALSE,
     oils_i18n_gettext(712, 'Electronic', 'ccvm', 'value'),
     oils_i18n_gettext(712, 'Electronic', 'ccvm', 'search_label'));
@@ -7461,7 +7461,7 @@ INSERT INTO config.composite_attr_entry_definition
 -- electronic
 INSERT INTO config.composite_attr_entry_definition
     (coded_value, definition) VALUES
-(712, '{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}');
+(712, '[{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}]');
 
 -- use the definitions from the icon_format as the basis for the MR hold format definitions
 DO $$
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql b/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql
index 1819e17..b634c36 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql
@@ -3,21 +3,31 @@ BEGIN;
 SELECT evergreen.upgrade_deps_block_check('XXX', :eg_version);
 
 INSERT INTO config.coded_value_map
-    (id, ctype, code, value, opac_visible, search_label) VALUES
+    (id, ctype, code, opac_visible, value, search_label) VALUES
 (712, 'search_format', 'electronic', FALSE,
     oils_i18n_gettext(712, 'Electronic', 'ccvm', 'value'),
     oils_i18n_gettext(712, 'Electronic', 'ccvm', 'search_label'));
 
 INSERT INTO config.composite_attr_entry_definition
     (coded_value, definition) VALUES
-(712, '{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}');
+(712, '[{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}]');
 
 
 COMMIT;
 
 \qecho To use the new electronic search format, it is necessary to do a
-\qecho record attribute reingest. For example,
+\qecho record attribute reingest. Consider generating an SQL script with
+\qecho the following queries:
 \qecho
-\qecho SELECT 'metabib.reingest_record_attributes(' || id || ');'
-\qecho biblio.record_entry WHERE NOT DELETED and id > 0;
+\qecho '\\t'
+\qecho '\\o /tmp/partial_reingest_bib_recs.sql'
+\qecho 'SELECT ''select metabib.reingest_record_attributes('' || id || '');'' FROM biblio.record_entry WHERE NOT DELETED AND id > 0;'
+\qecho '\\o'
+\qecho '\\t'
+\qecho
+\qecho
+\qecho **** then running it via psql:
+\qecho
+\qecho
+\qecho '\\i /tmp/partial_reingest_bib_recs.sql'
 \qecho

commit 37224a38f4bae6ff580de68edc1a1e30ed17aa1f
Author: Jake Litrell <jake at masslnc.org>
Date:   Fri Feb 26 18:41:40 2016 -0500

    LP#1519055: Make electronic search filter optional
    
    Making checkboxes configurable, and off by default.  Release notes updated.
    
    Signed-off-by: Jake Litrell <jake at masslnc.org>
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
index dd08cd2..79ae4c4 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -90,15 +90,20 @@
                                         <option value="[% opt.code %]"[% CGI.param('pubdate') == opt.code ? ' selected="selected"' : '' %]>[% opt.label | html %]</option>
                                     [%  END %]
                             </select>
+                            [% IF !ctx.exclude_electronic_checkbox %]
                             <br/>
                             <div id='adv_special_block'>
+                            [% END %]
                                 <input title="[% l('Search date') %]"
                                   name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />
                                 <span id='adv_global_pub_date_2_span' class='[% CGI.param("pubdate") == "between" ? "" : "hide_me" %]'>
                                    [% l("and") %] <input name='date2'
                                     title="[% l('Secondary search date') %]" type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
                                 </span>
+                            [% IF !ctx.exclude_electronic_checkbox %]
                             </div>
+                            [% END %]
+                            [% IF ctx.exclude_electronic_checkbox %]
                             <div class="adv_search_available">
                                 <input type='checkbox' name="fi:-search_format" value="electronic"
                                 [%- CGI.param('fi:-search_format').grep('electronic').size ?
@@ -108,6 +113,7 @@
                                     [% l("Exclude Electronic Resources") %]
                                 </label>
                             </div>
+                            [% END %]
 [%
                 CASE "sort_selector";
                     INCLUDE "opac/parts/filtersort.tt2"
diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2
index a95e54d..58d2c09 100644
--- a/Open-ILS/src/templates/opac/parts/config.tt2
+++ b/Open-ILS/src/templates/opac/parts/config.tt2
@@ -192,6 +192,12 @@ ctx.depth_sel_tooltip = l('Select this option to expand your results to all libr
 ctx.depth_sel_resultshint = l('Showing results from all libraries');
 
 ##############################################################################
+# Exclude Electronic Resources Checkbox
+# One setting for both the advanced search page and the results bar.
+# Off by default; set to 1 to display.
+ctx.exclude_electronic_checkbox = 0;
+
+##############################################################################
 # Metarecords configuration
 # metarecords.disabled = 1; # disable all metarecord access points
 ##############################################################################
diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index 284fbb9..a89c7bf 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -104,12 +104,14 @@
                     -%]
                         <input type="hidden" name="detail_record_view" value="1" />
                     [% END %]
+                    [% IF ctx.exclude_electronic_checkbox %]
                     <label class="results_header_lbl" for='opac.result.excludeelec'>
                         <input type='checkbox' id='opac.result.excludeelec' name="fi:-search_format" value="electronic"
                             onchange="exclude_onchange(this)"
                             [%- CGI.param('fi:-search_format').grep('electronic').size ? ' checked="checked"' : '' %] />
                         [% l("Exclude Electronic Resources") %]
                     </label>
+                    [% END %]
             </div>
         </div>
     </div>
diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc
index 5ba2378..302c69b 100644
--- a/docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc
+++ b/docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc
@@ -5,3 +5,5 @@ on the advanced search screen and from the search results page. This limiter
 will exclude any search results with an item form of o or s. This limiter
 will be applied on top of any other format limiters used in the search.
 
+The checkboxes are disabled by default; to display them in both places, please
+toggle the 'ctx.exclude_electronic_checkbox' setting in config.tt2.

commit 8c208fce8a1f57495228ccac6ec2284a5b4635d2
Author: Jake Litrell <jake at masslnc.org>
Date:   Wed Feb 24 17:23:02 2016 -0500

    LP#1519055: Some JS fixes
    
    Adding basic javascript to remove our search filter from the
    textbox on an advanced search form.  Because of the interplay among
    various checkboxes/modifiers/filters, there may be duplicate filters
    applied from another function's form submit; this removes all at once.
    
    Signed-off-by: Jake Litrell <jake at masslnc.org>
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index 15bce7d..284fbb9 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -104,15 +104,12 @@
                     -%]
                         <input type="hidden" name="detail_record_view" value="1" />
                     [% END %]
-
                     <label class="results_header_lbl" for='opac.result.excludeelec'>
-                        <input type='checkbox' name="fi:-search_format" value="electronic"
-                            onchange="search_modifier_onchange('available', this, true)"
-                            [%- CGI.param('fi:-search_format').grep('electronic').size ? ' checked="checked"' : '' %]
-                            id='opac.result.excludeelec' />
+                        <input type='checkbox' id='opac.result.excludeelec' name="fi:-search_format" value="electronic"
+                            onchange="exclude_onchange(this)"
+                            [%- CGI.param('fi:-search_format').grep('electronic').size ? ' checked="checked"' : '' %] />
                         [% l("Exclude Electronic Resources") %]
                     </label>
-
             </div>
         </div>
     </div>
diff --git a/Open-ILS/web/js/ui/default/opac/simple.js b/Open-ILS/web/js/ui/default/opac/simple.js
index 7fa20cb..2f57bf6 100644
--- a/Open-ILS/web/js/ui/default/opac/simple.js
+++ b/Open-ILS/web/js/ui/default/opac/simple.js
@@ -100,3 +100,14 @@ function search_modifier_onchange(type, checkbox, submitOnChange) {
         checkbox.form.submit(); 
     }
 }
+
+function exclude_onchange(checkbox) {
+    if (checkbox.form._adv && !checkbox.checked) {
+        var search_box = $('search_box');
+        // Other functions' form submits may create duplicates of this, so /g
+        var reg = /-search_format\(electronic\)/g;
+        search_box.value = search_box.value.replace(reg, "");
+    }
+
+    checkbox.form.submit();
+}

commit 1d8d6880715e16e02ed890d7f4f14cf6011b6a6a
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Wed Feb 24 13:30:29 2016 -0500

    LP#1519055: Add reingest instructions to upgrade script
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    Signed-off-by: Jake Litrell <jake at masslnc.org>
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql b/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql
index 580547b..1819e17 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql
@@ -14,3 +14,10 @@ INSERT INTO config.composite_attr_entry_definition
 
 
 COMMIT;
+
+\qecho To use the new electronic search format, it is necessary to do a
+\qecho record attribute reingest. For example,
+\qecho
+\qecho SELECT 'metabib.reingest_record_attributes(' || id || ');'
+\qecho biblio.record_entry WHERE NOT DELETED and id > 0;
+\qecho

commit 1d00b52f7f3be90f51255173b3b0c0c75a68043c
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Wed Feb 24 11:43:50 2016 -0500

    LP#1519055: Adding Release Notes Entry for Exclude Electronic Resources Limiter
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    Signed-off-by: Jake Litrell <jake at masslnc.org>
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc
new file mode 100644
index 0000000..5ba2378
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc
@@ -0,0 +1,7 @@
+Limiter to exclude electronic resources
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+A limiter to exclude electronic resources from search results is now available
+on the advanced search screen and from the search results page. This limiter
+will exclude any search results with an item form of o or s. This limiter
+will be applied on top of any other format limiters used in the search.
+

commit 9c7cbe681bf9dd73e4a2e5879dca9d6f51239e9f
Author: Jake Litrell <jake at masslnc.org>
Date:   Tue Feb 23 20:18:48 2016 -0500

    LP#1519055: Adding Electronic to seed values; adding upgrade script.
    
    Signed-off-by: Jake Litrell <jake at masslnc.org>
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index a6cc668..9348d1a 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -7054,6 +7054,13 @@ INSERT INTO config.coded_value_map
     oils_i18n_gettext(633, 'Blu-ray', 'ccvm', 'value'),
     oils_i18n_gettext(633, 'Blu-ray', 'ccvm', 'search_label'));
 
+-- Electronic search format, not opac_visible
+INSERT INTO config.coded_value_map
+    (id, ctype, code, value, opac_visible, search_label) VALUES
+(712, 'search_format', 'electronic', FALSE,
+    oils_i18n_gettext(712, 'Electronic', 'ccvm', 'value'),
+    oils_i18n_gettext(712, 'Electronic', 'ccvm', 'search_label'));
+
 -- RDA content type, media type, and carrier type
 INSERT INTO config.coded_value_map (id, ctype, code, value, concept_uri)
   VALUES (634, 'content_type', 'two-dimensional moving image',
@@ -7451,6 +7458,11 @@ INSERT INTO config.composite_attr_entry_definition
 INSERT INTO config.composite_attr_entry_definition 
     (coded_value, definition) VALUES (608, '{"_attr":"vr_format","_val":"s"}');
 
+-- electronic
+INSERT INTO config.composite_attr_entry_definition
+    (coded_value, definition) VALUES
+(712, '{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}');
+
 -- use the definitions from the icon_format as the basis for the MR hold format definitions
 DO $$
     DECLARE format TEXT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql b/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql
new file mode 100644
index 0000000..580547b
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql
@@ -0,0 +1,16 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXX', :eg_version);
+
+INSERT INTO config.coded_value_map
+    (id, ctype, code, value, opac_visible, search_label) VALUES
+(712, 'search_format', 'electronic', FALSE,
+    oils_i18n_gettext(712, 'Electronic', 'ccvm', 'value'),
+    oils_i18n_gettext(712, 'Electronic', 'ccvm', 'search_label'));
+
+INSERT INTO config.composite_attr_entry_definition
+    (coded_value, definition) VALUES
+(712, '{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}');
+
+
+COMMIT;

commit e1a82e7adaf4e8debeb6df6c0ecd3dba4a4b70c2
Author: Jake Litrell <jake at masslnc.org>
Date:   Tue Feb 23 17:47:15 2016 -0500

    LP#1519055: Fixes
    
    Removing the <br> which moves the search results checkboxes to a new
    line.  Formatting will be addressed in a separate bug.
    
    Signed-off-by: Jake Litrell <jake at masslnc.org>
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index 55d5349..15bce7d 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -75,7 +75,6 @@
                         [% END %]
                     </div>
                     [%- END -%]
-                    <br class="clear-both" />
                     <label class="results_header_lbl" for="limit_to_available">
                         <input type="checkbox" id="limit_to_available" name="modifier" value="available"
                             onchange="search_modifier_onchange('available', this, true)"

commit de3c63f9a97ea4a4fda5c7cf9969c3505fdae3a2
Author: Jake Litrell <jake at masslnc.org>
Date:   Mon Feb 22 00:17:36 2016 -0500

    LP#1519055: Exclude Electronic checkbox on results page updates results.
    
    Signed-off-by: Jake Litrell <jake at masslnc.org>
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index 29b2299..55d5349 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -108,6 +108,7 @@
 
                     <label class="results_header_lbl" for='opac.result.excludeelec'>
                         <input type='checkbox' name="fi:-search_format" value="electronic"
+                            onchange="search_modifier_onchange('available', this, true)"
                             [%- CGI.param('fi:-search_format').grep('electronic').size ? ' checked="checked"' : '' %]
                             id='opac.result.excludeelec' />
                         [% l("Exclude Electronic Resources") %]

commit af054babb1d88980430e83d475aabca2350f7001
Author: Jake Litrell <jake at masslnc.org>
Date:   Sun Feb 21 23:16:51 2016 -0500

    LP#1519055: more changes
    
    - Add checkbox to search results page
    - Adding persistence for checkboxes.
    - Sentence Case Fix
    
    Signed-off-by: Jake Litrell <jake at masslnc.org>
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
index a658cc5..dd08cd2 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -100,7 +100,10 @@
                                 </span>
                             </div>
                             <div class="adv_search_available">
-                                <input type='checkbox' name="fi:-search_format" value="electronic" id='opac.result.excludeelec' />
+                                <input type='checkbox' name="fi:-search_format" value="electronic"
+                                [%- CGI.param('fi:-search_format').grep('electronic').size ?
+                                    ' checked="checked"' : '' %]
+                                id='opac.result.excludeelec' />
                                 <label for='opac.result.excludeelec'>
                                     [% l("Exclude Electronic Resources") %]
                                 </label>
diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2
index 6748c91..a95e54d 100644
--- a/Open-ILS/src/templates/opac/parts/config.tt2
+++ b/Open-ILS/src/templates/opac/parts/config.tt2
@@ -1,4 +1,4 @@
-[% 
+[%
 
 ##############################################################################
 # This file contains skin-level configuration settings.
@@ -95,9 +95,9 @@ show_more_details.default = 'false';
 record.summary.jacket_size = 'medium';
 
 ##############################################################################
-# Define the order in which facets are displayed.  Only facets listed here 
-# will be displayed.  To show all facets sorted by name, comment out this 
-# setting.  
+# Define the order in which facets are displayed.  Only facets listed here
+# will be displayed.  To show all facets sorted by name, comment out this
+# setting.
 # facet.display = [] # show no facets
 facet.display = [
     {facet_class => 'author',  facet_order => ['personal', 'corporate']},
@@ -123,8 +123,8 @@ facet.default_display_count = 5;
 #   lib_selector will put the search library box (with limit to available)
 #   pub_year will put the publication year box
 #   sort_selector will put the sort results selector
-# id DOM id used for linking labels to form controls.  They are pinned 
-#   here instead of auto-generated (from the attr type, for example) 
+# id DOM id used for linking labels to form controls.  They are pinned
+#   here instead of auto-generated (from the attr type, for example)
 #   for consistency.
 
 search.adv_config = [
@@ -187,7 +187,7 @@ ctx.depth_sel_button = 1; # Basic Search Submit Button
 ctx.depth_sel_depth = 0; # Depth to set to
 ctx.depth_sel_button_label = l('All Libraries');
 ctx.depth_sel_button_class = 'opac-button';
-ctx.depth_sel_checkbox_label = l('Show results from all libraries');
+ctx.depth_sel_checkbox_label = l('Show Results from All Libraries');
 ctx.depth_sel_tooltip = l('Select this option to expand your results to all libraries while retaining the priority of your selected library\'s holdings.');
 ctx.depth_sel_resultshint = l('Showing results from all libraries');
 
diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index 97e6eb5..29b2299 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -25,14 +25,14 @@
     <h3 class="sr-only">[% l('Additional search filters and navigation') %]</h3>
     <div class="almost-content-wrapper">
 
-        [%# hide the header bar when displaying metarecord constituents 
+        [%# hide the header bar when displaying metarecord constituents
           instead of skipping it altogether to allow the search form
           variables to propagate %]
         [% IF ctx.metarecord;
           mr_attrs = {marc_xml => ctx.metarecord_master.marc_xml};
           PROCESS get_marc_attrs args=mr_attrs %]
           <div class="results_header_lbl">
-            [% l('Viewing Results for Grouped Record: [_1]', 
+            [% l('Viewing Results for Grouped Record: [_1]',
                 mr_attrs.title) | html %]
           </div>
           [% IF CGI.param('query') %]
@@ -75,12 +75,12 @@
                         [% END %]
                     </div>
                     [%- END -%]
-
+                    <br class="clear-both" />
                     <label class="results_header_lbl" for="limit_to_available">
                         <input type="checkbox" id="limit_to_available" name="modifier" value="available"
                             onchange="search_modifier_onchange('available', this, true)"
                             [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
-                        [% l('Limit to available items') %]
+                        [% l('Limit to Available Items') %]
                     </label>
                     [% IF NOT metarecords.disabled %]
                         <label class="results_header_lbl" for="metabib_search_modifier">
@@ -105,6 +105,14 @@
                     -%]
                         <input type="hidden" name="detail_record_view" value="1" />
                     [% END %]
+
+                    <label class="results_header_lbl" for='opac.result.excludeelec'>
+                        <input type='checkbox' name="fi:-search_format" value="electronic"
+                            [%- CGI.param('fi:-search_format').grep('electronic').size ? ' checked="checked"' : '' %]
+                            id='opac.result.excludeelec' />
+                        [% l("Exclude Electronic Resources") %]
+                    </label>
+
             </div>
         </div>
     </div>
@@ -119,7 +127,7 @@
                     (ctx.records.size ? "table.tt2" : "lowhits.tt2");
                 INCLUDE $path %]
             </div>
-            <div class="common-full-pad"></div>    
+            <div class="common-full-pad"></div>
         </div>
         <br class="clear-both" />
     </div>

commit 6bace7bca1efa91dc823822cee4e14bd3429193b
Author: Jake Litrell <jake at masslnc.org>
Date:   Mon Feb 8 15:51:10 2016 -0500

    LP#1519055: Simple checkbox to exclude electronic resources from search results
    
    Initial checkbox to exclude electronic resources (types 'o' and 's' for
    now).
    
    Signed-off-by: Jake Litrell <jake at masslnc.org>
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
index 3fa8d79..a658cc5 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -99,6 +99,12 @@
                                     title="[% l('Secondary search date') %]" type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
                                 </span>
                             </div>
+                            <div class="adv_search_available">
+                                <input type='checkbox' name="fi:-search_format" value="electronic" id='opac.result.excludeelec' />
+                                <label for='opac.result.excludeelec'>
+                                    [% l("Exclude Electronic Resources") %]
+                                </label>
+                            </div>
 [%
                 CASE "sort_selector";
                     INCLUDE "opac/parts/filtersort.tt2"

commit bbef8b9ebf4ada174df9ef00ececc6f9924b5c2f
Author: Jake Litrell <jake at masslnc.org>
Date:   Mon Feb 8 14:37:47 2016 -0500

    Whitespace cleanup.
    
    Signed-off-by: Jake Litrell <jake at masslnc.org>
    Signed-off-by: Ben Shum <ben at evergreener.net>

diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
index e35095b..3fa8d79 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -1,4 +1,4 @@
-[% 
+[%
     PROCESS "opac/parts/misc_util.tt2";
     PROCESS get_library;
 %]
@@ -35,7 +35,7 @@
         <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)'/>
-            <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' 
+            <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif'
                 class='hidden' alt="[% l('Search in progress icon') %]"/>
         </span>
 
@@ -76,7 +76,7 @@
                             </div>
 [%
                 CASE "pub_year"; %]
-                            <select name='pubdate' 
+                            <select name='pubdate'
                                 id="[% adv_chunk.id %]"
                                 onchange='if(this.selectedIndex == 3)
                                     unHideMe($("adv_global_pub_date_2_span"));
@@ -89,13 +89,13 @@
                                             {"code" => "between", "label" => l("Between")} ] %]
                                         <option value="[% opt.code %]"[% CGI.param('pubdate') == opt.code ? ' selected="selected"' : '' %]>[% opt.label | html %]</option>
                                     [%  END %]
-                            </select>    
+                            </select>
                             <br/>
                             <div id='adv_special_block'>
-                                <input title="[% l('Search date') %]" 
+                                <input title="[% l('Search date') %]"
                                   name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />
                                 <span id='adv_global_pub_date_2_span' class='[% CGI.param("pubdate") == "between" ? "" : "hide_me" %]'>
-                                   [% l("and") %] <input name='date2' 
+                                   [% l("and") %] <input name='date2'
                                     title="[% l('Secondary search date') %]" type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
                                 </span>
                             </div>
@@ -111,7 +111,7 @@
                             <input> (below) to drop down inline w/ its label -->
                         <div class="adv_search_available">
                             <input type='checkbox' name="modifier" value="metabib"
-                              [%- CGI.param('modifier').grep('metabib').size ? 
+                              [%- CGI.param('modifier').grep('metabib').size ?
                                     ' checked="checked"' : '' %]
                                 id='opac.result.ismetabib' />
                             <label for='opac.result.ismetabib'>
@@ -120,21 +120,21 @@
                     [% END %]
 
                 [% CASE "copy_location" %]
-                    <select id="adv_copy_location_selector" 
+                    <select id="adv_copy_location_selector"
                         title="[% l('Select Shelving Location') %]"
                         name="fi:locations" size="3" multiple="multiple">
                     </select>
-                [% 
+                [%
             END;
         ELSIF adv_chunk.adv_attr;
             INCLUDE "opac/parts/coded_value_selector.tt2"
                 id=adv_chunk.id
-                attr=adv_chunk.adv_attr multiple="multiple" 
+                attr=adv_chunk.adv_attr multiple="multiple"
                 size=adv_chunk.adv_size || search.default_adv_select_height || "4";
         ELSIF adv_chunk.adv_filter;
             INCLUDE "opac/parts/filter_group_selector.tt2"
                 id=adv_chunk.id
-                filter_group=adv_chunk.adv_filter multiple="multiple" 
+                filter_group=adv_chunk.adv_filter multiple="multiple"
                 size=adv_chunk.adv_size || search.default_adv_select_height || "4";
         END; %]
             </div>

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

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   12 ++++++
 .../Pg/upgrade/0964.data.electronic-resources.sql  |   33 +++++++++++++++++
 .../src/templates/opac/parts/advanced/search.tt2   |   37 ++++++++++++++------
 Open-ILS/src/templates/opac/parts/config.tt2       |   20 +++++++----
 Open-ILS/src/templates/opac/results.tt2            |   17 ++++++---
 Open-ILS/web/js/ui/default/opac/simple.js          |   11 ++++++
 .../OPAC/exclude-electronic-limiter.adoc           |    9 +++++
 8 files changed, 117 insertions(+), 24 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0964.data.electronic-resources.sql
 create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list