|
Lines 69-74
if ( ! $biblionumber ) {
Link Here
|
| 69 |
exit; |
69 |
exit; |
| 70 |
} |
70 |
} |
| 71 |
|
71 |
|
|
|
72 |
my $record = GetMarcBiblio($biblionumber, 1); |
| 73 |
if ( ! $record ) { |
| 74 |
print $query->redirect("/cgi-bin/koha/errors/404.pl"); |
| 75 |
exit; |
| 76 |
} |
| 77 |
|
| 72 |
my @all_items = GetItemsInfo($biblionumber); |
78 |
my @all_items = GetItemsInfo($biblionumber); |
| 73 |
my @items2hide; |
79 |
my @items2hide; |
| 74 |
if (scalar @all_items >= 1) { |
80 |
if (scalar @all_items >= 1) { |
|
Lines 80-96
if (scalar @all_items >= 1) {
Link Here
|
| 80 |
} |
86 |
} |
| 81 |
} |
87 |
} |
| 82 |
|
88 |
|
| 83 |
my $itemtype = &GetFrameworkCode($biblionumber); |
89 |
my $framework = &GetFrameworkCode( $biblionumber ); |
| 84 |
my $tagslib = &GetMarcStructure( 0, $itemtype ); |
90 |
my $tagslib = &GetMarcStructure( 0, $framework ); |
| 85 |
my ($tag_itemnumber,$subtag_itemnumber) = &GetMarcFromKohaField('items.itemnumber',$itemtype); |
91 |
my ($tag_itemnumber,$subtag_itemnumber) = &GetMarcFromKohaField('items.itemnumber',$framework); |
| 86 |
my $biblio = GetBiblioData($biblionumber); |
92 |
my $biblio = GetBiblioData($biblionumber); |
| 87 |
$biblionumber = $biblio->{biblionumber}; |
93 |
|
| 88 |
my $record = GetMarcBiblio($biblionumber, 1); |
94 |
my $record_processor = Koha::RecordProcessor->new({ |
| 89 |
if ( ! $record ) { |
95 |
filters => 'ViewPolicy', |
| 90 |
print $query->redirect("/cgi-bin/koha/errors/404.pl"); |
96 |
options => { |
| 91 |
exit; |
97 |
interface => 'opac', |
| 92 |
} |
98 |
frameworkcode => $framework |
| 93 |
my $record_processor = Koha::RecordProcessor->new({ filters => 'ViewPolicy' }); |
99 |
} |
|
|
100 |
}); |
| 94 |
$record_processor->process($record); |
101 |
$record_processor->process($record); |
| 95 |
|
102 |
|
| 96 |
# open template |
103 |
# open template |
|
Lines 104-110
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
| 104 |
} |
111 |
} |
| 105 |
); |
112 |
); |
| 106 |
|
113 |
|
| 107 |
my ($bt_tag,$bt_subtag) = GetMarcFromKohaField('biblio.title',$itemtype); |
114 |
my ($bt_tag,$bt_subtag) = GetMarcFromKohaField('biblio.title',$framework); |
| 108 |
$template->param( |
115 |
$template->param( |
| 109 |
bibliotitle => $biblio->{title}, |
116 |
bibliotitle => $biblio->{title}, |
| 110 |
) if $tagslib->{$bt_tag}->{$bt_subtag}->{hidden} <= 0 && # <=0 OPAC visible. |
117 |
) if $tagslib->{$bt_tag}->{$bt_subtag}->{hidden} <= 0 && # <=0 OPAC visible. |
|
Lines 291-297
foreach my $field (@fields) {
Link Here
|
| 291 |
push @item_loop, $item if $item; |
298 |
push @item_loop, $item if $item; |
| 292 |
} |
299 |
} |
| 293 |
my ( $holdingbrtagf, $holdingbrtagsubf ) = |
300 |
my ( $holdingbrtagf, $holdingbrtagsubf ) = |
| 294 |
&GetMarcFromKohaField( "items.holdingbranch", $itemtype ); |
301 |
&GetMarcFromKohaField( "items.holdingbranch", $framework ); |
| 295 |
@item_loop = |
302 |
@item_loop = |
| 296 |
sort { ($a->{$holdingbrtagsubf}||'') cmp ($b->{$holdingbrtagsubf}||'') } @item_loop; |
303 |
sort { ($a->{$holdingbrtagsubf}||'') cmp ($b->{$holdingbrtagsubf}||'') } @item_loop; |
| 297 |
|
304 |
|