Bugzilla – Attachment 174993 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.67 KB, created by
Owen Leonard
on 2024-11-26 18:37:56 UTC
(
hide
)
Description:
Bug 7508: (follow-up) Show item number if item has no barcode
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-11-26 18:37:56 UTC
Size:
5.67 KB
patch
obsolete
>From 18f65d2f3b8f632bc9354a7d7251fe9dac8d0673 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. >--- > .../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 40deeaf44d..c116fdccfb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -432,7 +432,13 @@ aside { > padding-left: 0; > > ul { >- font-size: 75%; >+ background-color: #F3F4F4; >+ >+ li { >+ a { >+ padding: .5em .3em .5em 1.3rem; >+ } >+ } > } > > li { >@@ -469,15 +475,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 3e5625eff0..13e37b9f2e 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 2796eab5e5..acada26181 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -38,6 +38,10 @@ > h3.collapsed i.fa.fa-caret-down::before { > content: "\f0da"; > } >+ #items_submenu { >+ max-height: 500px; >+ overflow: auto; >+ } > </style> > [% END %] > </head> >@@ -134,9 +138,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 %] >@@ -574,6 +583,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.39.5
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