Bug 8621 - Template for sending out carts not formatting correctly
Summary: Template for sending out carts not formatting correctly
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low normal (vote)
Assignee: Katrin Fischer
QA Contact:
URL:
Keywords:
Depends on: 8626
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-12 14:52 UTC by Katrin Fischer
Modified: 2013-12-05 19:57 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 8621: Fix formatting in cart email (8.57 KB, patch)
2012-08-12 17:36 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 8621: Alternative template for cart email (8.97 KB, patch)
2012-08-14 06:37 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 8621: Alternative template for cart email (8.92 KB, patch)
2012-08-14 14:32 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2012-08-12 14:52:30 UTC
I send myself a cart from the English and from the German templates, both emails show wrong formatting. I sent 2 titles, one with, one without items. Then numbering is wrong:

Hi,

   Katrin Fischer 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.
 
   ---------------------------------------------------------------------

     1. Allgemeine deutsche Biographie /

         * Author(s): Bayerische Akademie der Wissenschaften
           --Historische Kommission

         *  Published by: Duncker & Humblot,, 54

         * Notes : Zitiert.: ADB. - Neudr. mit Ersch.-Ort Berlin. - In
           Fraktur

         * Items:

     2. Veröffentlichungen des Max-Planck-Instituts für Geschichte

     3.  Published by: Vandenhoeck & Ruprecht, 54

     4. URL : http://www.bsz-bw.de/rekla/show.php?mode=urce&id2

     5. Items:

         *  Midway (non public note testing) dia
Comment 1 Katrin Fischer 2012-08-12 16:38:12 UTC
The new template is also missing a link to the catalog. In HTML format the title would be linked, but when converting it to text, the link gets lost.
Comment 2 Katrin Fischer 2012-08-12 17:18:08 UTC
Ok, I tried bringing back the links to the OPAC, but I have run into a bigger issue with html2text. If the link is longer than the line width, the link is cut off. 

Result looks like this:
         *  In the online catalog:
           http://localhost/cgi-bin/koha/opac-detail.pl?biblionumber

So even with a short URL we got a problem here. :(
Comment 3 Katrin Fischer 2012-08-12 17:36:20 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2012-08-13 05:10:29 UTC
I filed bug 8628 for the URL problem - turns out it's not the length but = being part of the URL that is causing the problem.
Comment 5 Katrin Fischer 2012-08-14 06:37:31 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2012-08-14 06:38:37 UTC
Hi, first patch only fixes a problem in the existing template, second patch is an alternative and should not be applied on top of the first, but separately. Looking for sign-offs and feedback :)
Comment 7 Jared Camins-Esakov 2012-08-14 14:32:41 UTC
Created attachment 11609 [details] [review]
Bug 8621: Alternative template for cart email

- 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 <jcamins@cpbibliography.com>
Comment 8 Ian Walls 2012-08-17 15:11:01 UTC
Template only change, fixing indenting and other issues.  Easy to read, passed QA.
Comment 9 Paul Poulain 2012-08-29 16:22:23 UTC
Patch pushed, some comments:
 * I couldn't check that the mail is OK, because my test installation does not send email. So trusting signoff.
 * Can't decide if it's an ENH or a bugfix. Not switching to ENH, and letting RMaint decide
 * Katrin, shouldn't we do the same think on staff basket sending as well (modules/basket/sendbasket.tt) ?
Comment 10 Katrin Fischer 2012-08-29 18:15:19 UTC
Hi Paul,

both staff cart and sending lists need more work, but I haven't had time to replicate the recent changes to the cart email templates to the lists and staff interface. Happy if somemone beats me to it (see bug 8062)
Comment 11 Chris Cormack 2012-08-29 22:29:19 UTC
Pushed to 3.8.x, will be in 3.8.5