From a462fef1259899878701d841d9d1b56381019782 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 9 Aug 2013 09:50:49 -0400 Subject: [PATCH] Bug 7478: fix template translation problem in catalogue_out.tt The items with no checkouts template has a sections that uses DEFAULT to set some strings: [% DEFAULT loopro.itemcallnumber="No Call Number" %] This appears to be untranslatable with our current translation tool. This patch changes the template so that it uses a simple [% IF %] block to display the default text if no value is set. Added is use of the Branches template plugin to show library name instead of code. This patch also fixes an error introduced in my fix for Bug 8124 causing the page to default to CSV download instead of output to screen. To test, apply the patch and confirm that the default text appears onscreen in reports which include results that have a missing barcode, title, or call number. Results should be displayed on screen correctly. Run "perl translate update" for any language and confirm that the newly generated po file includes "No call number," "No barcode," and "NO TITLE" for catalogue_out.tt Signed-off-by: Katrin Fischer Works nicely, thx Owen! Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton (cherry picked from commit b8e1e7e217363a165275dca46e7d123633a64920) Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 4eff83df314743b72f09dc0d6e34080227cef658) Signed-off-by: Bernardo Gonzalez Kriegel (cherry picked from commit 4eff83df314743b72f09dc0d6e34080227cef658) --- .../prog/en/modules/reports/catalogue_out.tt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt index 23eb6ba074..947653957f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt @@ -1,3 +1,4 @@ +[% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] Koha › Reports › Items with no checkouts [% INCLUDE 'doc-head-close.inc' %] @@ -65,21 +66,14 @@ [% IF ( looptable.looprow ) %] [% FOREACH loopro IN looptable.looprow %] - [% DEFAULT - loopro.itemcallnumber="No call number" - loopro.barcode="No barcode" - loopro.title="NO TITLE" - loopro.author="" - %] [% UNLESS ( loop.odd ) %] [% ELSE %][% END %] [% loop.count %] - [% loopro.itemcallnumber %] - [% loopro.barcode %] -

[% loopro.title %]

- [% loopro.author %] - [% IF ( loopro.branch ) %]at [% loopro.branch %][% END %] + [% IF ( loopro.itemcallnumber ) %][% loopro.itemcallnumber %][% ELSE %]No call number[% END %] + [% IF ( loopro.barcode ) %][% loopro.barcode %][% ELSE %]No barcode[% END %] +

[% IF ( loopro.title ) %][% loopro.title %][% ELSE %]NO TITLE[% END %] [% IF ( loopro.author ) %] by [% loopro.author %][% END %]

+ [% IF ( loopro.branch ) %]at [% Branches.GetName( loopro.branch ) %][% END %] [% END %] @@ -159,7 +153,8 @@
- + +
[% END %] -- 2.39.5