From 087d54b0c104e70be724c3c4dd3d4c5d2052717f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 11 Feb 2026 16:21:00 -0500 Subject: [PATCH] Bug 41826: Update item type and authorized values pages to use grid layout for forms This patch updates the authorized values and item types administration templates with new markup and CSS for layout forms using CSS grids. To test, apply the patch rebuild the staff interface CSS. Check the following pages, confirming that the "New" and "Edit" versions of the form look correct in each case: - Administration -> Authorized values - Administration -> Item types Sponsored-by: Athens County Public Libraries --- .../prog/en/includes/admin-icon-selection.inc | 24 +- .../en/modules/admin/authorised_values.tt | 109 ++++--- .../prog/en/modules/admin/itemtypes.tt | 284 +++++++++++------- 3 files changed, 270 insertions(+), 147 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-icon-selection.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-icon-selection.inc index f1b8078e7ef..e31033634b0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-icon-selection.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-icon-selection.inc @@ -71,15 +71,21 @@ [% SET bt_active = 0 %] [% END %] [% WRAPPER tab_panel tabname="remote" %] - - [% IF image_location.match('^http') %] - - - - [% ELSE %] - - - [% END %] +
+
+ +
+
+ [% IF image_location.match('^http') %] + + + + [% ELSE %] + + + [% END %] +
+
[% END %] [% END # /tab_panels %] [% END # /tabs#icons %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt index 7e9807e9abe..9235ba3ed93 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt @@ -52,8 +52,8 @@ clear: both; } .authval-icons label { - float: none; - width: auto; + display: block; + padding: 0.5rem; } #authorised_value:invalid { color: red; @@ -129,43 +129,66 @@
[% INCLUDE 'csrf-token.inc' %] -
+
[% IF action_add_category %] -
    -
  1. +
    +
    - - Required +
    +
    + -
  2. -
  3. -
+ +
Required
+ +
+
+ +
+
+ +
+
[% ELSIF op == 'edit_form' %] -
    -
  1. +
    +
    +
    +
    -
  2. -
  3. + + +
    +
    + +
    +
    [% IF category.is_integer_only %] - + [% ELSE %] - + [% END %] -
  4. -
- - - + + + + + [% ELSE %] -
    -
  1. +
    +
    Category +
    +
    + [% category_name | html %] - [% category_name | html %] -
  2. -
  3. + + + +
    +
    +
    +
    [% IF ( action_modify ) %] [% END %] @@ -186,18 +209,30 @@ [% ELSE %] [% END %] -
  4. -
  5. + + +
    +
    +
    +
    -
  6. -
  7. + + +
    +
    +
    +
    -
  8. -
  9. - [% FOREACH branch IN branches_loop %] [% IF ( branch.selected ) %] @@ -206,9 +241,9 @@ [% END %] [% END %] -
    Limits the use of this authorized value to the selected libraries.
    -
  10. -
+ +
Limits the use of this authorized value to the selected libraries.
+ [% INCLUDE 'admin-icon-selection.inc' context = "authval" %] [% END # /IF action_add_category %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt index 2c503087ff0..bb69e1b4930 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -37,20 +37,14 @@ [% INCLUDE 'doc-head-close.inc' %] [% FILTER collapse %] [% END %] @@ -154,22 +148,34 @@ [% INCLUDE 'csrf-token.inc' %] -
-
    - [% IF itemtype %] -
  1. +
    + [% IF itemtype %] +
    +
    + Item type: +
    +
    + - Item type: [% itemtype.itemtype | html %] -
  2. - [% ELSE %] -
  3. + + + [% ELSE %] +
    +
    - Required -
  4. - [% END %] -
  5. + +
    + +
    +
    Required
    + + [% END %] +
    +
    +
    +
    [% IF !is_a_parent && parent_types %]

    No available parent types

    [% END %] -
    Defining a parent type will apply checkout limits for all children as described on the circulation rules page.
    -
  6. -
  7. + +
    Defining a parent type will apply checkout limits for all children as described on the circulation rules page.
    + +
    +
    - Required - [% IF can_be_translated %] +
    +
    Required
    + [% IF can_be_translated %] +
  8. -
  9. + + [% END %] + +
    +
    +
    +
    -
    - [% IF ( CAN_user_parameters_manage_auth_values ) %] - Options are defined by the authorized value ITEMTYPECAT. - [% ELSE %] - Options are defined by the authorized value ITEMTYPECAT. - [% END %] -
    -
  10. - [% IF ( Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') ) %] -
  11. - Image: Item type images are disabled. To enable them, turn off the + +
    + [% IF ( CAN_user_parameters_manage_auth_values ) %] + Options are defined by the authorized value ITEMTYPECAT. + [% ELSE %] + Options are defined by the authorized value ITEMTYPECAT. + [% END %] +
    + + [% IF ( Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') ) %] +
    +
    Image: Item type images are disabled. To enable them, turn off the
    +
  12. - [% END %] -
+ + + [% END %] [% UNLESS Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') %] [% INCLUDE 'admin-icon-selection.inc' context = "itemtype" %] [% END %] -
    -
  1. +
    +
    +
    +
    [% IF ( itemtype.hideinopac ) %] [% ELSE %] [% END %] - If checked, items of this type will be hidden as filters in OPAC's advanced search. -
  2. -
  3. + +
    If checked, items of this type will be hidden as filters in OPAC's advanced search.
    + +
    +
    +
    +
    [% IF itemtype.notforloan %] [% ELSE %] [% END %] - If checked, no item of this type can be issued. If not checked, every item of this type can be issued unless notforloan is set for a specific item. -
  4. -
  5. + +
    If checked, no item of this type can be issued. If not checked, every item of this type can be issued unless notforloan is set for a specific item.
    + +
    +
    +
    +
    [% IF itemtype.automatic_checkin %] [% ELSE %] [% END %] - If checked, items will be automatically checked in once they've reached their due date. This feature requires the misc/cronjobs/automatic_checkin.pl cronjob. Ask your system administrator to - schedule it. -
  6. -
  7. + +
    + If checked, items will be automatically checked in once they've reached their due date. This feature requires the misc/cronjobs/automatic_checkin.pl cronjob. Ask your system administrator to schedule it. +
    + +
    +
    +
    +
    [% IF itemtype.bookable %] [% ELSE %] [% END %] - If checked, all items of this type will be enabled for future bookings unless overridden at the item level. -
  8. -
  9. + +
    If checked, all items of this type will be enabled for future bookings unless overridden at the item level.
    + +
    +
    - -
    This fee is charged once per checkout/renewal per item
    -
  10. -
  11. + +
    + +
    +
    This fee is charged once per checkout/renewal per item
    + +
    +
    - -
    This fee is charged at checkout/renewal time for each day between the checkout/renewal date and due date for loans specified in days.
    -
  12. -
  13. + +
    + +
    +
    This fee is charged at checkout/renewal time for each day between the checkout/renewal date and due date for loans specified in days.
    + +
    +
    +
    +
    [% IF itemtype.rentalcharge_daily_calendar %] [% ELSE %] [% END %] - If checked, daily charge will be calculated using the calendar to exclude holidays. If not checked, the fee will be calculated based on the number of days until due, directly. -
  14. -
  15. + +
    If checked, daily charge will be calculated using the calendar to exclude holidays. If not checked, the fee will be calculated based on the number of days until due, directly.
    + +
    +
    - -
    This fee is charged at checkout/renewal time for each hour between the checkout/renewal date and due date for loans specified in hours.
    -
  16. -
  17. + +
    + +
    +
    This fee is charged at checkout/renewal time for each hour between the checkout/renewal date and due date for loans specified in hours.
    + +
    +
    +
    +
    [% IF itemtype.rentalcharge_hourly_calendar %] [% ELSE %] [% END %] - If checked, hourly charge will be calculated using the calendar to exclude holidays. If not checked, the fee will be calculated based on the number of hours until due, directly. -
  18. -
  19. + +
    If checked, hourly charge will be calculated using the calendar to exclude holidays. If not checked, the fee will be calculated based on the number of hours until due, directly.
    + +
    +
    - -
  20. -
  21. + +
    + +
    + +
    +
    - -
  22. -
  23. + +
    + +
    + +
    +
    +
    +
    -
  24. -
  25. + + +
    +
    +
    +
    -
  26. -
  27. + + +
    +
    +
    +
    -
  28. -
  29. + + +
    +
    +
    +
    -
    Limits the use of this item type to the selected libraries.
    -
  30. -
  31. + +
    Select 'All libraries' if all libraries use this item type. Otherwise, select the specific libraries that use this item type.
    + +
    +
    +
    +
    -
    Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype :
    -
    <a href="[856u]">open site</a> will show the link just below the title
    -
  32. - [% IF Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' %] -
  33. + +
    + Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype: <a href="[856u]">open site</a> will show the link just below the title +
    + + [% IF Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' %] +
    +
    +
    +
    -
  34. - [% END %] -
+ + + [% END %]
-- 2.39.5