From f96ac601b3a1326abafaa3c5dfa27f25ed4fa7e8 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 8 Jan 2024 16:42:45 +0000 Subject: [PATCH] Bug 35707: (alternate) Add clearfix to item statuses This proposed alterantive patch adds changes the status s to
s. A div is basically the block-level equivalent of a span. This has the same effect of pushing each status onto its own line. The patch also adds generic "item_status" class to the
s as well so that we can attach a consistent style to all statuses. The patch includes a small amount of padding on these items in order to repeat legibility. To test, apply the patch and rebuild the staff interface CSS. 1) Add an item to stockrotation and trigger the first transfer 2) Place a hold on the item 3) Note that you will now see two statuses, one above the other as displayed in the screenshots attached to the bug. Signed-off-by: David Nind Signed-off-by: Martin Renvoize --- .../prog/css/src/staff-global.scss | 8 ++++ .../prog/en/modules/catalogue/detail.tt | 40 +++++++++---------- 2 files changed, 28 insertions(+), 20 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 99b2ad0d896..53186d75b53 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -1477,6 +1477,14 @@ i { } } +.item_status { + padding: .2rem 0; + + &:first-child { + padding-top: 0; + } +} + .circ-setting { font-size: 95%; padding: .3em 0; 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 19d15b726d5..4c65647a355 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -471,9 +471,9 @@ [% IF item.object.checkout %] [% IF item.object.checkout.onsite_checkout %] - Currently in local use +
Currently in local use [% ELSE %] - Checked out +
Checked out [% END %] [% IF item.can_be_edited %] [% IF item.object.checkout.onsite_checkout %] @@ -484,61 +484,61 @@ [% INCLUDE 'patron-title.inc' patron=item.object.checkout.patron hide_patron_infos_if_needed=1 %] [% END %] : due [% date_due | $KohaDates as_due_date => 1 %] - +
[% ELSIF ( transfer = item.object.get_transfer ) %] [% IF (transfer.datesent) %] - In transit from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.datesent | $KohaDates %] +
In transit from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.datesent | $KohaDates %]
[% ELSE %] - Transit pending from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.daterequested | $KohaDates %] +
Transit pending from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.daterequested | $KohaDates %]
[% END %] [% END %] [% IF ( item.itemlost ) %] [% SET itemlost_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) %] [% IF itemlostloop %] - [% itemlost_description | html %] +
[% itemlost_description | html %]
[% ELSE %] - Unavailable (lost or missing) +
Unavailable (lost or missing)
[% END %] [% END %] [% IF ( item.withdrawn ) %] [% SET withdrawn_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) %] [% IF withdrawn_description %] - [% withdrawn_description | html %] +
[% withdrawn_description | html %]
[% ELSE %] - Withdrawn +
Withdrawn
[% END %] [% END %] [% IF ( item.damaged ) %] [% SET damaged_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => item.damaged ) %] [% IF damaged_description %] - [% damaged_description | html %] +
[% damaged_description | html %]
[% ELSE %] - Damaged +
Damaged
[% END %] [% END %] [% IF ( item.notforloan || item.itemtype.notforloan ) %] - Not for loan +
Not for loan [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] [% IF not_for_loan_description %] ([% not_for_loan_description | html %]) [% END %] - +
[% END %] [% SET hold = item.first_hold %] [% IF hold %] [% IF hold.waitingdate %] - Waiting at [% Branches.GetName( hold.branchcode ) | html %][% IF ( hold.desk_id ) %], [% hold.desk.desk_name | html %][% END %] since [% hold.waitingdate | $KohaDates %]. +
Waiting at [% Branches.GetName( hold.branchcode ) | html %][% IF ( hold.desk_id ) %], [% hold.desk.desk_name | html %][% END %] since [% hold.waitingdate | $KohaDates %].
[% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %] Hold for: [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %] [% END %] [% ELSE %] - There is an item level hold on this item (priority = [% hold.priority | html %]). +
There is an item level hold on this item (priority = [% hold.priority | html %]).
[% END %] [% END %] @@ -546,24 +546,24 @@ [% SET recall = item.object.recall %] [% IF recall %] [% IF recall.waiting_date %] - Waiting at [% Branches.GetName( recall.pickup_library_id ) | html %] since [% recall.waiting_date | $KohaDates %] +
Waiting at [% Branches.GetName( recall.pickup_library_id ) | html %] since [% recall.waiting_date | $KohaDates %]
[% ELSE %] [% patron_link = BLOCK %][% recall.patron.firstname | html %] [% recall.patron.surname | html %] ([% recall.patron.cardnumber | html %])[% END %] - recalled by [% patron_link| $raw %] on [% recall.created_date | $KohaDates %] +
recalled by [% patron_link| $raw %] on [% recall.created_date | $KohaDates %]
[% END %] [% END %] [% END %] [% UNLESS ( item.notforloan || item.itemtype.notforloan || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfer || hold || ( Koha.Preference('UseRecalls') && recall ) ) %] - Available +
Available
[% END %] [% IF ( item.restricted ) %] - ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %]) +
([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])
[% END %] [% IF ( item.bundle_host ) %] - In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio link = 1 %] +
In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio link = 1 %]
[% END %] -- 2.43.0