Lines 84-90
my ($template,$borrowernumber,$cookie);
Link Here
|
84 |
my $template_name; |
84 |
my $template_name; |
85 |
my $template_type = 'basic'; |
85 |
my $template_type = 'basic'; |
86 |
my @params = $cgi->param("limit"); |
86 |
my @params = $cgi->param("limit"); |
87 |
|
87 |
my @searchCategories = $cgi->param('searchcat'); |
88 |
|
88 |
|
89 |
my $format = $cgi->param("format") || ''; |
89 |
my $format = $cgi->param("format") || ''; |
90 |
my $build_grouped_results = C4::Context->preference('OPACGroupResults'); |
90 |
my $build_grouped_results = C4::Context->preference('OPACGroupResults'); |
Lines 194-200
my $languages_limit_loop = getLanguages($lang, 1);
Link Here
|
194 |
$template->param(search_languages_loop => $languages_limit_loop,); |
194 |
$template->param(search_languages_loop => $languages_limit_loop,); |
195 |
|
195 |
|
196 |
# load the Type stuff |
196 |
# load the Type stuff |
197 |
my $itemtypes = GetItemTypes; |
197 |
my $itemtypes = GetItemTypesCategorized; |
198 |
# the index parameter is different for item-level itemtypes |
198 |
# the index parameter is different for item-level itemtypes |
199 |
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; |
199 |
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; |
200 |
my @advancedsearchesloop; |
200 |
my @advancedsearchesloop; |
Lines 228-235
foreach my $advanced_srch_type (@advanced_search_types) {
Link Here
|
228 |
code => $thisitemtype, |
228 |
code => $thisitemtype, |
229 |
description => $itemtypes->{$thisitemtype}->{'description'}, |
229 |
description => $itemtypes->{$thisitemtype}->{'description'}, |
230 |
imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ), |
230 |
imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ), |
|
|
231 |
cat => $itemtypes->{$thisitemtype}->{'iscat'}, |
232 |
hideinopac => $itemtypes->{$thisitemtype}->{'hideinopac'}, |
233 |
searchcategory => $itemtypes->{$thisitemtype}->{'searchcategory'}, |
231 |
); |
234 |
); |
232 |
push @itypesloop, \%row; |
235 |
if ( !$itemtypes->{$thisitemtype}->{'hideinopac'} ) { |
|
|
236 |
push @itypesloop, \%row; |
237 |
} |
233 |
} |
238 |
} |
234 |
my %search_code = ( advanced_search_type => $advanced_srch_type, |
239 |
my %search_code = ( advanced_search_type => $advanced_srch_type, |
235 |
code_loop => \@itypesloop ); |
240 |
code_loop => \@itypesloop ); |
Lines 247-252
foreach my $advanced_srch_type (@advanced_search_types) {
Link Here
|
247 |
ccl => $advanced_srch_type, |
252 |
ccl => $advanced_srch_type, |
248 |
code => $thisitemtype->{authorised_value}, |
253 |
code => $thisitemtype->{authorised_value}, |
249 |
description => $thisitemtype->{'lib_opac'} || $thisitemtype->{'lib'}, |
254 |
description => $thisitemtype->{'lib_opac'} || $thisitemtype->{'lib'}, |
|
|
255 |
searchcategory => $itemtypes->{$thisitemtype}->{'searchcategory'}, |
250 |
imageurl => getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ), |
256 |
imageurl => getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ), |
251 |
); |
257 |
); |
252 |
push @authvalueloop, \%row; |
258 |
push @authvalueloop, \%row; |
Lines 426-431
my @nolimits = $cgi->param('nolimit');
Link Here
|
426 |
my %is_nolimit = map { $_ => 1 } @nolimits; |
432 |
my %is_nolimit = map { $_ => 1 } @nolimits; |
427 |
@limits = grep { not $is_nolimit{$_} } @limits; |
433 |
@limits = grep { not $is_nolimit{$_} } @limits; |
428 |
|
434 |
|
|
|
435 |
if (@searchCategories > 0) { |
436 |
my @tabcat; |
437 |
foreach my $typecategory (@searchCategories) { |
438 |
push (@tabcat, GetItemTypesByCategory($typecategory)); |
439 |
} |
440 |
|
441 |
foreach my $itemtypeInCategory (@tabcat) { |
442 |
push (@limits, "mc-$itype_or_itemtype,phr:".$itemtypeInCategory); |
443 |
} |
444 |
} |
445 |
|
446 |
@limits = map { uri_unescape($_) } @limits; |
447 |
|
429 |
if($params->{'multibranchlimit'}) { |
448 |
if($params->{'multibranchlimit'}) { |
430 |
my $multibranch = '('.join( " or ", map { "branch: $_ " } @{ GetBranchesInCategory( $params->{'multibranchlimit'} ) } ).')'; |
449 |
my $multibranch = '('.join( " or ", map { "branch: $_ " } @{ GetBranchesInCategory( $params->{'multibranchlimit'} ) } ).')'; |
431 |
push @limits, $multibranch if ($multibranch ne '()'); |
450 |
push @limits, $multibranch if ($multibranch ne '()'); |