Bugzilla – Attachment 140878 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), 5.69 KB, created by
Alex Buckley
on 2022-09-23 02:23:44 UTC
(
hide
)
Description:
Bug 31611: Clearly highlight items that cannot be modified/deleted in the Batch item tools
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2022-09-23 02:23:44 UTC
Size:
5.69 KB
patch
obsolete
>From 7515489cc4f7605ee49f00903c6f0588ab2513a0 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: Tools > '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)' and '(tools)' >permissions selected >11. Go to: Tools > '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 >--- > .../prog/en/includes/html_helpers.inc | 14 ++++++++++---- > koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js | 9 +++------ > 2 files changed, 13 insertions(+), 10 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 237500bf7a..a921ed2013 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >@@ -213,7 +213,7 @@ > [% IF display_columns_selection %][%# Needs js/pages/batchMod.js %] > [% IF checkboxes_edit OR checkboxes_delete %] > <div id="toolbar"> >- <a id="selectallbutton" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="clearallbutton" href="#"><i class="fa fa-remove"></i> Clear all</a> | <a id="clearonloanbutton" href="#">Clear on loan</a> >+ <a id="selectallbutton" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="clearallbutton" href="#"><i class="fa fa-remove"></i> Clear all</a> > </div> > [% END %] > >@@ -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 edit"></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..4a83d173cd 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 () { >@@ -139,12 +142,6 @@ $(document).ready(function () { > $(this).prop("checked", false); > }); > }); >- $("#clearonloanbutton").click(function () { >- $("#itemst input[name='itemnumber'][data-is-onloan='1']").each(function () { >- $(this).prop('checked', false); >- }); >- return false; >- }); > $("#selections input").change(function (e) { > var num = $(this).attr("id"); > if (num == 'showall') { >-- >2.20.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 31611
:
140878
|
140879
|
140880
|
144888
|
144889
|
144890
|
144897
|
144898
|
147286
|
147287