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

(-)a/Koha/Biblio.pm (+16 lines)
Lines 1340-1345 sub get_marc_relatedparts_only { Link Here
1340
    return $relatedparts;
1340
    return $relatedparts;
1341
}
1341
}
1342
1342
1343
=head3 get_marc_hostinfo_only
1344
1345
    my $hostinfo = $biblio->get_marc_hostinfo_only;
1346
1347
Return host info only
1348
1349
=cut
1350
1351
sub get_marc_hostinfo_only {
1352
    my ($self) = @_;
1353
1354
    my ( $host, $relatedparts, $hostinfo ) = $self->get_marc_host;
1355
1356
    return $hostinfo;
1357
}
1358
1343
=head3 recalls
1359
=head3 recalls
1344
1360
1345
    my $recalls = $biblio->recalls;
1361
    my $recalls = $biblio->recalls;
(-)a/installer/data/mysql/atomicupdate/bug_3150_-_add_LIST_and_CART_notices.pl (-2 / +4 lines)
Lines 11-16 return { Link Here
11
('catalogue','LIST','','Send list',1,'Your list: [% listname | html %]',"[%- USE Branches -%]
11
('catalogue','LIST','','Send list',1,'Your list: [% listname | html %]',"[%- USE Branches -%]
12
[%- USE AuthorisedValues -%]
12
[%- USE AuthorisedValues -%]
13
[%- USE Koha -%]
13
[%- USE Koha -%]
14
[%- PROCESS 'html_helpers.inc' -%]
14
Hi,<br><br>
15
Hi,<br><br>
15
[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %].<br>
16
[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %].<br>
16
Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.<br>
17
Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.<br>
Lines 28-34 Please note that the attached file is a MARC bibliographic records file which ca Link Here
28
[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %]<br>[% END %]
29
[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %]<br>[% END %]
29
[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %]<br>[% END %]
30
[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %]<br>[% END %]
30
[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %]<br>[% END %]
31
[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %]<br>[% END %]
31
[% IF ( biblio.get_marc_host_only ) %]In: [% FOREACH entry IN biblio.get_marc_host_only %][% entry.title | html %][% IF ( entry.subtitle ) %][% FOREACH subtitle IN entry.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %][% entry.part_number | html %] [% entry.part_name | html %]<br>[% END %] [% biblio.get_marc_relatedparts_only %][% END %]
32
[% IF ( biblio.get_marc_host_only || biblio.get_marc_hostinfo_only ) %]In: [% IF biblio.get_marc_host_only.biblionumber %][% INCLUDE 'biblio-title.inc'  biblio=biblio.get_marc_host_only %] [% biblio.get_marc_relatedparts_only %][% ELSE %][% biblio.get_marc_hostinfo_only %][% END %]<br>[% END %]
32
[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %]<br>[% END %]
33
[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %]<br>[% END %]
33
<a href='[% Koha.Preference('OpacBaseUrl') %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]'>View in online catalog</a>
34
<a href='[% Koha.Preference('OpacBaseUrl') %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]'>View in online catalog</a>
34
[% IF ( biblio.items.count > 0 ) %]<br>Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %]
35
[% IF ( biblio.items.count > 0 ) %]<br>Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %]
Lines 39-44 Please note that the attached file is a MARC bibliographic records file which ca Link Here
39
('catalogue','CART','','Send cart',1,'Your cart',"[%- USE Branches -%]
40
('catalogue','CART','','Send cart',1,'Your cart',"[%- USE Branches -%]
40
[%- USE AuthorisedValues -%]
41
[%- USE AuthorisedValues -%]
41
[%- USE Koha -%]
42
[%- USE Koha -%]
43
[%- PROCESS 'html_helpers.inc' -%]
42
Hi,<br><br>
44
Hi,<br><br>
43
[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog.<br>
45
[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog.<br>
44
Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.<br>
46
Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.<br>
Lines 56-62 Please note that the attached file is a MARC bibliographic records file which ca Link Here
56
[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %]<br>[% END %]
58
[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %]<br>[% END %]
57
[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %]<br>[% END %]
59
[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %]<br>[% END %]
58
[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %]<br>[% END %]
60
[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %]<br>[% END %]
59
[% IF ( biblio.get_marc_host_only ) %]In: [% FOREACH entry IN biblio.get_marc_host_only %][% entry.title | html %][% IF ( entry.subtitle ) %][% FOREACH subtitle IN entry.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %][% entry.part_number | html %] [% entry.part_name | html %]<br>[% END %] [% biblio.get_marc_relatedparts_only %][% END %]
61
[% IF ( biblio.get_marc_host_only || biblio.get_marc_hostinfo_only ) %]In: [% IF biblio.get_marc_host_only.biblionumber %][% INCLUDE 'biblio-title.inc'  biblio=biblio.get_marc_host_only %] [% biblio.get_marc_relatedparts_only %][% ELSE %][% biblio.get_marc_hostinfo_only %][% END %]<br>[% END %]
60
[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %]<br>[% END %]
62
[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %]<br>[% END %]
61
<a href='[% Koha.Preference('OpacBaseUrl') %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]'>View in online catalog</a>
63
<a href='[% Koha.Preference('OpacBaseUrl') %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]'>View in online catalog</a>
62
[% IF ( biblio.items.count > 0 ) %]<br>Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %]
64
[% IF ( biblio.items.count > 0 ) %]<br>Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %]
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (-2 / +4 lines)
Lines 2199-2204 tables: Link Here
2199
            - "[%- USE Branches -%]"
2199
            - "[%- USE Branches -%]"
2200
            - "[%- USE AuthorisedValues -%]"
2200
            - "[%- USE AuthorisedValues -%]"
2201
            - "[%- USE Koha -%]"
2201
            - "[%- USE Koha -%]"
2202
            - "[%- PROCESS 'html_helpers.inc' -%]"
2202
            - "Hi,<br><br>"
2203
            - "Hi,<br><br>"
2203
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %].<br>"
2204
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %].<br>"
2204
            - "Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.<br>"
2205
            - "Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.<br>"
Lines 2215-2221 tables: Link Here
2215
            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %]<br>[% END %]"
