From: senator Date: Fri, 25 Feb 2011 16:42:30 +0000 (-0500) Subject: refining advanced search now preserves qtype/contains/query combos. also, X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=97fc9f4806179c4eef42a1d5febc317dcb611a7d;p=evergreen%2Fequinox.git refining advanced search now preserves qtype/contains/query combos. also, also, show something better for empty search results --- diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css index 68edb5e686..f652eaa2e9 100644 --- a/Open-ILS/web/css/skin/default/opac/semiauto.css +++ b/Open-ILS/web/css/skin/default/opac/semiauto.css @@ -27,7 +27,6 @@ .opac-auto-039 { float: left; font-weight: bold; padding-top: 5px; } .opac-auto-040 { float: left; padding: 5px 0px 0px 10px; } .left-corner { float: left; width: 163px; height: 30px; background: url('/images/utils-corner-mid.png') repeat-x top; } -.opac-auto-043 { float: left; width: 300px; margin-top: 20px; } .float-right { float: right; } .opac-auto-045 { float: right; margin-right: 17px; } .opac-auto-046 { float: right; width: 214px; } diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index 0366017eb2..6780de35f0 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -714,6 +714,8 @@ div.select-wrapper:hover { padding-bottom:5px; } +#zero_search_hits div { float:left;width:300px;margin-top:20px; } + #zero_search_hits p { margin-top:0; } @@ -937,3 +939,4 @@ div.select-wrapper:hover { #adv_search_refine { padding-left: 5em; background-color: #d7d7d7; margin: 2ex 0; } +.row-remover { position: relative; top: 1px; vertical-align: middle; } diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 index f55321867a..afa97ffeb8 100644 --- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 @@ -1,21 +1,26 @@ - +[% + contains = CGI.param('contains'); + queries = CGI.param('query'); + qtypes = CGI.param('qtype') || ['keyword']; + FOR qtype IN qtypes; + c = contains.shift; + q = queries.shift; %] + - - [% INCLUDE "default/opac/parts/stypes_selector.tt2" %] + [% INCLUDE "default/opac/parts/qtype_selector.tt2" + query_type=qtype %] - - - - - + +[% i = i + 1; + END %] diff --git a/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2 new file mode 100644 index 0000000000..8c31f0d4f4 --- /dev/null +++ b/Open-ILS/web/templates/default/opac/parts/qtype_selector.tt2 @@ -0,0 +1,16 @@ +[% query_types = [ + {value => "keyword", label => l("Keyword")}, + {value => "title", label => l("Title")}, + {value => "author", label => l("Author")}, + {value => "subject", label => l("Subject")}, + {value => "series", label => l("Series")}, + {value => "id|bibcn", label => l("Call Number")} +] %] + diff --git a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 index 1afe8b0f17..9393c49a00 100644 --- a/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/result/lowhits.tt2 @@ -1,8 +1,11 @@
-
-

Sorry, no entries were found for - [% query | html %]
+

+

[% l('Sorry, no entries were found for') %] + [% IF is_advanced; l('your search'); ELSE %] + [% CGI.param('query') | html %] + [% END %] +
Did you mean ?

diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 index 7a83aeaf55..8e9d7877ea 100644 --- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 @@ -18,7 +18,7 @@ [% ELSE %] - [% INCLUDE "default/opac/parts/stypes_selector.tt2" %] + [% INCLUDE "default/opac/parts/qtype_selector.tt2" %] [% END %] diff --git a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2 deleted file mode 100644 index b139791e05..0000000000 --- a/Open-ILS/web/templates/default/opac/parts/stypes_selector.tt2 +++ /dev/null @@ -1,16 +0,0 @@ -[% search_classes = [ - {value => "keyword", label => l("Keyword")}, - {value => "title", label => l("Title")}, - {value => "author", label => l("Author")}, - {value => "subject", label => l("Subject")}, - {value => "series", label => l("Series")}, - {value => "id|bibcn", label => l("Call Number")} -] %] -