Line 0
Link Here
|
|
|
1 |
use Modern::Perl; |
2 |
|
3 |
return { |
4 |
bug_number => "3150", |
5 |
description => "Add LIST and CART notices", |
6 |
up => sub { |
7 |
my ($args) = @_; |
8 |
my ($dbh, $out) = @$args{qw(dbh out)}; |
9 |
|
10 |
$dbh->do(q{ INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES |
11 |
('catalogue','LIST','','Send list',1,'Your list: [% listname | html %]',"Hi, |
12 |
[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %]. |
13 |
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. |
14 |
<hr/>[% comment | html %]<hr/> |
15 |
<ol>[% FOREACH biblio IN biblios %]<li> |
16 |
[% biblio.title | html %] |
17 |
[% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %] |
18 |
[% biblio.part_number | html %] [% biblio.part_name | html %] |
19 |
[% IF ( biblio.author || biblio.get_marc_contributors ) %]Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %][% IF ( biblio.get_marc_contributors ) %][% IF ( biblio.author ) %]; [% END %][% FOREACH author IN biblio.get_marc_contributors %][% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %][% subfield.separator | html %][% subfield.value | html %][% END %][% UNLESS ( loop.last ) %];[% END %][% END %][% END %][% END %] |
20 |
[% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %][% END %] |
21 |
[% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %][% END %] |
22 |
[% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %][% END %] |
23 |
[% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %][% END %] |
24 |
[% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %][% END %] |
25 |
[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %][% END %] |
26 |
[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %][% END %] |
27 |
[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %][% END %] |
28 |
[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %][% END %] |
29 |
[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %][% IF ( OPACBaseURL ) %]In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %][% END %] |
30 |
[% IF ( biblio.items.count > 0 ) %]Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %] |
31 |
[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %] |
32 |
[% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %] |
33 |
[% item.barcode | html %]</li>[% END %]</ul>[% END %] |
34 |
<hr/></li>[% END %]</ol>", 'email','default' ), |
35 |
('catalogue','CART','','Send cart',1,'Your cart',"Hi, |
36 |
[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog. |
37 |
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. |
38 |
<hr/>[% comment | html %]<hr/> |
39 |
<ol>[% FOREACH biblio IN biblios %]<li> |
40 |
[% biblio.title | html %] |
41 |
[% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %] |
42 |
[% biblio.part_number | html %] [% biblio.part_name | html %] |
43 |
[% IF ( biblio.author || biblio.get_marc_contributors ) %]Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %][% IF ( biblio.get_marc_contributors ) %][% IF ( biblio.author ) %]; [% END %][% FOREACH author IN biblio.get_marc_contributors %][% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %][% subfield.separator | html %][% subfield.value | html %][% END %][% UNLESS ( loop.last ) %];[% END %][% END %][% END %][% END %] |
44 |
[% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %][% END %] |
45 |
[% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %][% END %] |
46 |
[% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %][% END %] |
47 |
[% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %][% END %] |
48 |
[% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %][% END %] |
49 |
[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %][% END %] |
50 |
[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %][% END %] |
51 |
[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %][% END %] |
52 |
[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %][% END %] |
53 |
[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %][% IF ( OPACBaseURL ) %]In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %][% END %] |
54 |
[% IF ( biblio.items.count > 0 ) %]Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %] |
55 |
[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %] |
56 |
[% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %] |
57 |
[% item.barcode | html %]</li>[% END %]</ul>[% END %] |
58 |
<hr/></li>[% END %]</ol>",'email','default') }); |
59 |
|
60 |
say $out "Add LIST and CART notices"; |
61 |
}, |
62 |
}; |