Bug 13700: Fix item search templates for translation

Since translator rebuild HTML tags with double quotes for attributes
values, use double quotes in english template too and escape them with
backslash.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

It works well!!

Test:
1) Intall translation  (de-DE, es-ES)
2) to Go to item search, in english, do a search that gives results
3) Switch language, repeat search, result's table does not render
4) Apply patch
5) Install translation again
6) Repeat 3, now results are displayed

No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Julian Maurice 2015-02-13 13:30:56 +01:00 committed by Tomas Cohen Arazi
parent b678301e46
commit 39c22b1a6a

View file

@ -2,11 +2,15 @@
[%- biblio = item.biblio -%]
[%- biblioitem = item.biblioitem -%]
[
"<a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]' title='Go to record detail page'>[% biblio.title |html %]</a> by [% biblio.author |html %]",
"[% FILTER escape_quotes = replace('"', '\"') ~%]
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]" title="Go to record detail page">[% biblio.title |html %]</a> by [% biblio.author |html %]
[%~ END %]",
"[% biblioitem.publicationyear |html %]",
"[% biblioitem.publishercode |html %]",
"[% biblioitem.collectiontitle |html %]",
"<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber %]#item[% item.itemnumber %]' title='Go to item details'>[% item.barcode |html %]</a>",
"[% FILTER escape_quotes ~%]
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber %]#item[% item.itemnumber %]" title="Go to item details">[% item.barcode |html %]</a>
[%~ END %]",
"[% item.itemcallnumber |html %]",
"[% Branches.GetName(item.homebranch) |html %]",
"[% Branches.GetName(item.holdingbranch) |html %]",
@ -14,5 +18,7 @@
"[% item.stocknumber |html %]",
"[% item.status |html %]",
"[% (item.issues || 0) |html %]",
"<a href='/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]'>Edit</a>"
"[% FILTER escape_quotes ~%]
<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]">Edit</a>
[%~ END %]"
]