Lines 481-493
foreach my $subscription (@subscriptions) {
Link Here
|
481 |
|
481 |
|
482 |
$dat->{'count'} = scalar(@items); |
482 |
$dat->{'count'} = scalar(@items); |
483 |
|
483 |
|
484 |
# If there is a lot of items, and the user has not decided |
|
|
485 |
# to view them all yet, we first warn him |
486 |
# TODO: The limit of 50 could be a syspref |
487 |
my $viewallitems = $query->param('viewallitems'); |
488 |
if ($dat->{'count'} >= 50 && !$viewallitems) { |
489 |
$template->param('lotsofitems' => 1); |
490 |
} |
491 |
|
484 |
|
492 |
my $biblio_authorised_value_images = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $biblionumber, $record ) ); |
485 |
my $biblio_authorised_value_images = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $biblionumber, $record ) ); |
493 |
|
486 |
|
Lines 516-521
$template->param( show_priority => $has_hold ) ;
Link Here
|
516 |
my $norequests = 1; |
509 |
my $norequests = 1; |
517 |
my $branches = GetBranches(); |
510 |
my $branches = GetBranches(); |
518 |
my %itemfields; |
511 |
my %itemfields; |
|
|
512 |
my (@itemloop, @otheritemloop); |
513 |
my $currentbranch = C4::Context->userenv ? C4::Context->userenv->{branch} : undef; |
514 |
if ($currentbranch) { |
515 |
$template->param(SeparateHoldings => 1); |
516 |
} |
519 |
for my $itm (@items) { |
517 |
for my $itm (@items) { |
520 |
$itm->{holds_count} = $item_reserves{ $itm->{itemnumber} }; |
518 |
$itm->{holds_count} = $item_reserves{ $itm->{itemnumber} }; |
521 |
$itm->{priority} = $priority{ $itm->{itemnumber} }; |
519 |
$itm->{priority} = $priority{ $itm->{itemnumber} }; |
Lines 566-571
for my $itm (@items) {
Link Here
|
566 |
$itm->{transfertfrom} = $branches->{$transfertfrom}{branchname}; |
564 |
$itm->{transfertfrom} = $branches->{$transfertfrom}{branchname}; |
567 |
$itm->{transfertto} = $branches->{$transfertto}{branchname}; |
565 |
$itm->{transfertto} = $branches->{$transfertto}{branchname}; |
568 |
} |
566 |
} |
|
|
567 |
my $homebranch = $itm->{homebranch}; |
568 |
if ($currentbranch) { |
569 |
if ($homebranch and $homebranch eq $currentbranch) { |
570 |
push @itemloop, $itm; |
571 |
} else { |
572 |
push @otheritemloop, $itm; |
573 |
} |
574 |
} else { |
575 |
push @itemloop, $itm; |
576 |
} |
577 |
} |
578 |
|
579 |
# If there is a lot of items, and the user has not decided |
580 |
# to view them all yet, we first warn him |
581 |
# TODO: The limit of 50 could be a syspref |
582 |
my $viewallitems = $query->param('viewallitems'); |
583 |
if (scalar(@itemloop) >= 50 && !$viewallitems) { |
584 |
$template->param('lotsofitems' => 1); |
569 |
} |
585 |
} |
570 |
|
586 |
|
571 |
## get notes and subjects from MARC record |
587 |
## get notes and subjects from MARC record |
Lines 694-700
if(C4::Context->preference("ISBD")) {
Link Here
|
694 |
} |
710 |
} |
695 |
|
711 |
|
696 |
$template->param( |
712 |
$template->param( |
697 |
ITEM_RESULTS => \@items, |
713 |
itemloop => \@itemloop, |
|
|
714 |
otheritemloop => \@otheritemloop, |
698 |
subscriptionsnumber => $subscriptionsnumber, |
715 |
subscriptionsnumber => $subscriptionsnumber, |
699 |
biblionumber => $biblionumber, |
716 |
biblionumber => $biblionumber, |
700 |
subscriptions => \@subs, |
717 |
subscriptions => \@subs, |
Lines 957-963
my $defaulttab =
Link Here
|
957 |
? 'subscriptions' : |
974 |
? 'subscriptions' : |
958 |
$opac_serial_default eq 'serialcollection' && @serialcollections > 0 |
975 |
$opac_serial_default eq 'serialcollection' && @serialcollections > 0 |
959 |
? 'serialcollection' : |
976 |
? 'serialcollection' : |
960 |
$opac_serial_default eq 'holdings' && $dat->{'count'} > 0 |
977 |
$opac_serial_default eq 'holdings' && scalar (@itemloop) > 0 |
961 |
? 'holdings' : |
978 |
? 'holdings' : |
962 |
$subscriptionsnumber |
979 |
$subscriptionsnumber |
963 |
? 'subscriptions' : |
980 |
? 'subscriptions' : |
964 |
- |
|
|