From b7a5eccc5cace52c140a4f4ec480284baa1e52c0 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 22 Jun 2018 13:12:23 +0200 Subject: [PATCH] Bug 20988: Modify templates so that they can be parsed as HTML This is required for koha-i18n [1] to work correctly [1] https://github.com/jajm/koha-i18n --- .../prog/en/modules/acqui/parcel.tt | 4 +- .../prog/en/modules/acqui/supplier.tt | 4 +- .../prog/en/modules/admin/preferences.tt | 10 ++-- .../prog/en/modules/catalogue/detail.tt | 6 +- .../value_builder/unimarc_field_210c.tt | 5 +- .../en/modules/circ/selectbranchprinter.tt | 4 +- .../prog/en/modules/ill/ill-requests.tt | 2 +- .../en/modules/serials/serials-collection.tt | 3 +- .../prog/en/modules/tools/holidays.tt | 3 +- .../tools/marc_modification_templates.tt | 57 ++++++++++++------- .../bootstrap/en/includes/bodytag.inc | 14 ++--- .../bootstrap/en/modules/opac-detail.tt | 8 +-- .../bootstrap/en/modules/opac-tags.tt | 2 +- .../bootstrap/en/modules/sco/sco-main.tt | 2 +- 14 files changed, 73 insertions(+), 51 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index 96c2f51ee3..fd234bac5b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -176,10 +176,10 @@ [% IF ( loop_order.left_holds_on_order ) %] Can't cancel order
[% ELSE %] - Cancel order
+ Cancel order
[% END %] [% IF ( loop_order.can_del_bib ) %] - Cancel order and catalog record
+ Cancel order and catalog record
[% ELSE %] Can't cancel order and delete catalog record
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index 1d7b033a97..8aa5c13245 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -232,7 +232,7 @@ [% END %]
  1. - %
  2. + %
  3. days @@ -279,7 +279,7 @@

    Invoice item price includes tax: [% IF ( invoiceincgst ) %]Yes[% ELSE %]No[% END %]

    [% END %]

    Discount: - [% discount | format("%.1f") %] %

    + [% discount | format('%.1f') %] %

    Tax rate: [% ( tax_rate || 0 ) * 100 %] %

    [% IF deliverytime.defined %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt index 2db4b2d68c..5f31fa0101 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -79,9 +79,9 @@ [% IF ( CHUNK.type_text ) %] [% CHUNK.contents %] [% ELSIF ( CHUNK.type_input ) %] - [% IF ( CHUNK.dateinput ) %][% INCLUDE 'date-format.inc' %][% END %] + [% IF ( CHUNK.dateinput ) %][% INCLUDE 'date-format.inc' %][% END %] [% ELSIF ( CHUNK.type_select ) %] - [% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %] [% IF ( CHOICE.selected ) %] [% END %] [% ELSIF ( CHUNK.type_textarea ) || ( CHUNK.type_htmlarea )%] [% IF ( CHUNK.type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %] - + [% ELSE %] - + [% END %] [% ELSIF ( CHUNK.type_languages ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index ec6695c2ce..c67d6e2ecd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -550,7 +550,7 @@ [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %] [% END %] @@ -582,7 +582,7 @@ [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %] [% END %] @@ -807,7 +807,7 @@ [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
    -
    +
    [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt index 31797ada8e..2edbc325d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt @@ -66,7 +66,8 @@ [% resul.used %] times [% IF ( resul.to_report ) %] - choose + [% report = BLOCK %][% resul.to_report |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %][% END %] + choose [% END %] @@ -92,4 +93,4 @@ [% END %] -[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] \ No newline at end of file +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tt index 220e5b032f..69da8a6b7b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tt @@ -36,7 +36,7 @@ Updated:
      [% END %] [% END %]
    -
    +
    [% FOREACH recycle_loo IN recycle_loop %] @@ -82,7 +82,7 @@ Updated:
      [% FOREACH recycle_loo IN recycle_loop %] [% END %] - +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index 70f31cad16..8ab1027c10 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -371,7 +371,7 @@ + [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index 7d8903a765..4900405487 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -218,7 +218,7 @@
    [% IF ( issues_count ) %] - + -- 2.17.1
    Checkouts for [% borrowername %] ([% issues_count %] total)Checkouts for [% borrowername %] ([% issues_count %] total)