From cd02d8e587f7900eaa6f16c1081989b9b87b14ba Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Wed, 5 Jan 2011 10:44:15 -0500 Subject: [PATCH] [SIGNED-OFF] Bug 4329: OPAC search by shelving location Content-Type: text/plain; charset="utf-8" Rebased patch of PTFS's Bug4329 branch of Harley. Implements OPAC advance search limitation by shelving location (a series of checkboxes, much like limit by itemtype/ccode) Minor modification made to use OPAC description values for shelving locations, instead of librarian descriptions. Signed-off-by: Nicole Engard --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 25 +++++++++++++++++++- .../opac-tmpl/prog/en/modules/opac-advsearch.tmpl | 14 +++++++++++ opac/opac-search.pl | 18 ++++++++++++++ 3 files changed, 56 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 4c7d6ad..5ee596b 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -661,6 +661,29 @@ input.deleteshelf:active { background-color : #F8F8EB; } +/* the shelving location list in advanced search */ +#advsearch-shelvingloc table { + border-collapse : separate; + border-spacing : 3px; + border : 0px; + margin : 0px; + background-color : white; + border : 0px solid #D8DEB8; +} + +#advsearch-shelvingloc table tr td { + background-color : #F8F8EB; + border : 0px; + margin : 0px; + width : 700px; +} + +#advsearch-shelvingloc td { + font-size : 0.8em; + background-color : #F8F8EB; +} + + body#advsearch #breadcrumbs { line-height : 1px; height : 1px; @@ -2005,4 +2028,4 @@ div.ft { #plainmarc table { border: 0; margin: .7em 0 0 0; font-family: monospace; font-size: 95%; } #plainmarc th { background-color : #FFF; border: 0; white-space: nowrap; text-align:left; vertical-align: top; padding: 2px; } -#plainmarc td { border: 0; padding : 2px; vertical-align: top; } \ No newline at end of file +#plainmarc td { border: 0; padding : 2px; vertical-align: top; } diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl index ec77493..03e434c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl @@ -158,6 +158,20 @@

+
+
+ Limit to any of the following shelving locations: + + + + + + + +
-" name="limit" value="mc-:"/>
+
+
diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 45cb766..d43ad00 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -150,6 +150,24 @@ $template->param( my $languages_limit_loop = getAllLanguages(); $template->param(search_languages_loop => $languages_limit_loop,); +# add support for searching by shelving location +my @shelvinglocsloop; +my $selected=1; +my $cnt2; +my $shelflocations =GetAuthorisedValues("LOC"); +for my $thisloc (sort {$a->{'lib_opac'} cmp $b->{'lib_opac'}} @$shelflocations) { + my %row =( + number => $cnt2++, + ccl => 'loc', + code => $thisloc->{authorised_value}, + selected => $selected, + description => $thisloc->{'lib_opac'}, + count5 => $cnt2 % 4, + ); + $selected = 0; # set to zero after first pass through + push @shelvinglocsloop, \%row; +} +$template->param(shelvinglocsloop => \@shelvinglocsloop); # load the Type stuff my $itemtypes = GetItemTypes; # the index parameter is different for item-level itemtypes -- 1.5.6.5