|
Lines 92-98
my ($template,$borrowernumber,$cookie);
Link Here
|
| 92 |
my $template_name; |
92 |
my $template_name; |
| 93 |
my $template_type = 'basic'; |
93 |
my $template_type = 'basic'; |
| 94 |
my @params = $cgi->param("limit"); |
94 |
my @params = $cgi->param("limit"); |
| 95 |
|
95 |
my @searchCategories = $cgi->param('searchcat'); |
| 96 |
|
96 |
|
| 97 |
my $format = $cgi->param("format") || ''; |
97 |
my $format = $cgi->param("format") || ''; |
| 98 |
my $build_grouped_results = C4::Context->preference('OPACGroupResults'); |
98 |
my $build_grouped_results = C4::Context->preference('OPACGroupResults'); |
|
Lines 202-208
my $languages_limit_loop = getLanguages($lang, 1);
Link Here
|
| 202 |
$template->param(search_languages_loop => $languages_limit_loop,); |
202 |
$template->param(search_languages_loop => $languages_limit_loop,); |
| 203 |
|
203 |
|
| 204 |
# load the Type stuff |
204 |
# load the Type stuff |
| 205 |
my $itemtypes = GetItemTypes; |
205 |
my $itemtypes = GetItemTypesCategorized; |
| 206 |
# the index parameter is different for item-level itemtypes |
206 |
# the index parameter is different for item-level itemtypes |
| 207 |
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; |
207 |
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; |
| 208 |
my @advancedsearchesloop; |
208 |
my @advancedsearchesloop; |
|
Lines 220-227
foreach my $advanced_srch_type (@advanced_search_types) {
Link Here
|
| 220 |
code => $thisitemtype, |
220 |
code => $thisitemtype, |
| 221 |
description => $itemtypes->{$thisitemtype}->{'description'}, |
221 |
description => $itemtypes->{$thisitemtype}->{'description'}, |
| 222 |
imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ), |
222 |
imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ), |
|
|
223 |
cat => $itemtypes->{$thisitemtype}->{'iscat'}, |
| 224 |
hideinopac => $itemtypes->{$thisitemtype}->{'hideinopac'}, |
| 225 |
searchcategory => $itemtypes->{$thisitemtype}->{'searchcategory'}, |
| 223 |
); |
226 |
); |
| 224 |
push @itypesloop, \%row; |
227 |
if ( !$itemtypes->{$thisitemtype}->{'hideinopac'} ) { |
|
|
228 |
push @itypesloop, \%row; |
| 229 |
} |
| 225 |
} |
230 |
} |
| 226 |
my %search_code = ( advanced_search_type => $advanced_srch_type, |
231 |
my %search_code = ( advanced_search_type => $advanced_srch_type, |
| 227 |
code_loop => \@itypesloop ); |
232 |
code_loop => \@itypesloop ); |
|
Lines 236-241
foreach my $advanced_srch_type (@advanced_search_types) {
Link Here
|
| 236 |
ccl => $advanced_srch_type, |
241 |
ccl => $advanced_srch_type, |
| 237 |
code => $thisitemtype->{authorised_value}, |
242 |
code => $thisitemtype->{authorised_value}, |
| 238 |
description => $thisitemtype->{'lib_opac'} || $thisitemtype->{'lib'}, |
243 |
description => $thisitemtype->{'lib_opac'} || $thisitemtype->{'lib'}, |
|
|
244 |
searchcategory => $itemtypes->{$thisitemtype}->{'searchcategory'}, |
| 239 |
imageurl => getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ), |
245 |
imageurl => getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ), |
| 240 |
); |
246 |
); |
| 241 |
push @authvalueloop, \%row; |
247 |
push @authvalueloop, \%row; |
|
Lines 403-408
my @limits = $cgi->param('limit');
Link Here
|
| 403 |
my @nolimits = $cgi->param('nolimit'); |
409 |
my @nolimits = $cgi->param('nolimit'); |
| 404 |
my %is_nolimit = map { $_ => 1 } @nolimits; |
410 |
my %is_nolimit = map { $_ => 1 } @nolimits; |
| 405 |
@limits = grep { not $is_nolimit{$_} } @limits; |
411 |
@limits = grep { not $is_nolimit{$_} } @limits; |
|
|
412 |
|
| 413 |
if (@searchCategories > 0) { |
| 414 |
my @tabcat; |
| 415 |
foreach my $typecategory (@searchCategories) { |
| 416 |
push (@tabcat, GetItemTypesByCategory($typecategory)); |
| 417 |
} |
| 418 |
|
| 419 |
foreach my $itemtypeInCategory (@tabcat) { |
| 420 |
push (@limits, "mc-$itype_or_itemtype,phr:".$itemtypeInCategory); |
| 421 |
} |
| 422 |
} |
| 423 |
|
| 406 |
@limits = map { uri_unescape($_) } @limits; |
424 |
@limits = map { uri_unescape($_) } @limits; |
| 407 |
|
425 |
|
| 408 |
if($params->{'multibranchlimit'}) { |
426 |
if($params->{'multibranchlimit'}) { |