@@ -, +, @@ --- .../bug_3150_-_add_LIST_and_CART_notices.perl | 297 +++++++++++++++++++++ .../data/mysql/en/mandatory/sample_notices.yml | 7 + opac/opac-sendshelf.pl | 86 +++--- 3 files changed, 339 insertions(+), 51 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_3150_-_add_LIST_and_CART_notices.perl --- a/installer/data/mysql/atomicupdate/bug_3150_-_add_LIST_and_CART_notices.perl +++ a/installer/data/mysql/atomicupdate/bug_3150_-_add_LIST_and_CART_notices.perl @@ -0,0 +1,297 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES + ('catalogue','LIST','','Send list',1,'Your list: [% listname %]'," +
Hi,
+ +[% borrower.firstname %] [% borrower.surname %] sent you a list from our online catalog called: [% listname %].
+ +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.
+<
+ [% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
+ Author(s): [% IF ( BIBLIO_RESULT.author ) %][% BIBLIO_RESULT.author | $raw %][% END %]
+
+ [% IF ( BIBLIO_RESULT.MARCAUTHORS ) %]
+ [% IF ( BIBLIO_RESULT.author ) %]; [% END %]
+ [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %]
+ [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
+ [% MARCAUTHOR_SUBFIELDS_LOO.separator | $raw %][% MARCAUTHOR_SUBFIELDS_LOO.value | $raw %]
+ [% END %]
+ [% UNLESS ( loop.last ) %];[% END %]
+ [% END %]
+ [% END %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.ISBN ) %]
+
+ ISBN: [% FOREACH isbn IN BIBLIO_RESULT.ISBN %]
+ [% isbn | $raw %]
+ [% UNLESS ( loop.last ) %]; [% END %]
+ [% END %]
+
+ [% END %]
+
+ [% IF BIBLIO_RESULT.publishercode %]
+
+ Published by: [% BIBLIO_RESULT.publishercode | $raw %]
+ [% IF ( BIBLIO_RESULT.publicationyear ) %]
+ in [% BIBLIO_RESULT.publicationyear | $raw %]
+ [% END %]
+ [% IF ( BIBLIO_RESULT.pages ) %]
+ , [% BIBLIO_RESULT.pages | $raw %]
+ [% END %]
+ [% IF BIBLIO_RESULT.item('size') %]
+ , [% BIBLIO_RESULT.item('size') | html %]
+ [% END %]
+
+ [% END %]
+
+ [% IF BIBLIO_RESULT.collection %]
+
+ Collection: [% BIBLIO_RESULT.seriestitle | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.subject ) %]
+
+ Subject: [% BIBLIO_RESULT.subject | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.copyrightdate ) %]
+
+ Copyright year: [% BIBLIO_RESULT.copyrightdate | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.notes ) %]
+
+ Notes: [% BIBLIO_RESULT.notes | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.unititle ) %]
+
+ Unified title: [% BIBLIO_RESULT.unititle | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.serial ) %]
+
+ Serial: [% BIBLIO_RESULT.serial | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.dewey ) %]
+
+ Dewey: [% BIBLIO_RESULT.dewey | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.classification ) %]
+
+ Classification: [% BIBLIO_RESULT.classification | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.lccn ) %]
+
+ LCCN: [% BIBLIO_RESULT.lccn | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.url ) %]
+
+ URL: [% BIBLIO_RESULT.url | html %]
+
+ [% END %]
+
In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber | html %]
+ [% END %] + + [% IF ( BIBLIO_RESULT.ITEM_RESULTS.size ) %] +Items: +
Hi,
+ +[% firstname | $raw %] [% surname | $raw %] sent you a cart from our online catalog.
+ +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.
+[% comment | $raw %]
+
+ [% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
+ Author(s): [% IF ( BIBLIO_RESULT.author ) %][% BIBLIO_RESULT.author | $raw %][% END %]
+
+ [% IF ( BIBLIO_RESULT.MARCAUTHORS ) %]
+ [% IF ( BIBLIO_RESULT.author ) %]; [% END %]
+ [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %]
+ [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
+ [% MARCAUTHOR_SUBFIELDS_LOO.separator | $raw %][% MARCAUTHOR_SUBFIELDS_LOO.value | $raw %]
+ [% END %]
+ [% UNLESS ( loop.last ) %];[% END %]
+ [% END %]
+ [% END %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.ISBN ) %]
+
+ ISBN: [% BIBLIO_RESULT.ISBN | $raw %]
+
+ [% END %]
+
+ [% IF BIBLIO_RESULT.publishercode %]
+
+ Published by: [% BIBLIO_RESULT.publishercode | $raw %]
+ [% IF ( BIBLIO_RESULT.publicationyear ) %]
+ in [% BIBLIO_RESULT.publicationyear | $raw %]
+ [% END %]
+ [% IF ( BIBLIO_RESULT.pages ) %]
+ , [% BIBLIO_RESULT.pages | $raw %]
+ [% END %]
+ [% IF BIBLIO_RESULT.item('size') %]
+ , [% BIBLIO_RESULT.item('size') | $raw %]
+ [% END %]
+
+ [% END %]
+
+ [% IF BIBLIO_RESULT.collection %]
+
+ Collection: [% BIBLIO_RESULT.seriestitle | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.subject ) %]
+
+ Subject: [% BIBLIO_RESULT.subject | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.copyrightdate ) %]
+
+ Copyright year: [% BIBLIO_RESULT.copyrightdate | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.notes ) %]
+
+ Notes: [% BIBLIO_RESULT.notes | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.unititle ) %]
+
+ Unified title: [% BIBLIO_RESULT.unititle | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.serial ) %]
+
+ Serial: [% BIBLIO_RESULT.serial | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.dewey ) %]
+
+ Dewey: [% BIBLIO_RESULT.dewey | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.classification ) %]
+
+ Classification: [% BIBLIO_RESULT.classification | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.lccn ) %]
+
+ LCCN: [% BIBLIO_RESULT.lccn | $raw %]
+
+ [% END %]
+
+ [% IF ( BIBLIO_RESULT.url ) %]
+
+ URL: [% BIBLIO_RESULT.url | html %]
+
+ [% END %]
+
In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber | html %]
+ [% END %] + + [% IF ( BIBLIO_RESULT.ITEM_RESULTS.size ) %] +Items: +