Bugzilla – Attachment 176633 Details for
Bug 7508
Collapsable items on items tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7508: (follow-up) Show item number if item has no barcode
Bug-7508-follow-up-Show-item-number-if-item-has-no.patch (text/plain), 5.80 KB, created by
Jonathan Druart
on 2025-01-16 11:21:12 UTC
(
hide
)
Description:
Bug 7508: (follow-up) Show item number if item has no barcode
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-01-16 11:21:12 UTC
Size:
5.80 KB
patch
obsolete
>From a589198cd27063892ab66afc886f9401a84aaf4b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 26 Nov 2024 18:16:19 +0000 >Subject: [PATCH] Bug 7508: (follow-up) Show item number if item has no barcode > >This follow-up adds item number as a fallback for display when an item >doesn't have a barcode. > >The patch also implements a sidebar sub-menu showing barcodes (or item >numbers) so that the user can jump directly to a particular section. The >sub-menu will show a scrollbar if the record has more than around 15 >items. > >The patch modifies staff-global.scss to improve readability of the >sidebar sub-menu and removes CSS which was specific to the system >preferences page. This make the sub-menus on the item details and system >preferences pages consistent with each other. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/css/src/staff-global.scss | 17 +++++------ > .../prog/en/includes/biblio-view-menu.inc | 13 +++++++++ > .../prog/en/modules/catalogue/moredetail.tt | 29 +++++++++++++++++-- > 3 files changed, 47 insertions(+), 12 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 878634a08a4..3822b2baf5f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -461,7 +461,13 @@ aside { > padding-left: 0; > > ul { >- font-size: 75%; >+ background-color: #F3F4F4; >+ >+ li { >+ a { >+ padding: .5em .3em .5em 1.3rem; >+ } >+ } > } > > li { >@@ -498,15 +504,6 @@ aside { > } > } > >-#admin_preferences #menu { >- ul { >- ul { >- background-color: #F3F4F4; >- font-size: 85%; >- } >- } >-} >- > div { > &.mainmenu { > display: inline; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >index 3e5625eff0a..13e37b9f2e0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >@@ -48,6 +48,19 @@ > <li> > [%- END -%] > <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio_object_id | url %]">Items</a> >+ [% IF ( ITEM_DATA ) %] >+ <ul id="items_submenu"> >+ [% FOREACH ITEM_DAT IN ITEM_DATA %] >+ <li> >+ [% IF ITEM_DAT.barcode -%] >+ <a class="item_sublink" href="#item[% ITEM_DAT.itemnumber | html %]">Barcode [% ITEM_DAT.barcode | html %]</a> >+ [% ELSE -%] >+ <a class="item_sublink" href="#item[% ITEM_DAT.itemnumber | html %]">Item number [% ITEM_DAT.itemnumber | html %]</a> >+ [% END %] >+ </li> >+ [% END %] >+ </ul> >+ [% END %] > </li> > > [% IF ( CAN_user_circulate_manage_bookings && biblio.items.filter_by_bookable.count ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index 31129775be6..61cf9f8e835 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -37,6 +37,10 @@ > h3.collapsed i.fa.fa-caret-down::before { > content: "\f0da"; > } >+ #items_submenu { >+ max-height: 500px; >+ overflow: auto; >+ } > </style> > [% END %] > </head> >@@ -133,9 +137,14 @@ > [% FOREACH ITEM_DAT IN ITEM_DATA %] > <h3 id="item[% ITEM_DAT.itemnumber | html %]" class="expanded"> > <i class="fa fa-caret-down" title="Collapse this section"></i> >- Barcode [% ITEM_DAT.barcode | html %] [% IF not_for_loan %][% not_for_loan_description | html %] [% END %] >+ [% IF ITEM_DAT.barcode -%] >+ Barcode [% ITEM_DAT.barcode | html %] >+ [% ELSE -%] >+ Item number [% ITEM_DAT.itemnumber | html %] >+ [% END %] >+ [% IF not_for_loan %][% not_for_loan_description | html %] [% END %] > </h3> >- <div class="page-section clearfix"> >+ <div id="collapse_item[% ITEM_DAT.itemnumber | html %]" class="page-section clearfix"> > [% SET not_for_loan = 0 %] > [% IF ITEM_DAT.notforloan || ITEM_DAT.effective_itemtype.notforloan %] > [% SET not_for_loan = 1 %] >@@ -573,6 +582,22 @@ > window.scrollTo( 0, getScrollto( linkid, "" ) ); > togglePanel( $(this) ); > }); >+ >+ $(".item_sublink").on("click", function () { >+ /* If the user clicks a sub-menu link in the sidebar, >+ check to see if it is collapsed. If so, expand it */ >+ var href = $(this).attr("href"); >+ href = href.replace("#", ""); >+ var panel = $("#collapse_" + href); >+ if (panel.is(":hidden")) { >+ $("#" + href) >+ .addClass("expanded") >+ .removeClass("collapsed") >+ .attr("title", __("Collapse this section")); >+ panel.show(); >+ } >+ }); >+ > }); > > function togglePanel( node ){ >-- >2.34.1
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 7508
:
88025
|
169102
|
170575
|
174993
|
175064
|
175065
|
176632
|
176633
|
177873
|
177874