Lines 92-101
sub metadata {
Link Here
|
92 |
|
92 |
|
93 |
my $record = $biblio->metadata_record( |
93 |
my $record = $biblio->metadata_record( |
94 |
{ |
94 |
{ |
95 |
[ embed_items => 1|0, |
95 |
[ |
96 |
opac => 1|0, |
96 |
embed_items => 1 | 0, |
97 |
patron => $patron, |
97 |
interface => 'opac' | 'intranet', |
98 |
expand_coded_fields => 1|0 ] |
98 |
patron => $patron, |
|
|
99 |
expand_coded_fields => 1 | 0 |
100 |
] |
99 |
} |
101 |
} |
100 |
); |
102 |
); |
101 |
|
103 |
|
Lines 111-128
sub metadata_record {
Link Here
|
111 |
|
113 |
|
112 |
my $record = $self->metadata->record; |
114 |
my $record = $self->metadata->record; |
113 |
|
115 |
|
114 |
if ( $params->{embed_items} or $params->{opac} ) { |
116 |
if ( $params->{embed_items} or $params->{interface} ) { |
115 |
|
117 |
|
116 |
# There's need for a RecordProcessor, let's do it! |
118 |
# There's need for a RecordProcessor, let's do it! |
117 |
my @filters; |
119 |
my @filters; |
118 |
my $options = { |
120 |
my $options = { |
119 |
interface => 'opac', |
121 |
interface => $params->{interface}, |
120 |
frameworkcode => $self->frameworkcode, |
122 |
frameworkcode => $self->frameworkcode, |
121 |
}; |
123 |
}; |
122 |
|
124 |
|
123 |
if ( $params->{embed_items} ) { |
125 |
if ( $params->{embed_items} ) { |
124 |
push @filters, 'EmbedItems'; |
126 |
push @filters, 'EmbedItems'; |
125 |
if ( $params->{opac} ) { |
127 |
if ( $params->{interface} eq 'opac' ) { |
126 |
$options->{items} = $self->items->filter_by_visible_in_opac( |
128 |
$options->{items} = $self->items->filter_by_visible_in_opac( |
127 |
{ |
129 |
{ |
128 |
( |
130 |
( |
Lines 136-142
sub metadata_record {
Link Here
|
136 |
} |
138 |
} |
137 |
} |
139 |
} |
138 |
|
140 |
|
139 |
if ( $params->{opac} ) { |
141 |
if ( $params->{interface} ) { |
140 |
push @filters, 'ViewPolicy'; |
142 |
push @filters, 'ViewPolicy'; |
141 |
} |
143 |
} |
142 |
|
144 |
|
143 |
- |
|
|