Bug 40654: Adjust display to show current priority

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 58dc43e06e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Lucas Gass 2025-08-20 16:34:14 +00:00 committed by Paul Derscheid
parent 369f8ae6e2
commit 4844ce3f18
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
2 changed files with 49 additions and 35 deletions

View File

@ -47,46 +47,52 @@
[% SET tr_class = hold.suspend ? 'suspend' : '' %]
<tr class="[% tr_class | html %]">
<td><input type="checkbox" class="select_hold" data-id="[% hold.reserve_id | html %]" /></td>
<td>
<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 ( 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 ) %]
[% FOREACH priority IN all_priorities %]
[% IF priority == this_priority %]
<option value="[% priority | html %]" selected="selected">[% priority | html %]</option>
[% ELSIF priority > 0 %]
<option value="[% priority | html %]">[% priority | html %]</option>
<td style="min-width:185px;" data-order="[% priority | html %]">
<div>
<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 ( CAN_user_reserveforothers_modify_holds_priority ) %]
[% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %]
<label for="rank-request_[% hold.reserve_id | html %]">Change priority to:</label>
<select name="rank-request" id="rank-request_[% hold.reserve_id | html %]" class="rank-request" data-hold-id="[% hold.reserve_id | html %]">
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
[% FOREACH priority IN all_priorities %]
[% IF priority == this_priority %]
<option value="[% priority | html %]" selected="selected">[% priority | html %]</option>
[% ELSIF priority > 0 %]
<option value="[% priority | html %]">[% priority | html %]</option>
[% END %]
[% END %]
[% ELSE %]
<option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
[% END %]
[% ELSE %]
<option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
[% END %]
<option value="del">del</option>
</select>
<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>
[% ELSE %]
<option value="W" selected="selected">Waiting</option>
[% END %]
[% ELSE %]
<option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
[% END %]
</select>
[% END %]
[% 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>
[% ELSE %]
<option value="W" selected="selected">Waiting</option>
[% END %]
[% ELSE %]
<option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
[% END %]
</select>
[% END %]
[% 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 %]
<div>
<label for="current_priority_[% hold.reserve_id | html %]">Current priority: </label>
<span id="current_priority_[% hold.reserve_id | html %]" class="current_priority badge text-bg-info">[% hold.priority | html %]</span>
</div>
</div>
</td>
[%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
[%- UNLESS hold.found -%]

View File

@ -105,6 +105,14 @@
:disabled {
opacity: 0.5;
}
.current_priority {
width: 50px;
text-align: left;
margin-top: 5px;
}
.rank-request {
width: 50px;
}
</style>
[% END %]
</head>