Bug 32482: Reindent holds awaiting pickup template

This patch reindents the holds awaiting pickup template so that it has
consistent indentation.

This patch also corrects a markup error that was causing a layout issue.
Incorrectly closed <div>s caused the circulation sidebar menu to
disappear.

To test, apply the patch and test all aspects of the page, including:

- Correctly functioning tabs and DataTables
- Cancel selected holds waiting
- Cancel selected holds waiting past ReservesMaxPickUpDelay
- Cancel all holds waiting past ReservesMaxPickUpDelay
- Cancel individual holds with cancellation requests (Cancellations
  of waiting holds via the OPAC. See "Default waiting hold cancellation
  policy" in Circulation and Fine rules).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Owen Leonard 2022-12-16 11:48:54 +00:00 committed by Tomas Cohen Arazi
parent 06ff7cfc20
commit 1e49a9fa85
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -38,129 +38,131 @@
<main> <main>
<div class="row"> <div class="row">
[% IF Koha.Preference('CircSidebar') %] [% IF Koha.Preference('CircSidebar') %]
<div class="col-sm-10 col-sm-push-2"> <div class="col-sm-10 col-sm-push-2">
[% ELSE %] [% ELSE %]
<div class="col-sm-12"> <div class="col-sm-12">
[% END %] [% END %]
<h1>Holds awaiting pickup for your library on: [% show_date | $KohaDates %]</h1> <h1>Holds awaiting pickup for your library on: [% show_date | $KohaDates %]</h1>
<h2> <h2>
[% IF ( all_branches_link ) %] [% IF ( all_branches_link ) %]
<span><a href="[% all_branches_link | url %]"> <span><a href="[% all_branches_link | url %]">
View all libraries</a></span> View all libraries</a></span>
[% END %] [% END %]
</h2> </h2>
[% IF reject_result_error %] [% IF reject_result_error %]
<div class="error message"> <div class="error message">
[% IF reject_result_error.invalid_status %] [% IF reject_result_error.invalid_status %]
<p>There was a problem rejecting the cancellation request. Cannot reject an already completed cancellation request.</p> <p>There was a problem rejecting the cancellation request. Cannot reject an already completed cancellation request.</p>
[% ELSE %] [% ELSE %]
<p>Some error occurred while rejecting the cancellation request. Please check the logs</p> <p>Some error occurred while rejecting the cancellation request. Please check the logs</p>
[% END %] [% END %]
</div> </div>
[% END %] [% END %]
[% IF ( cancel_result ) %] [% IF ( cancel_result ) %]
[% FOREACH cancel_result %] [% FOREACH cancel_result %]
[% IF ( messagetransfert ) %] [% IF ( messagetransfert ) %]
<div class="dialog message"> <div class="dialog message">
<h2>This item is on hold for pick-up at [% Branches.GetName( branchname ) | html %]</h2> <h2>This item is on hold for pick-up at [% Branches.GetName( branchname ) | html %]</h2>
<p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong> [% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>. <p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong> [% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
Please retain this item and check it in to process the hold. Please retain this item and check it in to process the hold.
</p> </p>
<form name="cancelReservewithtransfert" action="waitingreserves.pl#[% tab | html %]" method="post"> <form name="cancelReservewithtransfert" action="waitingreserves.pl#[% tab | html %]" method="post">
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button> <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
</form> </form>
</div> </div>
[% END %] [% END %]
[% IF ( waiting ) %] [% IF ( waiting ) %]
<div class="dialog message"> <div class="dialog message">
<h2>This item is on hold for pick-up at your library</h2> <h2>This item is on hold for pick-up at your library</h2>
<p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong>[% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>. <p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong>[% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
Please retain this item and check it in to process the hold. Please retain this item and check it in to process the hold.
</p> </p>
<form name="cancelReservewithwaiting" action="waitingreserves.pl#[% tab | html %]" method="post"> <form name="cancelReservewithwaiting" action="waitingreserves.pl#[% tab | html %]" method="post">
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button> <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
</form> </form>
</div> </div>
[% END %] [% END %]
[% END %] [% END %]
[% ELSE %] [% ELSE %]
[% IF enqueued %] [% IF enqueued %]
<div class="dialog message"> <div class="dialog message">
<p>The job has been enqueued! It will be processed as soon as possible.</p> <p>The job has been enqueued! It will be processed as soon as possible.</p>
<p><a href="/cgi-bin/koha/admin/background_jobs.pl?op=view&id=[% job_id | uri %]" title="View detail of the enqueued job">View detail of the enqueued job</a></p> <p><a href="/cgi-bin/koha/admin/background_jobs.pl?op=view&id=[% job_id | uri %]" title="View detail of the enqueued job">View detail of the enqueued job</a></p>
</div> </div>
[% END %] [% END %]
<div id="resultlist" class="toptabs"> <div id="resultlist" class="toptabs">
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#holdswaiting" aria-controls="holdswaiting" role="tab" data-toggle="tab">Holds waiting: [% reservecount | html %]</a></li> <li role="presentation" class="active"><a href="#holdswaiting" aria-controls="holdswaiting" role="tab" data-toggle="tab">Holds waiting: [% reservecount | html %]</a></li>
<li role="presentation"> <li role="presentation">
<a href="#holdsover" aria-controls="holdsover" role="tab" data-toggle="tab"> <a href="#holdsover" aria-controls="holdsover" role="tab" data-toggle="tab">
Holds waiting over [% Koha.Preference('ReservesMaxPickUpDelay') | html %] days: [% overcount | html %] Holds waiting over [% Koha.Preference('ReservesMaxPickUpDelay') | html %] days: [% overcount | html %]
</a> </a>
</li> </li>
<li role="presentation"> <li role="presentation">
<a href="#holdscancelled" aria-controls="holdscancelled" role="tab" data-toggle="tab"> <a href="#holdscancelled" aria-controls="holdscancelled" role="tab" data-toggle="tab">
Holds with cancellation requests: [% cancel_reqs_count | html %] Holds with cancellation requests: [% cancel_reqs_count | html %]
</a> </a>
</li> </li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="holdswaiting"> <div role="tabpanel" class="tab-pane active" id="holdswaiting">
[% IF ( reserveloop ) %] [% IF ( reserveloop ) %]
<div id="toolbar" class="btn-toolbar"> <div id="toolbar" class="btn-toolbar">
<button class="btn btn-default cancel_selected_holds" data-bulk="true"></button> <button class="btn btn-default cancel_selected_holds" data-bulk="true"></button>
</div> </div>
[% INCLUDE waiting_holds.inc table_name='holdst' reserveloop=reserveloop tab='holdwaiting' %] [% INCLUDE waiting_holds.inc table_name='holdst' reserveloop=reserveloop tab='holdwaiting' %]
[% ELSE %] [% ELSE %]
<div class="dialog message">No holds found.</div> <div class="dialog message">No holds found.</div>
[% END %] [% END %]
</div> </div>
<div role="tabpanel" class="tab-pane" id="holdsover"> <div role="tabpanel" class="tab-pane" id="holdsover">
[% IF ( ReservesMaxPickUpDelay ) %]<p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay | html %] days.</p>[% END %] [% IF ( ReservesMaxPickUpDelay ) %]
[% IF ( overloop ) %] <p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay | html %] days.</p>
<span id="holdsover-cancel-all"> [% END %]
<button class="cancel_selected_holds" data-bulk="true"></button> [% IF ( overloop ) %]
<form name="cancelAllReserve" action="waitingreserves.pl" method="post"> <span id="holdsover-cancel-all">
<input type="hidden" name="cancelall" value="1" /> <button class="cancel_selected_holds" data-bulk="true"></button>
<input type="hidden" name="allbranches" value="[% allbranches | html %]" /> <form name="cancelAllReserve" action="waitingreserves.pl" method="post">
<input type="hidden" name="tab" value="holdsover"> <input type="hidden" name="cancelall" value="1" />
[% IF TransferWhenCancelAllWaitingHolds %] <input type="hidden" name="allbranches" value="[% allbranches | html %]" />
<input type="submit" class="btn btn-primary" value="Cancel and transfer all" /> <input type="hidden" name="tab" value="holdsover">
[% ELSE %] [% IF TransferWhenCancelAllWaitingHolds %]
<input type="submit" class="btn btn-primary" value="Cancel all" /> <input type="submit" class="btn btn-primary" value="Cancel and transfer all" />
[% END %] [% ELSE %]
</form> <input type="submit" class="btn btn-primary" value="Cancel all" />
[% UNLESS TransferWhenCancelAllWaitingHolds %] [% END %]
Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds syspref) </form>
[% END %] [% UNLESS TransferWhenCancelAllWaitingHolds %]
Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds syspref)
</span> [% END %]
[% INCLUDE waiting_holds.inc table_name='holdso' reserveloop=overloop tab='holdsover' %] </span>
[% ELSE %] [% INCLUDE waiting_holds.inc table_name='holdso' reserveloop=overloop tab='holdsover' %]
<div class="dialog message">No holds found.</div> [% ELSE %]
[% END %] <div class="dialog message">No holds found.</div>
</div> [% END %]
<div role="tabpanel" class="tab-pane" id="holdscancelled"> </div>
[% IF cancel_reqs_count %] <div role="tabpanel" class="tab-pane" id="holdscancelled">
[% INCLUDE waiting_holds.inc select_column='1' table_name='holdscr' reserveloop=cancel_reqs tab='holdscr' %] [% IF cancel_reqs_count %]
[% ELSE %] [% INCLUDE waiting_holds.inc select_column='1' table_name='holdscr' reserveloop=cancel_reqs tab='holdscr' %]
<div class="dialog message">No holds found.</div> [% ELSE %]
[% END %] <div class="dialog message">No holds found.</div>
</div> [% END %]
</div> </div>
[% END %] </div>
</div>
[% END %]
</div> <!-- /.col-sm-10.col-sm-push-2 -->
[% IF Koha.Preference('CircSidebar') %] [% IF Koha.Preference('CircSidebar') %]
</div> <!-- /.col-sm-10.col-sm-push-2 --> <div class="col-sm-2 col-sm-pull-10">
<div class="col-sm-2 col-sm-pull-10"> <aside>
<aside> [% INCLUDE 'circ-nav.inc' %]
[% INCLUDE 'circ-nav.inc' %] </aside>
</aside> </div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% END %] [% END %]
</div> <!-- /.row -->
</main> </main>
</div> <!-- /.col-sm-12 --> </div> <!-- /.col-sm-12 -->