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> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
b5d6ccdf60
commit
c004913b52
2 changed files with 12 additions and 3 deletions
koha-tmpl/intranet-tmpl/prog
|
@ -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 %]
|
||||
|
|
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue