From 14956ec02ded21ee88a1c0766ea6709dfd581973 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 12 Aug 2012 22:33:24 +0200 Subject: [PATCH] Bug 8621: Alternative template for cart email Content-Type: text/plain; charset="UTF-8" - uses less list elements, in favour of paragraphs and line breaks - reimplements a link to the opac for each record Note: In order for the URLs to be correct this needs to be tested together with the patch for bug 8626. To test: - Add several records to the cart, add items with and without items - Send yourself the cart as email and check formatting - Update po files for any language, translate the po file for OPAC and install language - Send yourself the cart email again from the translated templates, check formatting Signed-off-by: Jared Camins-Esakov --- .../opac-tmpl/prog/en/modules/opac-sendbasket.tt | 212 +++++++++++++------- 1 files changed, 139 insertions(+), 73 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tt index 1e7fbca..dc6929d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tt @@ -3,90 +3,156 @@ Your cart [% USE HtmlToText %] -[% myhtml FILTER html2text(leftmargin => 0, rightmargin => 50) %] +[% myhtml FILTER html2text(leftmargin => 0, rightmargin => 0) %] [% myhtmltext | html2text %]
+ [% FILTER html2text %] -

Hi, -

-

[% firstname %] [% surname %] sent you a cart from our online catalog.

+

Hi,

+ +

[% firstname %] [% surname %] 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.

+

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.

+
[% END %] [% FILTER html2text %] -
-[% IF comment %] -

[% comment %]

-
-[% END %] + [% IF comment %] +

[% comment %]

