Bugzilla – Attachment 131327 Details for
Bug 30213
Hide Delete (aka Priority) column when user only has place_hold permission
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30213: Hide Delete (aka Priority) column when user only has place_hold permission
Bug-30213-Hide-Delete-aka-Priority-column-when-use.patch (text/plain), 5.89 KB, created by
Owen Leonard
on 2022-03-03 14:43:21 UTC
(
hide
)
Description:
Bug 30213: Hide Delete (aka Priority) column when user only has place_hold permission
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-03-03 14:43:21 UTC
Size:
5.89 KB
patch
obsolete
>From 695a11468202612ad232e1568a83afc2ca80beda Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 3 Mar 2022 12:34:33 +0000 >Subject: [PATCH] Bug 30213: Hide Delete (aka Priority) column when user only > has place_hold permission > >This patch changes the way the priority column displays when viewing a >list of holds as a user who doesn't have permission to change hold >priority. > >To test: > >- Apply the patch and log into the staff interface as a user with > at least "place_hold" permission. >- Locate a record which can be put on hold and place multiple holds. >- View the list of holds. >- As a user with both "place_hold" and "modify_holds_priority" > permission, you should see a "Priority" column with <select> fields > allowing you to change hold priority. You should also see the arrow > buttons for changing priority. >- As a user with only "place_hold" permission, the "Priority" column > should show the priority as a number. You should not see the arrow > buttons. >- In both cases, confirm that all operations work correctly: Changing > hold date, expiration date, pickup library, suspended status; > Cancelling holds. >--- > .../prog/en/includes/holds_table.inc | 49 ++++++++++--------- > 1 file changed, 26 insertions(+), 23 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >index fddaad03e3..ee2a3aee2a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >@@ -4,11 +4,9 @@ > <table class="holds_table"> > <tr> > <th><input type="checkbox" class="select_hold_all"/></th> >+ <th>Priority</th> > [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] >- <th>Priority</th> > <th> </th> >- [% ELSE %] >- <th>Delete?</th> > [% END %] > <th>Patron</th> > <th>Notes</th> >@@ -55,30 +53,35 @@ > <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" /> > <input type="hidden" name="borrowernumber" value="[% hold.borrowernumber | html %]" /> > <input type="hidden" name="biblionumber" value="[% hold.biblionumber | html %]" /> >- [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %] >- <select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]"> >- [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] >- [% PROCESS priority_dropdown %] >- [% ELSE %] >- <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option> >- [% END %] >- <option value="del">del</option> >- </select> >- [% ELSE %] >- <input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]"> >- <select name="rank-request" class="rank-request" disabled="disabled" data-hold-id="[% hold.reserve_id | html %]"> >- [% IF ( hold.found ) %] >- [% IF ( hold.intransit ) %] >- <option value="T" selected="selected">In transit</option> >- [% ELSIF (hold.inprocessing) %] >- <option value="P" selected="selected">In processing</option> >+ [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] >+ [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %] >+ <select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]"> >+ [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] >+ [% PROCESS priority_dropdown %] > [% ELSE %] >- <option value="W" selected="selected">Waiting</option> >+ <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option> > [% END %] >+ <option value="del">del</option> >+ </select> > [% ELSE %] >- <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option> >+ <input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]"> >+ <select name="rank-request" class="rank-request" disabled="disabled" data-hold-id="[% hold.reserve_id | html %]"> >+ [% IF ( hold.found ) %] >+ [% IF ( hold.intransit ) %] >+ <option value="T" selected="selected">In transit</option> >+ [% ELSIF (hold.inprocessing) %] >+ <option value="P" selected="selected">In processing</option> >+ [% ELSE %] >+ <option value="W" selected="selected">Waiting</option> >+ [% END %] >+ [% ELSE %] >+ <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option> >+ [% END %] >+ </select> > [% END %] >- </select> >+ [% ELSE %] >+ <input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]"> >+ [% hold.priority | html %] > [% END %] > </td> > [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%] >-- >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 30213
:
131327
|
131336
|
138761