From 68831834bf06080c0f72f380a13f5d83f4ae40c9 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 27 Jul 2021 21:45:12 +0000 Subject: [PATCH] Bug 28762: handle notforloan better Signed-off-by: Hayley Pelham Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize (cherry picked from commit e3e306efdb622f4c4857aa645c72c89320dac63d) Signed-off-by: Lucas Gass --- .../intranet-tmpl/prog/css/src/staff-global.scss | 3 ++- .../intranet-tmpl/prog/en/includes/item-status.inc | 11 ++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index 5c6ffac4f7..b4f1281c72 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2286,7 +2286,8 @@ td { .restricted, .damaged, .lost, -.withdrawn { +.withdrawn, +.notforloan { color: #990000; display: block; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/item-status.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/item-status.inc index 7da27283f6..f5e5dfe45c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/item-status.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/item-status.inc @@ -62,17 +62,14 @@ [% END %] [% END %] - -[% IF NOT ( item.isa('Koha::Item') ) AND item.itemnotforloan %] +[% IF ( item.notforloan ) %] [% SET itemavailable = 0 %] - [% IF ( item.notforloanvalueopac ) %] - [% item.notforloanvalueopac | html %] + [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] + [% IF av_lib_include %] + [% av_lib_include | html %] [% ELSE %] Not for loan [% END %] -[% ELSIF NOT ( item.isa('Koha::Item') ) AND item.notforloan_per_itemtype %] - [% SET itemavailable = 0 %] - Not for loan [% END %] [% IF ( item.damaged ) %] -- 2.39.5