From a37b1c4e8df0340ada4b08a759afd5203321be01 Mon Sep 17 00:00:00 2001 From: Art Rhyno Date: Mon, 3 Dec 2012 21:15:33 -0500 Subject: [PATCH] Add search filters for formats and clean up front page This uses evergreen's filter group functionality to add "Videos", "Maps", and "Music" for limiting searches from the basic search screen. The link to the jspac is also finally retired and a "Start Over" link is added. The filter group uses the following SQL: INSERT INTO actor.search_filter_group (owner, code, label) VALUES (106, 'tpac_windsor', 'Windsor''s OPAC Search Filter'); INSERT INTO actor.search_query (label, query_text) VALUES ('Maps', 'item_type(e,f)'); INSERT INTO actor.search_query (label, query_text) VALUES ('Music', 'item_type(c,d,j)'); INSERT INTO actor.search_query (label, query_text) VALUES ('Videos', 'item_type(g)'); INSERT INTO actor.search_filter_group_entry (grp, query, pos) VALUES ( (SELECT id FROM actor.search_filter_group WHERE code = 'tpac_windsor'), (SELECT id FROM actor.search_query WHERE label = 'Maps'), 1 ); INSERT INTO actor.search_filter_group_entry (grp, query, pos) VALUES ( (SELECT id FROM actor.search_filter_group WHERE code = 'tpac_windsor'), (SELECT id FROM actor.search_query WHERE label = 'Music'), 2 ); INSERT INTO actor.search_filter_group_entry (grp, query, pos) VALUES ( (SELECT id FROM actor.search_filter_group WHERE code = 'tpac_windsor'), (SELECT id FROM actor.search_query WHERE label = 'Videos'), 3 ); Signed-off-by: Art Rhyno Signed-off-by: Dan Scott --- Open-ILS/src/templates_windsor/opac/parts/config.tt2 | 18 +++++++++++++++++- Open-ILS/src/templates_windsor/opac/parts/footer.tt2 | 3 ++- .../src/templates_windsor/opac/parts/homesearch.tt2 | 8 -------- .../src/templates_windsor/opac/parts/topnav_links.tt2 | 1 + 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/templates_windsor/opac/parts/config.tt2 b/Open-ILS/src/templates_windsor/opac/parts/config.tt2 index 6debf953b7..fab6b33f59 100644 --- a/Open-ILS/src/templates_windsor/opac/parts/config.tt2 +++ b/Open-ILS/src/templates_windsor/opac/parts/config.tt2 @@ -9,7 +9,7 @@ # Holds hiding ############################################################################## # Hide the ability to place holds at all -ctx.holds_hide.enabled = 'true'; +ctx.holds_hide.enabled = 'false'; ############################################################################## # Holds blocking @@ -136,4 +136,20 @@ search.adv_config = [ search.default_qtypes = ['keyword','title','author']; +############################################################################## +# Basic Search Box definition +# This allows selection of what, exactly, basic search uses for a selection +# box. Previously it was hardcoded to use an attr box of mattype or item_type. +# +# type can be "attr" or "filter" +# group is the attr or filter entries you want to check for +# none_label is the label for the default nothing selected entry. + +search.basic_config = { + type => 'filter', + group => ['tpac_windsor'], + none_label => l("All Formats"), +}; + + %] diff --git a/Open-ILS/src/templates_windsor/opac/parts/footer.tt2 b/Open-ILS/src/templates_windsor/opac/parts/footer.tt2 index ca61536049..744b32da12 100644 --- a/Open-ILS/src/templates_windsor/opac/parts/footer.tt2 +++ b/Open-ILS/src/templates_windsor/opac/parts/footer.tt2 @@ -6,7 +6,8 @@ [% l('Browse Journals') %]  |  [% l('Access Course Reserves') %]  |  [% l('Library Hours') %]  |  - [% l('Contact Us') %] + [% l('Contact Us') %]  |  + [% l('Start Over') %] [% IF ctx.timing %]
[% FOR event IN ctx.timing %] diff --git a/Open-ILS/src/templates_windsor/opac/parts/homesearch.tt2 b/Open-ILS/src/templates_windsor/opac/parts/homesearch.tt2 index 591a61ddfe..a640ba9b57 100644 --- a/Open-ILS/src/templates_windsor/opac/parts/homesearch.tt2 +++ b/Open-ILS/src/templates_windsor/opac/parts/homesearch.tt2 @@ -1,13 +1,5 @@ diff --git a/Open-ILS/src/templates_windsor/opac/parts/topnav_links.tt2 b/Open-ILS/src/templates_windsor/opac/parts/topnav_links.tt2 index 6622098077..8dad1227c6 100644 --- a/Open-ILS/src/templates_windsor/opac/parts/topnav_links.tt2 +++ b/Open-ILS/src/templates_windsor/opac/parts/topnav_links.tt2 @@ -8,6 +8,7 @@ [% l('Access Course Reserves') %] [% l('Library Hours') %] [% l('Contact Us') %] + [% l('Start Over') %]
-- 2.11.0