From baeca8457097978a637eb4d28fc963d4f3e491b1 Mon Sep 17 00:00:00 2001 From: Sam Lau Date: Tue, 20 Aug 2024 17:57:15 +0000 Subject: [PATCH] Bug 32485: Add checkout_message to table settings and fix display location of checkout message --- admin/columns_settings.yml | 2 ++ api/v1/swagger/definitions/item_type.yaml | 10 ++++++++++ .../prog/en/modules/admin/itemtypes.tt | 2 ++ .../prog/en/modules/circ/circulation.tt | 19 ++++++++++--------- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index c71c744929..d5e811c3dc 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -330,6 +330,8 @@ modules: columnname: lost_processing_fee - columnname: checkin_message + - + columnname: checkout_message - columnname: library_limitations - diff --git a/api/v1/swagger/definitions/item_type.yaml b/api/v1/swagger/definitions/item_type.yaml index f451c2892b..f1d17453a0 100644 --- a/api/v1/swagger/definitions/item_type.yaml +++ b/api/v1/swagger/definitions/item_type.yaml @@ -67,6 +67,16 @@ properties: type: - string - "null" + checkout_message: + description: Message that is displayed when an item with the given item type is checked out + type: + - string + - "null" + checkout_message_type: + description: Type (CSS class) for the checkout_message, can be 'alert' or 'message' + type: + - string + - "null" sip_media_type: description: SIP2 protocol media type for this item type type: 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 0942f3060f..e37e994fc4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -424,6 +424,7 @@ Default replacement cost Processing fee (when lost) Checkin message + Checkout message Library limitations Automatic check-in Actions @@ -503,6 +504,7 @@ [% itemtype.defaultreplacecost | $Price %] [% itemtype.processfee | $Price %] [% itemtype.checkinmsg | html_line_break | $raw %] + [% itemtype.checkoutmsg | html_line_break | $raw %] [% SET library_limits = itemtype.library_limits %] [% IF library_limits.count > 0 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 70ff32632c..1b7a5f1a78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -57,6 +57,16 @@
[% INCLUDE 'messages.inc' %] + [% IF ( checkoutmsg ) %] + [% IF ( checkoutmsgtype == 'alert' ) %] +
+ [% ELSE %] +
+ [% END %] +

[% checkoutmsg | html_line_break %]

+
+ [% END # /IF checkoutmsg %] + [% IF patron %] [% INCLUDE 'members-toolbar.inc' %] [% END %] @@ -881,15 +891,6 @@
[% END %] - [% IF ( checkoutmsg ) %] - [% IF ( checkoutmsgtype == 'alert' ) %] -
- [% ELSE %] -
- [% END %] -

[% checkoutmsg | html_line_break %]

-
- [% END # /IF checkoutmsg %]
-- 2.39.2