From 12949f170b42966cb6d40ef1f41948150334c145 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Wed, 27 Jul 2011 13:05:02 -0400 Subject: [PATCH] Numeric search mostly works (except for item barcode) Expert search is next Signed-off-by: Lebbeous Fogle-Weekley --- .../perlmods/lib/OpenILS/WWW/EGCatLoader.pm | 4 ++- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 3 ++- .../XXXY.data.config.metabib_field.lccn.sql | 14 ++++++++++ Open-ILS/web/css/skin/default/opac/style.css | 11 +++++++- .../web/templates/default/opac/advanced.tt2 | 15 ++++++++--- .../default/opac/parts/advanced/expert.tt2 | 3 +++ .../default/opac/parts/advanced/numeric.tt2 | 26 +++++++++++++++++++ 7 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXY.data.config.metabib_field.lccn.sql create mode 100644 Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2 create mode 100644 Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2 diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index a23cf3d5ac..fe5074e865 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -88,7 +88,9 @@ sub load { $path =~ /opac\/my(opac\/lists|list)/; return $self->load_simple("home") if $path =~ m|opac/home|; - return $self->load_simple("advanced") if $path =~ m|opac/advanced|; + return $self->load_simple("advanced") if + $path =~ m:opac/(advanced|numeric|expert):; + return $self->load_rresults if $path =~ m|opac/results|; return $self->load_record if $path =~ m|opac/record|; 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 61197f74f7..366b457cc8 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -96,7 +96,8 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES (27, 'identifier', 'bibid', oils_i18n_gettext(27, 'Internal ID', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='901']/marc:subfield[@code='c']$$ ); INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, search_field, facet_field) VALUES - (28, 'identifier', 'authority_id', oils_i18n_gettext(28, 'Authority Record ID', 'cmf', 'label'), 'marcxml', '//marc:datafield/marc:subfield[@code="0"]', FALSE, TRUE); + (28, 'identifier', 'authority_id', oils_i18n_gettext(28, 'Authority Record ID', 'cmf', 'label'), 'marcxml', '//marc:datafield/marc:subfield[@code="0"]', FALSE, TRUE), + (29, 'identifier', 'lccn', oils_i18n_gettext(29, 'LCCN', 'cmf', 'label'), 'marcxml', '//marc:datafield[@tag="010"]/marc:subfield[@code="a"]', TRUE, FALSE) ; SELECT SETVAL('config.metabib_field_id_seq'::TEXT, (SELECT MAX(id) FROM config.metabib_field), TRUE); diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXY.data.config.metabib_field.lccn.sql b/Open-ILS/src/sql/Pg/upgrade/XXXY.data.config.metabib_field.lccn.sql new file mode 100644 index 0000000000..5e33cf33a0 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXY.data.config.metabib_field.lccn.sql @@ -0,0 +1,14 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXY', :eg_version); + +INSERT INTO config.metabib_field ( + id, field_class, name, label, xpath, weight, format, + search_field, facet_field +) VALUES ( + 29, 'identifier', 'lccn', oils_i18n_gettext(29, 'LCCN', 'cmf', 'label'), + '//marc:datafield[@tag="010"]/marc:subfield[@code="a"]', 1, + 'marcxml', TRUE, FALSE +); + +COMMIT; diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index ae2098de0f..6ea13c5455 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -288,18 +288,27 @@ div.select-wrapper:hover { #adv_search { width:156px; - background:url('/images/adv_search_on.gif') no-repeat bottom; + background:url('/images/adv_search_off.gif') no-repeat bottom; +} +#adv_search.on { + background: url('/images/adv_search_on.gif') no-repeat bottom !important; } #num_search { width:156px; background:url('/images/num_search_off.gif') no-repeat bottom; } +#num_search.on { + background: url('/images/num_search_on.gif') no-repeat bottom !important; +} #expert_search { width:156px; background:url('/images/expert_search_off.gif') no-repeat bottom; } +#expert_search.on { + background: url('/images/expert_search_on.gif') no-repeat bottom !important; +} #acct_tabs, #acct_fines_tabs { height:33px; diff --git a/Open-ILS/web/templates/default/opac/advanced.tt2 b/Open-ILS/web/templates/default/opac/advanced.tt2 index 5c953a3544..e752636082 100644 --- a/Open-ILS/web/templates/default/opac/advanced.tt2 +++ b/Open-ILS/web/templates/default/opac/advanced.tt2 @@ -1,21 +1,28 @@ [% PROCESS "default/opac/parts/header.tt2"; WRAPPER "default/opac/parts/base.tt2"; INCLUDE "default/opac/parts/topnav.tt2"; - ctx.page_title = l("Advanced Search") %] + ctx.page_title = l("Advanced Search"); + pane = CGI.param("pane") || "advanced" %]
[% INCLUDE "default/opac/parts/printnav.tt2" %]
- - + + +
+ [% IF pane == 'advanced' %] [% INCLUDE "default/opac/parts/advanced/search.tt2" %] + [% ELSIF pane == 'numeric' %] + [% INCLUDE "default/opac/parts/advanced/numeric.tt2" %] + [% ELSIF pane == 'expert' %] + [% INCLUDE "default/opac/parts/advanced/expert.tt2" %] + [% END %]
diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2 new file mode 100644 index 0000000000..35b11ab7ff --- /dev/null +++ b/Open-ILS/web/templates/default/opac/parts/advanced/expert.tt2 @@ -0,0 +1,3 @@ + +
[% l("Expert Search") %]
+ diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2 new file mode 100644 index 0000000000..8835a5c7c0 --- /dev/null +++ b/Open-ILS/web/templates/default/opac/parts/advanced/numeric.tt2 @@ -0,0 +1,26 @@ +
+
[% l("Numeric Search") %]
+ + + + + + + + +
+ + + +
+ +
+
-- 2.43.2