From 63d942d84fbefb65226e65b7b07c2116bd126a3e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 24 Apr 2019 13:19:38 +0000 Subject: [PATCH] Bug 22764: More YUI grid cleanup This patch cleans up a few places where templates still contain YUI grid markup. Some other minor markup problems are also fixed. - additional-fields.tt: - Converts YUI grid to Bootstrap - Replaces obsolete tag with styled - Adds _() function to string in embedded JavaScript - detail.tt: - Fixes some stray YUI grid classes - Fixes corresponding JavaScript to enable page adjustments - moredetail.tt: - Removes unnecessary YUI grid markup To test, apply the patch and view the affected pages, confirming that everything looks correct and that the page adjusts well to various browser widthds. When testing the bibliographic detail page, enable AmazonCoverImages and view a record with and without an Amazon cover image. The layout should work in both cases. Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- .../en/modules/admin/additional-fields.tt | 28 +++++++++++-------- .../prog/en/modules/catalogue/detail.tt | 21 ++++++-------- .../prog/en/modules/catalogue/moredetail.tt | 3 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt index d8f3f0d070..a20264ce18 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt @@ -26,10 +26,11 @@ [% END %] -
-
-
-
+
+
+
+
+ [% IF op == 'list' %]
Create field @@ -65,7 +66,7 @@

Additional fields

Select a table:

[% BLOCK table_option %] -
  • [% content | html %] ([% value | html %])
  • +
  • [% content | html %] ([% value | html %])
  • [% END %]
      [% IF CAN_user_acquisition_order_manage %] @@ -164,13 +165,16 @@ [% END %] -
    -
    + +
    + +
    + +
    +
    -
    -[% INCLUDE 'admin-menu.inc' %] -
    -
    [% MACRO jsinclude BLOCK %] [% INCLUDE "datatables.inc" %] @@ -198,7 +202,7 @@ if ( $("#marcfield").length && $("select[name='authorised_value_category']").length ) { if ( $("#marcfield").val().length > 0 && $("select[name='authorised_value_category']" ).val().length > 0 ) { - alert("You cannot select an authorised value category and a marcfield"); + alert(_("You cannot select an authorised value category and a marcfield") ); return false; } } 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 0ffe432965..4b4c1dae43 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -57,6 +57,7 @@
    +
    [% IF ( unknownbiblionumber ) %]
    The record you requested does not exist ([% biblionumber | html %]).
    @@ -69,11 +70,9 @@ [% END %] [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled ) %] -
    -
    +
    [% ELSE %] -
    -
    +
    [% END %] [% XSLTBloc | $raw %] @@ -123,7 +122,7 @@ [% END %] [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled ) %] -
    +
    [% IF ( LocalCoverImages ) %]
    [% END %] @@ -493,7 +492,6 @@ [% IF ( subscriptionsnumber ) %]
    -

    This is a serial subscription

    (There are [% subscriptionsnumber | html %] subscriptions associated with this title).

    @@ -545,7 +543,6 @@ [% END %]
    -
    [% END %] [% IF Koha.Preference('AcquisitionDetails') %] @@ -703,17 +700,17 @@
    -
    +
    - + +
    Save Record
    Save record
    Select download format: -
    @@ -767,10 +764,10 @@ h = this.height; if ((w == 1) || (h == 1)) { $("#amazon-bookcoverimg").remove(); - $(".yui-gb").attr("class","yui-g"); + $("#catalogue_detail_biblio").attr("class","col-xs-12"); } else if ((this.complete != null) && (!this.complete)) { $("#amazon-bookcoverimg").remove(); - $(".yui-gb").attr("class","yui-g"); + $("#catalogue_detail_biblio").attr("class","col-xs-12"); } } }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index c104cf396d..28066ce1ad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -52,8 +52,8 @@ [% IF ( ONLY_ONE ) %]
    You are only viewing one item. View All
    [% END %] + [% FOREACH ITEM_DAT IN ITEM_DATA %] -

    Barcode [% ITEM_DAT.barcode | html %] [% IF ( ITEM_DAT.notforloantext ) %][% ITEM_DAT.notforloantext | html %] [% END %]

    Item information [% IF ( CAN_user_editcatalogue_edit_catalogue ) %][% UNLESS ( ITEM_DAT.nomod ) %] [% IF ( CAN_user_editcatalogue_edit_items ) %] @@ -271,7 +271,6 @@

    -
    [% END %] -- 2.39.5