View | Details | Raw Unified | Return to bug 31224
Collapse All | Expand All

(-)a/Koha/Biblio.pm (-9 / +10 lines)
Lines 127-136 sub record_schema { Link Here
127
127
128
    my $record = $biblio->metadata_record(
128
    my $record = $biblio->metadata_record(
129
        {
129
        {
130
            [ embed_items => 1|0,
130
            [
131
              opac        => 1|0,
131
                embed_items         => 1 | 0,
132
              patron      => $patron,
132
                interface           => 'opac' | 'intranet',
133
              expand_coded_fields => 1|0 ]
133
                patron              => $patron,
134
                expand_coded_fields => 1 | 0
135
            ]
134
        }
136
        }
135
    );
137
    );
136
138
Lines 146-163 sub metadata_record { Link Here
146
148
147
    my $record = $self->metadata->record;
149
    my $record = $self->metadata->record;
148
150
149
    if ( $params->{embed_items} or $params->{opac} ) {
151
    if ( $params->{embed_items} or $params->{interface} ) {
150
152
151
        # There's need for a RecordProcessor, let's do it!
153
        # There's need for a RecordProcessor, let's do it!
152
        my @filters;
154
        my @filters;
153
        my $options = {
155
        my $options = {
154
            interface     => 'opac',
156
            interface     => $params->{interface},
155
            frameworkcode => $self->frameworkcode,
157
            frameworkcode => $self->frameworkcode,
156
        };
158
        };
157
159
158
        if ( $params->{embed_items} ) {
160
        if ( $params->{embed_items} ) {
159
            push @filters, 'EmbedItems';
161
            push @filters, 'EmbedItems';
160
            if ( $params->{opac} ) {
162
            if ( $params->{interface} eq 'opac' ) {
161
                $options->{items} = $self->items->filter_by_visible_in_opac(
163
                $options->{items} = $self->items->filter_by_visible_in_opac(
162
                    {
164
                    {
163
                        (
165
                        (
Lines 171-177 sub metadata_record { Link Here
171
            }
173
            }
172
        }
174
        }
173
175
174
        if ( $params->{opac} ) {
176
        if ( $params->{interface} ) {
175
            push @filters, 'ViewPolicy';
177
            push @filters, 'ViewPolicy';
176
        }
178
        }
177
179
178
- 

Return to bug 31224