Bugzilla – Attachment 144897 Details for
Bug 31611
More visibly highlight records that cannot be batch deleted/modified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31611: Clearly highlight items that cannot be modified/deleted in the Batch item tools
Bug-31611-Clearly-highlight-items-that-cannot-be-m.patch (text/plain), 4.74 KB, created by
David Nind
on 2023-01-01 23:05:42 UTC
(
hide
)
Description:
Bug 31611: Clearly highlight items that cannot be modified/deleted in the Batch item tools
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-01-01 23:05:42 UTC
Size:
4.74 KB
patch
obsolete
>From 3c97c19df7f0d7e2c4782f323a1c3794566145ec Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Thu, 22 Sep 2022 19:15:25 +1200 >Subject: [PATCH] Bug 31611: Clearly highlight items that cannot be > modified/deleted in the Batch item tools > >Test plan: >1. Apply patches >2. Check out an item with a different home branch than the library >you're logged in as >3. Go to: 'Cataloguing' > 'Batch item deletion' >4. Into the barcode list area paste the checked-out item's barcode and the barcode of a non-checked out item (with the same home library as the branch you're logged in as) and submit the form >5. Observe in the table that loads the row containing the checked out item is highlighted >yellow, and it has a red cross in the first column. >6. Hover over the red cross to see the reason why you cannot delete the >item appears >7. Observe the non checked out item has a checkbox and is not >highlighted yellow >8. Click 'Select all' and 'Clear all' links and notice the display of >the checked out item remains unchanged > >9. Change 'IndependentBranches' syspref = 'yes' >10. Log into the staff client as a patron with only the '(catalogue)', '(editcatalogue)', and '(tools)' >permissions selected >11. Go to: 'Cataloguing' > 'Batch item modification' >12. Enter the checked-out item's barcode and a non-checked out item's >barcode and submit the form >13. Observe the table row for the checked out item is again highlighted >yellow, with a red cross. >14. Hover over the red cross and observe the text 'Cannot edit' is shown >15. Observe the non-checked out item is not highlighted yellow and does >have a checkbox > >Sponsored-by: Toi Ohomai Institute of Technology, New Zealand > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../intranet-tmpl/prog/en/includes/html_helpers.inc | 12 +++++++++--- > koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js | 3 +++ > 2 files changed, 12 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >index 52d645f255..39fcaae30c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >@@ -268,7 +268,9 @@ > <td>[% item.index + 1 | html %]</td> > [% IF checkboxes_edit %] > [% UNLESS can_be_edited%] >- <td class="error">Cannot edit</td> >+ <td class="error"> >+ <i class="fa fa-times fa-lg" title="Cannot edit"></i> >+ </td> > [% ELSE %] > <td> > <input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" data-is-onloan="[% item.is_checked_out | html %]" /> >@@ -276,7 +278,9 @@ > [% END %] > [% ELSIF checkboxes_delete %] > [% UNLESS can_be_edited %] >- <td class="error">Cannot delete</td> >+ <td class="error"> >+ <i class="fa fa-times fa-lg" title="Cannot delete"></i> >+ </td> > [% ELSE %] > [% IF item.safe_to_delete %] > <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" /></td> >@@ -293,7 +297,9 @@ > [% END %] > [% END %] > >- <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" disabled="disabled" title="[% cannot_delete_reason | html %]"/></td> >+ <td class="error"> >+ <i class="fa fa-times fa-lg" title="[% cannot_delete_reason | html %]"></i> >+ </td> > [% END %] > > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >index 4d178d29d5..56d5270a53 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >@@ -127,6 +127,9 @@ $(document).ready(function () { > ], > "bPaginate": false, > })); >+ // Highlight in yellow item rows that cannot be deleted >+ $(".error").parents('tr').find('td').css('background-color', '#ffff99'); >+ > $("#selectallbutton").click(function (e) { > e.preventDefault(); > $("#itemst input:checkbox").each(function () { >-- >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 31611
:
140878
|
140879
|
140880
|
144888
|
144889
|
144890
|
144897
|
144898
|
147286
|
147287