Fridolin Somers
6d77304c98
The size column in biblioitems is a bit problematic when used in TT, because instead of the size value from the biblio column it will give you the size of the variable. It's currently used in the templates for sending shelves from OPAC and intranet and maybe also in other places: [% END %] [% IF BIBLIO_RESULT.size %] , [% BIBLIO_RESULT.size %] [% END %] This patch corrects by using item() TT method. See http://stackoverflow.com/questions/2311303/how-can-i-handle-hash-keys-containing-illegal-identifier-characters-in-template. Test plan : In each display : => Without this patch you see biblioitems.pages and then a number => With this patch you only see biblioitems.pages - Create a record with biblioitems.pages defined (like "12p") but without biblioitems.size defined Same for OPAC and intranet : - Add it to the cart - Open the cart - Check the "Title" column - Click on "More Details" - Check the "Details" row - Send the basket via email and check the result - Add to a list - Send the list via email and check the result Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works well!! Tested on staff & opac, cart & list. No koha-qa errors Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes QA script and tests. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
165 lines
5 KiB
Text
165 lines
5 KiB
Text
<SUBJECT>
|
|
Your list: [% shelfname %]
|
|
<END_SUBJECT>
|
|
|
|
[% USE HtmlToText %]
|
|
[% myhtml FILTER html2text(leftmargin => 0, rightmargin => 0) %]
|
|
[% myhtmltext | html2text %]
|
|
|
|
<HEADER>
|
|
[% FILTER html2text %]
|
|
<p>Hi,</p>
|
|
|
|
<p>Here is your list called [% shelfname %], sent from our online catalog.</p>
|
|
|
|
<p>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.</p>
|
|
<hr/>
|
|
[% END %]
|
|
|
|
<END_HEADER>
|
|
|
|
<MESSAGE>
|
|
[% FILTER html2text %]
|
|
|
|
[% IF comment %]
|
|
<p>[% comment %]</p>
|
|
<hr/>
|
|
[% END %]
|
|
<ol>
|
|
[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
|
|
<li>
|
|
<span>
|
|
[% BIBLIO_RESULT.title %]
|
|
[% IF ( BIBLIO_RESULT.subtitle.size ) %]
|
|
[% FOREACH subtitle IN BIBLIO_RESULT.subtitle %]
|
|
[% subtitle.subfield %]
|
|
[% END %]
|
|
[% END %]
|
|
</span>
|
|
|
|
<p>
|
|
[% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
|
|
<span>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 %]
|
|
</span><br/>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.ISBN ) %]
|
|
<span>
|
|
ISBN: [% FOREACH isbn IN BIBLIO_RESULT.ISBN %]
|
|
[% isbn.marcisbn %]
|
|
[% UNLESS ( loop.last ) %]; [% END %]
|
|
[% END %]
|
|
</span><br/>
|
|
[% END %]
|
|
|
|
[% IF BIBLIO_RESULT.publishercode %]
|
|
<span>
|
|
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.item('size') %]
|
|
, [% BIBLIO_RESULT.item('size') %]
|
|
[% END %]
|
|
</span><br/>
|
|
[% END %]
|
|
|
|
[% IF BIBLIO_RESULT.collection %]
|
|
<span>
|
|
Collection: [% BIBLIO_RESULT.seriestitle %]
|
|
</span><br/>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.subject ) %]
|
|
<span>
|
|
Subject: [% BIBLIO_RESULT.subject %]
|
|
<span><br/>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.copyrightdate ) %]
|
|
<span>
|
|
Copyright year: [% BIBLIO_RESULT.copyrightdate %]
|
|
</span><br/>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.notes ) %]
|
|
<span>
|
|
Notes : [% BIBLIO_RESULT.notes %]
|
|
</span><br/>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.unititle ) %]
|
|
<span>
|
|
Unified title: [% BIBLIO_RESULT.unititle %]
|
|
</span><br/>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.serial ) %]
|
|
<span>
|
|
Serial: [% BIBLIO_RESULT.serial %]
|
|
</span><br/>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.dewey ) %]
|
|
<span>
|
|
Dewey: [% BIBLIO_RESULT.dewey %]
|
|
</span><br/>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.classification ) %]
|
|
<span>
|
|
Classification: [% BIBLIO_RESULT.classification %]
|
|
</span><br/>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.lccn ) %]
|
|
<span>
|
|
LCCN: [% BIBLIO_RESULT.lccn %]
|
|
</span><br/>
|
|
[% END %]
|
|
[% IF ( BIBLIO_RESULT.url ) %]
|
|
<span>
|
|
URL: [% BIBLIO_RESULT.url |url %]
|
|
</span>
|
|
[% END %]
|
|
</p>
|
|
|
|
[% IF ( OPACBaseURL ) %]
|
|
<p>
|
|
In online catalog: [% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber %]
|
|
</p>
|
|
[% END %]
|
|
[% IF ( BIBLIO_RESULT.ITEM_RESULTS.size ) %]
|
|
<p>Items:
|
|
<ul>
|
|
[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]<li>
|
|
[% ITEM_RESULT.branchname %]
|
|
[% ITEM_RESULT.location %]
|
|
[% IF ITEM_RESULT.itemcallnumber %]([% ITEM_RESULT.itemcallnumber %])[% END %]
|
|
[% ITEM_RESULT.barcode %]
|
|
</li>[% END %]
|
|
</ul>
|
|
</p>
|
|
[% END %]
|
|
<hr/>
|
|
</li>
|
|
[% END %]
|
|
</ol>
|
|
|
|
[% END %]
|
|
<END_MESSAGE>
|