|
Lines 92-104
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
| 92 |
|
92 |
|
| 93 |
my $patron = Koha::Patrons->find($loggedinuser); |
93 |
my $patron = Koha::Patrons->find($loggedinuser); |
| 94 |
my $biblio = Koha::Biblios->find($biblionumber); |
94 |
my $biblio = Koha::Biblios->find($biblionumber); |
| 95 |
my $record = $biblio->metadata->record( |
95 |
my $record = $biblio->metadata->record; |
| 96 |
{ |
96 |
|
| 97 |
embed_items => 1, |
|
|
| 98 |
opac => 1, |
| 99 |
patron => $patron, |
| 100 |
} |
| 101 |
); |
| 102 |
if ( ! $record ) { |
97 |
if ( ! $record ) { |
| 103 |
print $query->redirect("/cgi-bin/koha/errors/404.pl"); |
98 |
print $query->redirect("/cgi-bin/koha/errors/404.pl"); |
| 104 |
exit; |
99 |
exit; |
|
Lines 113-126
unless ( $patron and $patron->category->override_hidden_items ) {
Link Here
|
| 113 |
} |
108 |
} |
| 114 |
} |
109 |
} |
| 115 |
|
110 |
|
|
|
111 |
my $items = $biblio->items->filter_by_visible_in_opac({ patron => $patron }); |
| 116 |
my $framework = $biblio ? $biblio->frameworkcode : q{}; |
112 |
my $framework = $biblio ? $biblio->frameworkcode : q{}; |
| 117 |
my $tagslib = &GetMarcStructure( 0, $framework ); |
113 |
my $tagslib = &GetMarcStructure( 0, $framework ); |
| 118 |
|
114 |
|
| 119 |
my $record_processor = Koha::RecordProcessor->new({ |
115 |
my $record_processor = Koha::RecordProcessor->new({ |
| 120 |
filters => 'ViewPolicy', |
116 |
filters => [ 'EmbedItems', 'ViewPolicy' ], |
| 121 |
options => { |
117 |
options => { |
| 122 |
interface => 'opac', |
118 |
interface => 'opac', |
| 123 |
frameworkcode => $framework |
119 |
frameworkcode => $framework, |
|
|
120 |
items => [ $items->as_list ], |
| 124 |
} |
121 |
} |
| 125 |
}); |
122 |
}); |
| 126 |
$record_processor->process($record); |
123 |
$record_processor->process($record); |
|
Lines 140-146
$template->param(
Link Here
|
| 140 |
$tagslib->{$bt_tag}->{$bt_subtag}->{hidden} > -8; # except -8; |
137 |
$tagslib->{$bt_tag}->{$bt_subtag}->{hidden} > -8; # except -8; |
| 141 |
|
138 |
|
| 142 |
my $allow_onshelf_holds; |
139 |
my $allow_onshelf_holds; |
| 143 |
my $items = $biblio->items; |
140 |
$items->reset; |
| 144 |
|
141 |
|
| 145 |
while ( my $item = $items->next ) { |
142 |
while ( my $item = $items->next ) { |
| 146 |
$allow_onshelf_holds = Koha::CirculationRules->get_onshelfholds_policy( { item => $item, patron => $patron } ) |
143 |
$allow_onshelf_holds = Koha::CirculationRules->get_onshelfholds_policy( { item => $item, patron => $patron } ) |
| 147 |
- |
|
|