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

(-)a/Koha/Biblio.pm (+19 lines)
Lines 813-818 sub to_api { Link Here
813
    return { %$response, %$biblioitem };
813
    return { %$response, %$biblioitem };
814
}
814
}
815
815
816
=head2 get_host_item_entries
817
818
    my @host_item_entries = $biblio->get_host_item_entries;
819
820
Returns a list of MARC::Field objects of the 773 tag which contain host item entry information.
821
Returns undef if no 773 defined.
822
823
=cut
824
825
sub get_host_item_entries {
826
    my ( $self ) = @_;
827
828
    my $record = $self->metadata->record;
829
830
    my @host_item_entries = $record->field('773');
831
832
    return ( @host_item_entries > 0 ) ? \@host_item_entries : undef;
833
}
834
816
=head3 to_api_mapping
835
=head3 to_api_mapping
817
836
818
This method returns the mapping for representing a Koha::Biblio object
837
This method returns the mapping for representing a Koha::Biblio object
(-)a/basket/basket.pl (+2 lines)
Lines 61-66 foreach my $biblionumber ( @bibs ) { Link Here
61
61
62
    my $dat              = &GetBiblioData($biblionumber);
62
    my $dat              = &GetBiblioData($biblionumber);
63
    next unless $dat;
63
    next unless $dat;
64
    my $biblio           = Koha::Biblios->find($biblionumber);
64
    my $record           = &GetMarcBiblio({ biblionumber => $biblionumber });
65
    my $record           = &GetMarcBiblio({ biblionumber => $biblionumber });
65
    my $marcnotesarray   = GetMarcNotes( $record, $marcflavour );
66
    my $marcnotesarray   = GetMarcNotes( $record, $marcflavour );
66
    my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
67
    my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
Lines 101-106 foreach my $biblionumber ( @bibs ) { Link Here
101
    $dat->{MARCSERIES}  = $marcseriesarray;
102
    $dat->{MARCSERIES}  = $marcseriesarray;
102
    $dat->{MARCURLS}    = $marcurlsarray;
103
    $dat->{MARCURLS}    = $marcurlsarray;
103
    $dat->{HASAUTHORS}  = $hasauthors;
104
    $dat->{HASAUTHORS}  = $hasauthors;
105
    $dat->{HOSTITEMENTRIES} = $biblio->get_host_item_entries;
104
106
105
    if ( C4::Context->preference("IntranetBiblioDefaultView") eq "normal" ) {
107
    if ( C4::Context->preference("IntranetBiblioDefaultView") eq "normal" ) {
106
        $dat->{dest} = "/cgi-bin/koha/catalogue/detail.pl";
108
        $dat->{dest} = "/cgi-bin/koha/catalogue/detail.pl";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt (+28 lines)
Lines 217-222 Link Here
217
                                        </tr>
217
                                        </tr>
218
                                    [% END %]
218
                                    [% END %]
219
219
220
                                    [% IF BIBLIO_RESULT.HOSTITEMENTRIES %]
221
                                        <tr>
222
                                            <th scope="row">Host item entries</th>
223
                                            <td>
224
                                                [% FOREACH entry IN BIBLIO_RESULT.HOSTITEMENTRIES %]
225
                                                    <p>
226
                                                        [% IF entry.subfield('0') %]
227
                                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% entry.subfield('0') | uri %]">[% entry.subfield('t') | html %]</a>
228
                                                        [% ELSE %]
229
                                                            [% entry.subfield('t') | html %]
230
                                                        [% END %]
231
                                                    </p>
232
                                                [% END %]
233
                                            </td>
234
                                        </tr>
235
                                    [% END %]
236
220
                                    <tr>
237
                                    <tr>
221
                                        <th scope="row">Location(s)</th>
238
                                        <th scope="row">Location(s)</th>
222
                                        <td>
239
                                        <td>
Lines 281-286 Link Here
281
                                            [% IF ( BIBLIO_RESULT.notes ) %]
298
                                            [% IF ( BIBLIO_RESULT.notes ) %]
282
                                                <p>[% BIBLIO_RESULT.notes | html %]</p>
299
                                                <p>[% BIBLIO_RESULT.notes | html %]</p>
283
                                            [% END %]
300
                                            [% END %]
301
                                            [% IF BIBLIO_RESULT.HOSTITEMENTRIES %]
302
                                                [% FOREACH entry IN BIBLIO_RESULT.HOSTITEMENTRIES %]
303
                                                    <p>Host item entry:
304
                                                        [% IF entry.subfield('0') %]
305
                                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% entry.subfield('0') | uri %]">[% entry.subfield('t') | html %]</a>
306
                                                        [% ELSE %]
307
                                                            [% entry.subfield('t') | html %]
308
                                                        [% END %]
309
                                                    </p>
310
                                                [% END %]
311
                                            [% END %]
284
                                            <!-- COinS / Openurl -->
312
                                            <!-- COinS / Openurl -->
285
                                            <span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.au=[% BIBLIO_RESULT.author | html %]&amp;rft.btitle=[% BIBLIO_RESULT.title |url %]&amp;rft.date=[% BIBLIO_RESULT.publicationyear | html %]&amp;rft.tpages=[% BIBLIO_RESULT.item('size') | html %]&amp;rft.isbn=[% BIBLIO_RESULT.isbn |url %]&amp;rft.aucorp=&amp;rft.place=[% BIBLIO_RESULT.place | html %]&amp;rft.pub=[% BIBLIO_RESULT.publisher |url %]&amp;rft.edition=[% BIBLIO_RESULT.edition | html %]&amp;rft.series=[% BIBLIO_RESULT.series | html %]&amp;rft.genre="></span>
313
                                            <span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.au=[% BIBLIO_RESULT.author | html %]&amp;rft.btitle=[% BIBLIO_RESULT.title |url %]&amp;rft.date=[% BIBLIO_RESULT.publicationyear | html %]&amp;rft.tpages=[% BIBLIO_RESULT.item('size') | html %]&amp;rft.isbn=[% BIBLIO_RESULT.isbn |url %]&amp;rft.aucorp=&amp;rft.place=[% BIBLIO_RESULT.place | html %]&amp;rft.pub=[% BIBLIO_RESULT.publisher |url %]&amp;rft.edition=[% BIBLIO_RESULT.edition | html %]&amp;rft.series=[% BIBLIO_RESULT.series | html %]&amp;rft.genre="></span>
286
                                        </td>
314
                                        </td>
(-)a/virtualshelves/sendshelf.pl (-1 / +2 lines)
Lines 67-72 if ($to_address) { Link Here
67
67
68
    while ( my $content = $contents->next ) {
68
    while ( my $content = $contents->next ) {
69
        my $biblionumber     = $content->biblionumber;
69
        my $biblionumber     = $content->biblionumber;
70
        my $biblio           = Koha::Biblios->find($biblionumber);
70
        my $dat              = GetBiblioData($biblionumber);
71
        my $dat              = GetBiblioData($biblionumber);
71
        my $record           = GetMarcBiblio({
72
        my $record           = GetMarcBiblio({
72
            biblionumber => $biblionumber,
73
            biblionumber => $biblionumber,
Lines 82-87 if ($to_address) { Link Here
82
        $dat->{'biblionumber'} = $biblionumber;
83
        $dat->{'biblionumber'} = $biblionumber;
83
        $dat->{ITEM_RESULTS}   = \@items;
84
        $dat->{ITEM_RESULTS}   = \@items;
84
        $dat->{HASAUTHORS}     = $dat->{'author'} || @$marcauthorsarray;
85
        $dat->{HASAUTHORS}     = $dat->{'author'} || @$marcauthorsarray;
86
        $dat->{HOSTITEMENTRIES} = $biblio->get_host_item_entries;
85
87
86
        $iso2709 .= $record->as_usmarc();
88
        $iso2709 .= $record->as_usmarc();
87
89
88
- 

Return to bug 16522