From 9ecfc2878630a920ad9e8888cb6309c6b89d63e0 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 3 Nov 2025 13:20:19 +0000 Subject: [PATCH] Bug 41170: Highlight previously edited item on add items page Some libraries find it useful to have the item that was just edited/saved visible in the items list To test: 0 - Apply patch 1 - Edit an item, confirm the itme is highlighted yellow with title 'Currently editing' (Hover to see the title) 2 - Save the item 3 - Confirm item is now highlighted light blue with title 'Previously edited' 4 - Sign off --- .../intranet-tmpl/prog/css/addbiblio.css | 3 +++ .../prog/en/modules/cataloguing/additem.tt | 20 +++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css b/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css index 5eb6595e4a7..c5ac3c8f11a 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css +++ b/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css @@ -308,6 +308,9 @@ tbody tr.active:nth-child( 2n+1 ) td, tbody tr.active td { background-color: #FFFFCC; } +tbody tr.previous td { + background-color: #CCFFFF; +} #loading { background-color: #FFF; 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 76758d3deb6..274adf391c2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -118,17 +118,21 @@ [% 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 AND op == 'cud-saveitem' %] - [% UNLESS can_be_edited %] - [% SET tr_class='active' %] + [% SET tr_class = [] %] + [% SET tr_title = "" %] + [% IF item.itemnumber == itemnumber %] + [% IF op == 'cud-saveitem' %] + [% tr_class.push('active') %] + [% tr_title = t("Currently editing") %] [% ELSE %] - [% SET tr_class='active editable' %] + [% tr_class.push('previous') %] + [% tr_title = t("Previously edited") %] [% END %] - [% ELSIF can_be_edited %] - [% SET tr_class='editable' %] [% END %] - + [% IF can_be_edited %] + [% tr_class.push = 'editable' %] + [% END %] + [% UNLESS can_be_edited %]   [% ELSE %] -- 2.39.5