Bugzilla – Attachment 160651 Details for
Bug 35707
Item statuses in the holdings table on biblio details should appear one per line
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35707: (alternate) Add clearfix to item statuses
Bug-35707-alternate-Add-clearfix-to-item-statuses.patch (text/plain), 10.81 KB, created by
Owen Leonard
on 2024-01-08 16:56:50 UTC
(
hide
)
Description:
Bug 35707: (alternate) Add clearfix to item statuses
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-01-08 16:56:50 UTC
Size:
10.81 KB
patch
obsolete
>From c81b04c84024ac00b1b8234d1b864943d31fb4b4 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <span>s to ><div>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 <div>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. >--- > .../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 99b2ad0d89..53186d75b5 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 19d15b726d..4c65647a35 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 %] >- <span>Currently in local use >+ <div class="item_status localuse">Currently in local use > [% ELSE %] >- <span class="datedue">Checked out >+ <div class="item_status datedue">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 %] >- </span> >+ </div> > [% ELSIF ( transfer = item.object.get_transfer ) %] > [% IF (transfer.datesent) %] >- <span class="intransit">In transit from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.datesent | $KohaDates %]</span> >+ <div class="item_status intransit">In transit from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.datesent | $KohaDates %]</div> > [% ELSE %] >- <span class="transitrequested">Transit pending from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.daterequested | $KohaDates %]</span> >+ <div class="item_status transitrequested">Transit pending from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.daterequested | $KohaDates %]</div> > [% END %] > [% END %] > > [% IF ( item.itemlost ) %] > [% SET itemlost_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) %] > [% IF itemlostloop %] >- <span class="lost">[% itemlost_description | html %]</span> >+ <div class="item_status lost">[% itemlost_description | html %]</div> > [% ELSE %] >- <span class="lost">Unavailable (lost or missing)</span> >+ <div class="item_status lost">Unavailable (lost or missing)</div> > [% END %] > [% END %] > > [% IF ( item.withdrawn ) %] > [% SET withdrawn_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) %] > [% IF withdrawn_description %] >- <span class="wdn">[% withdrawn_description | html %]</span> >+ <div class="item_status wdn">[% withdrawn_description | html %]</div> > [% ELSE %] >- <span class="wdn">Withdrawn</span> >+ <div class="item_status wdn">Withdrawn</div> > [% END %] > [% END %] > > [% IF ( item.damaged ) %] > [% SET damaged_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => item.damaged ) %] > [% IF damaged_description %] >- <span class="dmg">[% damaged_description | html %]</span> >+ <div class="item_status dmg">[% damaged_description | html %]</div> > [% ELSE %] >- <span class="dmg">Damaged</span> >+ <div class="item_status dmg">Damaged</div> > [% END %] > [% END %] > > [% IF ( item.notforloan || item.itemtype.notforloan ) %] >- <span class="notforloan">Not for loan >+ <div class="item_status notforloan">Not for loan > [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] > [% IF not_for_loan_description %] > <span class="reason">([% not_for_loan_description | html %])</span> > [% END %] >- </span> >+ </div> > [% END %] > > [% SET hold = item.first_hold %] > [% IF hold %] > [% IF hold.waitingdate %] >- <span class="waitingat">Waiting at [% Branches.GetName( hold.branchcode ) | html %][% IF ( hold.desk_id ) %], [% hold.desk.desk_name | html %][% END %] since [% hold.waitingdate | $KohaDates %].</span> >+ <div class="item_status waitingat">Waiting at [% Branches.GetName( hold.branchcode ) | html %][% IF ( hold.desk_id ) %], [% hold.desk.desk_name | html %][% END %] since [% hold.waitingdate | $KohaDates %].</div> > [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %] > <span class="heldfor">Hold for:</span> > [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %] > [% END %] > [% ELSE %] >- <span class="holdonitem">There is an item level hold on this item (priority = [% hold.priority | html %]).</span> >+ <div class="item_status holdonitem">There is an item level hold on this item (priority = [% hold.priority | html %]).</div> > [% END %] > [% END %] > >@@ -546,24 +546,24 @@ > [% SET recall = item.object.recall %] > [% IF recall %] > [% IF recall.waiting_date %] >- <span>Waiting at [% Branches.GetName( recall.pickup_library_id ) | html %] since [% recall.waiting_date | $KohaDates %]</span> >+ <div class="item_status recallat">Waiting at [% Branches.GetName( recall.pickup_library_id ) | html %] since [% recall.waiting_date | $KohaDates %]</div> > [% ELSE %] > [% patron_link = BLOCK %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %] ([% recall.patron.cardnumber | html %])</a>[% END %] >- <span>recalled by [% patron_link| $raw %] on [% recall.created_date | $KohaDates %]</span> >+ <div class="item_status recallby">recalled by [% patron_link| $raw %] on [% recall.created_date | $KohaDates %]</div> > [% END %] > [% END %] > [% END %] > > [% UNLESS ( item.notforloan || item.itemtype.notforloan || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfer || hold || ( Koha.Preference('UseRecalls') && recall ) ) %] >- <span>Available</span> >+ <div class="item_status available">Available</div> > [% END %] > > [% IF ( item.restricted ) %] >- <span class="restricted">([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])</span> >+ <div class="item_status restricted">([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])</div> > [% END %] > > [% IF ( item.bundle_host ) %] >- <span class="bundled">In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio link = 1 %]</span> >+ <div class="item_status bundled">In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio link = 1 %]</div> > [% END %] > > </td> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35707
:
160569
|
160570
|
160571
|
160651
|
160663
|
160683