Lines 93-99
my ($template,$borrowernumber,$cookie);
Link Here
|
93 |
my $template_name; |
93 |
my $template_name; |
94 |
my $template_type = 'basic'; |
94 |
my $template_type = 'basic'; |
95 |
my @params = $cgi->param("limit"); |
95 |
my @params = $cgi->param("limit"); |
96 |
|
96 |
my @searchCategories = $cgi->param('searchcat'); |
97 |
|
97 |
|
98 |
my $format = $cgi->param("format") || ''; |
98 |
my $format = $cgi->param("format") || ''; |
99 |
my $build_grouped_results = C4::Context->preference('OPACGroupResults'); |
99 |
my $build_grouped_results = C4::Context->preference('OPACGroupResults'); |
Lines 203-209
my $languages_limit_loop = getLanguages($lang, 1);
Link Here
|
203 |
$template->param(search_languages_loop => $languages_limit_loop,); |
203 |
$template->param(search_languages_loop => $languages_limit_loop,); |
204 |
|
204 |
|
205 |
# load the Type stuff |
205 |
# load the Type stuff |
206 |
my $itemtypes = GetItemTypes; |
206 |
my $itemtypes = GetItemTypesCategorized; |
207 |
# the index parameter is different for item-level itemtypes |
207 |
# the index parameter is different for item-level itemtypes |
208 |
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; |
208 |
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; |
209 |
my @advancedsearchesloop; |
209 |
my @advancedsearchesloop; |
Lines 237-244
foreach my $advanced_srch_type (@advanced_search_types) {
Link Here
|
237 |
code => $thisitemtype, |
237 |
code => $thisitemtype, |
238 |
description => $itemtypes->{$thisitemtype}->{'description'}, |
238 |
description => $itemtypes->{$thisitemtype}->{'description'}, |
239 |
imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ), |
239 |
imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ), |
|
|
240 |
cat => $itemtypes->{$thisitemtype}->{'iscat'}, |
241 |
hideinopac => $itemtypes->{$thisitemtype}->{'hideinopac'}, |
242 |
searchcategory => $itemtypes->{$thisitemtype}->{'searchcategory'}, |
240 |
); |
243 |
); |
241 |
push @itypesloop, \%row; |
244 |
if ( !$itemtypes->{$thisitemtype}->{'hideinopac'} ) { |
|
|
245 |
push @itypesloop, \%row; |
246 |
} |
242 |
} |
247 |
} |
243 |
my %search_code = ( advanced_search_type => $advanced_srch_type, |
248 |
my %search_code = ( advanced_search_type => $advanced_srch_type, |
244 |
code_loop => \@itypesloop ); |
249 |
code_loop => \@itypesloop ); |
Lines 256-261
foreach my $advanced_srch_type (@advanced_search_types) {
Link Here
|
256 |
ccl => $advanced_srch_type, |
261 |
ccl => $advanced_srch_type, |
257 |
code => $thisitemtype->{authorised_value}, |
262 |
code => $thisitemtype->{authorised_value}, |
258 |
description => $thisitemtype->{'lib_opac'} || $thisitemtype->{'lib'}, |
263 |
description => $thisitemtype->{'lib_opac'} || $thisitemtype->{'lib'}, |
|
|
264 |
searchcategory => $itemtypes->{$thisitemtype}->{'searchcategory'}, |
259 |
imageurl => getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ), |
265 |
imageurl => getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ), |
260 |
); |
266 |
); |
261 |
push @authvalueloop, \%row; |
267 |
push @authvalueloop, \%row; |
Lines 423-428
my @limits = $cgi->param('limit');
Link Here
|
423 |
my @nolimits = $cgi->param('nolimit'); |
429 |
my @nolimits = $cgi->param('nolimit'); |
424 |
my %is_nolimit = map { $_ => 1 } @nolimits; |
430 |
my %is_nolimit = map { $_ => 1 } @nolimits; |
425 |
@limits = grep { not $is_nolimit{$_} } @limits; |
431 |
@limits = grep { not $is_nolimit{$_} } @limits; |
|
|
432 |
|
433 |
if (@searchCategories > 0) { |
434 |
my @tabcat; |
435 |
foreach my $typecategory (@searchCategories) { |
436 |
push (@tabcat, GetItemTypesByCategory($typecategory)); |
437 |
} |
438 |
|
439 |
foreach my $itemtypeInCategory (@tabcat) { |
440 |
push (@limits, "mc-$itype_or_itemtype,phr:".$itemtypeInCategory); |
441 |
} |
442 |
} |
443 |
|
426 |
@limits = map { uri_unescape($_) } @limits; |
444 |
@limits = map { uri_unescape($_) } @limits; |
427 |
|
445 |
|
428 |
if($params->{'multibranchlimit'}) { |
446 |
if($params->{'multibranchlimit'}) { |