From: senator Date: Wed, 23 Feb 2011 19:11:46 +0000 (-0500) Subject: advanced search results now show an advanced search form... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cb52780d8bea4eb27bc40c9d8494a0f42aaaff51;p=evergreen%2Fequinox.git advanced search results now show an advanced search form... for refining your search terms. The query-type/contains/term rows don't yet populate, but the rest of the form does. There probably also needs to be more stylistic consideration. Still need to improve the translation of CGI parameters into QP syntax. Still need to do all kinds of things. --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm index e294aab279..199ef1e92e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm @@ -48,12 +48,12 @@ sub _prepare_biblio_search { $cgi->param('depth') : $ctx->{find_aou}->($args->{'org_unit'})->ou_type->depth; - if ($cgi->param('available')) { + if (grep /available/, $cgi->param('modifier')) { $query = '#available ' . $query; } if ($cgi->param('format')) { - $args->{'format'} = join('', $cgi->param('format')); + $query .= ' format(' . join('', $cgi->param('format')) . ')'; } if ($cgi->param('lang')) { @@ -63,24 +63,26 @@ sub _prepare_biblio_search { } if ($cgi->param('audience')) { - $query .= ' audience(' . $cgi->param('audience') . ')'; + $query .= ' audience(' . join(',', $cgi->param('audience')) . ')'; } if (defined $cgi->param('sort')) { - my $sort = $cgi->param('sort'); - my $sort_order = $cgi->param('sort_order'); - $query .= " sort($sort)"; - $query .= '#' . $sort_order if $sort_order and $sort ne 'rel'; + my ($axis, $desc) = split /\./, $cgi->param('sort'); + $query .= " sort($axis)"; + $query .= '#descending' if $desc; } - if ($cgi->param('pubyear_how') && $cgi->param('pubyear1')) { - if ($cgi->param('pubyear_how') eq 'between') { - $query .= ' between(' . $cgi->param('pubyear1'); - $query .= ',' . $cgi->param('pubyear2') if $cgi->param('pubyear2'); + if ($cgi->param('pubdate') && $cgi->param('date1')) { + if ($cgi->param('pubdate') eq 'between') { + $query .= ' between(' . $cgi->param('date1'); + $query .= ',' . $cgi->param('date2') if $cgi->param('date2'); $query .= ')'; + } elsif ($cgi->param('pubdate') eq 'is') { + $query .= ' between(' . $cgi->param('date1') . + ',' . $cgi->param('date1') . ')'; # sic, date1 twice } else { - $query .= ' ' . $cgi->param('pubyear_how') . - '(' . $cgi->param('pubyear1') . ')'; + $query .= ' ' . $cgi->param('pubdate') . + '(' . $cgi->param('date1') . ')'; } } diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index e47edcc671..8577afd2ca 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -931,3 +931,9 @@ div.select-wrapper:hover { #opac.result.sort { width: 160px; } .renew-summary { font-size: 125%; font-style: italic; margin: 0.5ex 0; } .failure-text { margin-left: 4em; font-style: italic; color: #ff0000; } +.refine-controls { font-size: 125%; padding: 0.5ex 0; } +#adv_search_refine input[type=text] { border: 1px inset #ccc !important; } +#adv_search_refine select { border: 1px inset #ccc !important; } +#adv_search_refine { + padding-left: 5em; background-color: #d7d7d7; margin: 2ex 0; +} diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 index 0fb4ab1f12..72ca027926 100644 --- a/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/advanced/search.tt2 @@ -32,24 +32,23 @@ [% l("Item Type") %]
[% INCLUDE "default/opac/parts/format_selector.tt2" - value=CGI.param("item_type") + values=CGI.param("format") multiple="multiple" size="4" id="adv_global_item_type_basic" %] [% l("Language") %]
[% l("Audience") %]
- - + [% INCLUDE "default/opac/parts/audience_options.tt2" + values=CGI.param("audience") %] - [% l("Sort Criteria") %] + [% l("Sort Results") %]
- - - - - - - - - - - - - - -
- -
- -
- [% l("Group Formats and Editions") %] - - -
+ [% INCLUDE "default/opac/parts/filtersort.tt2" + value=CGI.param('sort') %]
@@ -113,54 +83,14 @@ - - - - - - - - @@ -208,6 +143,7 @@
- [% l("Item Form") %] - - - - [% l("Literary Form") %] - [% l("Advanced") %] - [% l("Basic") %] - - - - - [% l("Bib Level") %] - - -
[% l("Search Library") %]
[% PROCESS "default/opac/parts/org_selector.tt2"; PROCESS build_org_selector name='loc' value=loc %]
- + @@ -168,20 +98,25 @@
[% l("Publication Year") %]
-
- - - [% l("and") %] + + + [% l("and") %]
+