+
+ [% END %] +
    + [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %] +
  1. + + [% BIBLIO_RESULT.title %] + [% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %] + + +

    + [% IF ( BIBLIO_RESULT.HASAUTHORS ) %] + Author(s): [% IF ( BIBLIO_RESULT.author ) %][% BIBLIO_RESULT.author %][% 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 %][% MARCAUTHOR_SUBFIELDS_LOO.value %] + [% END %] + [% UNLESS ( loop.last ) %];[% END %] + [% END %] + [% END %] +
    + [% END %] + + [% IF ( BIBLIO_RESULT.ISBN ) %] + + ISBN: [% BIBLIO_RESULT.ISBN %] +
    + [% END %] + + [% IF BIBLIO_RESULT.publishercode %] + + Published by: [% BIBLIO_RESULT.publishercode %] + [% IF ( BIBLIO_RESULT.publicationyear ) %] + in [% BIBLIO_RESULT.publicationyear %] + [% END %] + [% IF ( BIBLIO_RESULT.pages ) %] + , [% BIBLIO_RESULT.pages %] + [% END %] + [% IF BIBLIO_RESULT.size %] + , [% BIBLIO_RESULT.size %] + [% END %] +
    + [% END %] + + [% IF BIBLIO_RESULT.collection %] + + Collection: [% BIBLIO_RESULT.seriestitle %] +
    + [% END %] + + [% IF ( BIBLIO_RESULT.subject ) %] + + Subject: [% BIBLIO_RESULT.subject %] +
    + [% END %] + + [% IF ( BIBLIO_RESULT.copyrightdate ) %] + + Copyright year: [% BIBLIO_RESULT.copyrightdate %] +
    + [% END %] + + [% IF ( BIBLIO_RESULT.notes ) %] + + Notes : [% BIBLIO_RESULT.notes %] +
    + [% END %] + + [% IF ( BIBLIO_RESULT.unititle ) %] + + Unified title: [% BIBLIO_RESULT.unititle %] +
    + [% END %] + + [% IF ( BIBLIO_RESULT.serial ) %] + + Serial: [% BIBLIO_RESULT.serial %] +
    + [% END %] + + [% IF ( BIBLIO_RESULT.dewey ) %] + + Dewey: [% BIBLIO_RESULT.dewey %] +
    + [% END %] + + [% IF ( BIBLIO_RESULT.classification ) %] + + Classification: [% BIBLIO_RESULT.classification %] +
    + [% END %] + + [% IF ( BIBLIO_RESULT.lccn ) %] + + LCCN: [% BIBLIO_RESULT.lccn %] +
    + [% END %] + [% IF ( BIBLIO_RESULT.url ) %] + + URL: [% BIBLIO_RESULT.url |url %] + + [% END %] +

    + + [% IF ( OPACBaseURL ) %] +

    + In online catalog: [% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber %] +

    + [% END %] + [% IF ( BIBLIO_RESULT.ITEM_RESULTS.size ) %] +

    Items: +

      + [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
    • + [% ITEM_RESULT.branchname %] + [% ITEM_RESULT.location %] + [% IF ITEM_RESULT.itemcallnumber %]([% ITEM_RESULT.itemcallnumber %])[% END %] + [% ITEM_RESULT.barcode %] +
    • [% END %] +
    +

    + [% END %] +
    +
  2. + [% END %] +
-
    -[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %] -
  1. -[% BIBLIO_RESULT.title %] -[% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %] -
      -[% IF ( BIBLIO_RESULT.HASAUTHORS ) %] -
    • Author(s): [% IF ( BIBLIO_RESULT.author ) %][% BIBLIO_RESULT.author %][% 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 %][% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %][% END %][% END %][% END %][% END %]
    • -[% IF ( BIBLIO_RESULT.ISBN ) %] -
    • ISBN: [% BIBLIO_RESULT.ISBN %]
    • -[% END %] -[% IF BIBLIO_RESULT.publishercode %] -
    • -Published by: [% BIBLIO_RESULT.publishercode %][% IF ( BIBLIO_RESULT.publicationyear ) %] in [% BIBLIO_RESULT.publicationyear %][% END %][% IF ( BIBLIO_RESULT.pages ) %], [% BIBLIO_RESULT.pages %][% END %][% IF BIBLIO_RESULT.size %], [% BIBLIO_RESULT.size %][% END %] -
    • -[% END %] -[% IF BIBLIO_RESULT.collection %] -
    • Collection: [% BIBLIO_RESULT.seriestitle %]
    • -[% END %] -[% IF ( BIBLIO_RESULT.subject ) %] -
    • Subject: [% BIBLIO_RESULT.subject %]
    • -[% END %] -[% IF ( BIBLIO_RESULT.copyrightdate ) %] -
    • Copyright year: [% BIBLIO_RESULT.copyrightdate %]
    • -[% END %] -[% IF ( BIBLIO_RESULT.notes ) %] -
    • Notes : [% BIBLIO_RESULT.notes %]
    • -[% END %] -[% IF ( BIBLIO_RESULT.unititle ) %] -
    • Unified title: [% BIBLIO_RESULT.unititle %]
    • -[% END %] -[% IF ( BIBLIO_RESULT.serial ) %] -
    • Serial: [% BIBLIO_RESULT.serial %]
    • -[% END %] -[% IF ( BIBLIO_RESULT.dewey ) %] -
    • Dewey: [% BIBLIO_RESULT.dewey %]
    • -[% END %] -[% IF ( BIBLIO_RESULT.classification ) %] -
    • Classification: [% BIBLIO_RESULT.classification %]
    • -[% END %] -[% IF ( BIBLIO_RESULT.lccn ) %] -
    • LCCN: [% BIBLIO_RESULT.lccn %]
    • -[% END %] -[% IF ( BIBLIO_RESULT.url ) %] -
    • URL : [% BIBLIO_RESULT.url %]
    • -[% END %] -
    • Items: -
        -[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] -
      • -[% ITEM_RESULT.branchname %] -[% ITEM_RESULT.location %] -[% IF ITEM_RESULT.itemcallnumber %]([% ITEM_RESULT.itemcallnumber %])[% END %] -[% ITEM_RESULT.barcode %] -
      • -[% END %] -
      -
    -
  2. -[% END %] -
[% END %] -- 1.7.2.5