2216
            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %]<br>[% END %]"
2216
            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %]<br>[% END %]"
2217
            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %]<br>[% END %]"
2217
            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %]<br>[% END %]"
2218
            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %]<br>[% END %]"
2218
            - "[% IF ( biblio.get_marc_host_only ) %]In: [% FOREACH entry IN biblio.get_marc_host_only %][% entry.title | html %][% IF ( entry.subtitle ) %][% FOREACH subtitle IN entry.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %][% entry.part_number | html %] [% entry.part_name | html %]<br>[% END %] [% biblio.get_marc_relatedparts_only %][% END %]"
2219
            - "[% IF ( biblio.get_marc_host_only || biblio.get_marc_hostinfo_only ) %]In: [% IF biblio.get_marc_host_only.biblionumber %][% INCLUDE 'biblio-title.inc'  biblio=biblio.get_marc_host_only %] [% biblio.get_marc_relatedparts_only %][% ELSE %][% biblio.get_marc_hostinfo_only %][% END %]<br>[% END %]"
2219
            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %]<br>[% END %]"
2220
            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %]<br>[% END %]"
2220
            - "[<a href='[% Koha.Preference('OpacBaseUrl') %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]'>View in online catalog</a>"
2221
            - "[<a href='[% Koha.Preference('OpacBaseUrl') %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]'>View in online catalog</a>"
2221
            - "[% IF ( biblio.items.count > 0 ) %]<br>Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %]"
2222
            - "[% IF ( biblio.items.count > 0 ) %]<br>Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %]"
Lines 2234-2239 tables: Link Here
2234
            - "[%- USE Branches -%]"
2235
            - "[%- USE Branches -%]"
2235
            - "[%- USE AuthorisedValues -%]"
2236
            - "[%- USE AuthorisedValues -%]"
2236
            - "[%- USE Koha -%]"
2237
            - "[%- USE Koha -%]"
2238
            - "[%- PROCESS 'html_helpers.inc' -%]"
2237
            - "Hi,<br><br>"
2239
            - "Hi,<br><br>"
2238
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog.<br>"
2240
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog.<br>"
2239
            - "Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.<br>"
2241
            - "Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.<br>"
Lines 2250-2256 tables: Link Here
2250
            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %]<br>[% END %]"
2252
            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %]<br>[% END %]"
2251
            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %]<br>[% END %]"
2253
            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %]<br>[% END %]"
2252
            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %]<br>[% END %]"
2254
            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %]<br>[% END %]"
2253
            - "[% IF ( biblio.get_marc_host_only ) %]In: [% FOREACH entry IN biblio.get_marc_host_only %][% entry.title | html %][% IF ( entry.subtitle ) %][% FOREACH subtitle IN entry.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %][% entry.part_number | html %] [% entry.part_name | html %]<br>[% END %] [% biblio.get_marc_relatedparts_only %][% END %]"
2255
            - "[% IF ( biblio.get_marc_host_only || biblio.get_marc_hostinfo_only ) %]In: [% IF biblio.get_marc_host_only.biblionumber %][% INCLUDE 'biblio-title.inc'  biblio=biblio.get_marc_host_only %] [% biblio.get_marc_relatedparts_only %][% ELSE %][% biblio.get_marc_hostinfo_only %][% END %]<br>[% END %]"
2254
            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %]<br>[% END %]"
2256
            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %]<br>[% END %]"
2255
            - "<a href='[% Koha.Preference('OpacBaseUrl') %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]'>View in online catalog</a>"
2257
            - "<a href='[% Koha.Preference('OpacBaseUrl') %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]'>View in online catalog</a>"
2256
            - "[% IF ( biblio.items.count > 0 ) %]<br>Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %]"
2258
            - "[% IF ( biblio.items.count > 0 ) %]<br>Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %]"
(-)a/t/db_dependent/Koha/Biblio/host_record.t (-2 / +3 lines)
Lines 36-42 $schema->storage->txn_begin; Link Here
36
our $builder = t::lib::TestBuilder->new;
36
our $builder = t::lib::TestBuilder->new;
37
37
38
subtest 'get_marc_host' => sub {
38
subtest 'get_marc_host' => sub {
39
    plan tests => 17;
39
    plan tests => 18;
40
40
41
    t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' );
41
    t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' );
42
    t::lib::Mocks::mock_preference( 'MARCOrgCode', 'xyz' );
42
    t::lib::Mocks::mock_preference( 'MARCOrgCode', 'xyz' );
Lines 97-102 subtest 'get_marc_host' => sub { Link Here
97
    is_deeply( $host_only, $host, "Host only retrieved successfully" );
97
    is_deeply( $host_only, $host, "Host only retrieved successfully" );
98
    my $relatedparts_only = $bib1->get_marc_relatedparts_only;
98
    my $relatedparts_only = $bib1->get_marc_relatedparts_only;
99
    is_deeply( $relatedparts_only, $relatedparts, "Related parts only retrieved successfully" );
99
    is_deeply( $relatedparts_only, $relatedparts, "Related parts only retrieved successfully" );
100
    my $hostinfo_only = $bib1->get_marc_hostinfo_only;
101
    is_deeply( $hostinfo_only, $info, "Host info only retrieved successfully");
100
102
101
    $marc->field('773')->delete_subfield( code => 't' ); # restore
103
    $marc->field('773')->delete_subfield( code => 't' ); # restore
102
104
103
- 

Return to bug 3150