Bugzilla – Attachment 180815 Details for
Bug 31323
Edit item highlighting problem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31323: Don't highlight an item when it isn't being edited
Bug-31323-Dont-highlight-an-item-when-it-isnt-bein.patch (text/plain), 2.59 KB, created by
Marcel de Rooy
on 2025-04-11 07:30:47 UTC
(
hide
)
Description:
Bug 31323: Don't highlight an item when it isn't being edited
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-04-11 07:30:47 UTC
Size:
2.59 KB
patch
obsolete
>From e665603a37e1e05c3bc00880e337ec6f4aaa13f6 Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Fri, 4 Apr 2025 14:48:43 -0700 >Subject: [PATCH] Bug 31323: Don't highlight an item when it isn't being edited >Content-Type: text/plain; charset=utf-8 > >The thing that tells us whether we are editing an item or adding a new item >in additem.tt is whether or not the op is cud-saveitem: if it isn't, the >heading on the form is 'Add item', if it is it's 'Edit item', and the same >for which set of buttons are at the bottom of the form. We should check that >before deciding to highlight an item as being edited, rather than just counting >on the script to not pass an itemnumber param unless that itemnumber is being >edited. > >Test plan: >1. Without the patch, find any biblio with one or more items attached >2. Click the Edit button for an item in the holdings table >3. Scroll up, and verify that the item you are editing has a yellow background > in the list of items >4. Click Save changes (no need to make any changes) >5. When the page reloads, you'll have an Add item form at the bottom, but the > item that you just edited, and are no longer editing, will have a yellow > background >6. Apply patch, return to the bib details page >7. Repeat steps 2-4, but this time verify that the item you just edited is now > not highlighted while you have an Add item form. > >Sponsored-by: Chetco Community Public Library >Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 90fe28057e..4861b2d500 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -117,7 +117,7 @@ > [% FOREACH item IN items %] > [% SET can_be_edited = ! ( Koha.Preference('IndependentBranches') && ! logged_in_user.is_superlibrarian && item.homebranch != Branches.GetLoggedInBranchname() ) %] > [% SET tr_class = '' %] >- [% IF item.itemnumber == itemnumber %] >+ [% IF item.itemnumber == itemnumber AND op == 'cud-saveitem' %] > [% UNLESS can_be_edited %] > [% SET tr_class='active' %] > [% ELSE %] >-- >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 31323
:
180685
|
180711
| 180815