|
Lines 744-779
if ( not $viewallitems and $items->count > $max_items_to_display ) {
Link Here
|
| 744 |
$item_info->{holding_branch} = $item->holding_branch; |
744 |
$item_info->{holding_branch} = $item->holding_branch; |
| 745 |
$item_info->{home_branch} = $item->home_branch; |
745 |
$item_info->{home_branch} = $item->home_branch; |
| 746 |
|
746 |
|
| 747 |
if ( C4::Context->preference('UseDisplayModule') && $item->effective_homebranch ) { |
747 |
if ( C4::Context->preference('UseDisplayModule') && $item->effective_home_library ) { |
| 748 |
my $effective_homebranch = $item->effective_homebranch; |
748 |
my $effective_home_library = $item->effective_home_library; |
| 749 |
my $effective_homebranch_id = $item->effective_homebranch->branchcode; |
749 |
my $effective_home_library_opac_info = $effective_home_library->opac_info( { lang => $lang } ); |
| 750 |
my $effective_homebranch_opac_info = $item->effective_homebranch->opac_info( { lang => $lang } ); |
|
|
| 751 |
|
750 |
|
| 752 |
$item_info->{home_library_info} = $effective_homebranch_opac_info |
751 |
$item_info->{home_library_info} = $effective_home_library_opac_info |
| 753 |
if ($effective_homebranch_opac_info); |
752 |
if ($effective_home_library_opac_info); |
| 754 |
|
753 |
|
| 755 |
# If it starts with "DISPLAY:", use it as-is, otherwise look it up |
754 |
$item_info->{home_branch} = $effective_home_library; |
| 756 |
if ( $effective_homebranch_id =~ /^DISPLAY:/ ) { |
|
|
| 757 |
$item_info->{home_branch} = $effective_homebranch_id; |
| 758 |
} else { |
| 759 |
$item_info->{home_branch} = $effective_homebranch; |
| 760 |
} |
| 761 |
} |
755 |
} |
| 762 |
|
756 |
|
| 763 |
if ( C4::Context->preference('UseDisplayModule') && $item->effective_holdingbranch ) { |
757 |
if ( C4::Context->preference('UseDisplayModule') && $item->effective_holding_library ) { |
| 764 |
my $effective_holdingbranch = $item->effective_holdingbranch; |
758 |
my $effective_holding_library = $item->effective_holding_library; |
| 765 |
my $effective_holdingbranch_id = $item->effective_holdingbranch->branchcode; |
759 |
my $effective_holding_library_opac_info = $effective_holding_library->opac_info( { lang => $lang } ); |
| 766 |
my $effective_holdingbranch_opac_info = $item->effective_homebranch->opac_info( { lang => $lang } ); |
|
|
| 767 |
|
760 |
|
| 768 |
$item_info->{holding_library_info} = $effective_holdingbranch_opac_info |
761 |
$item_info->{holding_library_info} = $effective_holding_library_opac_info |
| 769 |
if ($effective_holdingbranch_opac_info); |
762 |
if ($effective_holding_library_opac_info); |
| 770 |
|
763 |
|
| 771 |
# If it starts with "DISPLAY:", use it as-is, otherwise look it up |
764 |
$item_info->{holding_branch} = $effective_holding_library; |
| 772 |
if ( $effective_holdingbranch_id =~ /^DISPLAY:/ ) { |
|
|
| 773 |
$item_info->{holding_branch} = $effective_holdingbranch_id; |
| 774 |
} else { |
| 775 |
$item_info->{holding_branch} = $effective_holdingbranch; |
| 776 |
} |
| 777 |
} |
765 |
} |
| 778 |
|
766 |
|
| 779 |
my $itemtype = Koha::ItemTypes->find( $item->effective_itemtype ); |
767 |
my $itemtype = Koha::ItemTypes->find( $item->effective_itemtype ); |