Bug 19469: Clean up template whitespace

Sponsored-by: Stockholm University Library

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Passed QA test tool
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Kyle Hall 2017-09-30 08:03:30 -04:00 committed by Nick Clemens
parent 83e515820a
commit 18d85cc8d7

View file

@ -507,201 +507,215 @@
[% END %]
[% UNLESS ( patron ) %]
[% IF ( reserveloop ) %]
<form name="T[% time | html %]" action="modrequest.pl" method="post">
[% IF ( multi_hold ) %]
<input type = "hidden" name="multi_hold" value="1"/>
<input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
[% END %]
<fieldset class="rows left">
<legend>Existing holds</legend>
[% FOREACH biblioloo IN biblioloop %]
[% IF ( biblioloo.reserveloop ) %]
<table>
[% IF ( multi_hold ) %]
<caption><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | html %]">[% biblioloo.title | html %]</a></caption>
[% END %]
<tr>
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<th>Priority</th>
<th>&nbsp;</th>
[% ELSE %]
<th>Delete?</th>
[% END %]
<th>Patron</th>
<th>Notes</th>
<th>Date</th>
<th>Expiration</th>
<th>Pickup library</th>
<th>Details</th>
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<th><img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Toggle set to lowest priority" /></th>
[% END %]
<th>&nbsp;</th>
[% IF SuspendHoldsIntranet %]<th>&nbsp;</th><!-- Suspend Holds Column Header -->[% END %]
</tr>
[% FOREACH reserveloo IN biblioloo.reserveloop %]
<tr>
<td>
<input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id | html %]" />
<input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernumber | html %]" />
<input type="hidden" name="biblionumber" value="[% reserveloo.biblionumber | html %]" />
<select name="rank-request">
[% IF ( reserveloo.found ) %]
[% IF ( reserveloo.intransit ) %]
<option value="T" selected="selected">In transit</option>
[% ELSE %]
<option value="W" selected="selected">Waiting</option>
[% END %]
[% END %]
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
[% FOREACH optionloo IN reserveloo.optionloop %]
[% IF ( optionloo.selected ) %]
<option value="[% optionloo.num | html %]" selected="selected">[% optionloo.num | html %]</option>
[% ELSE %]
<option value="[% optionloo.num | html %]">[% optionloo.num | html %]</option>
[% END %]
[% END %]
[% ELSIF !reserveloo.found %]
<option value="[% reserveloo.priority | html %]" selected="selected">[% reserveloo.priority | html %]</option>
[% END %]
<option value="del">del</option>
</select>
</td>
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<td style="white-space:nowrap;">
<a title="Move hold up" href="request.pl?action=move&amp;where=up&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
<img src="[% interface | html %]/[% theme | html %]/img/go-up.png" alt="Go up" />
</a>
<a title="Move hold to top" href="request.pl?action=move&amp;where=top&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
<img src="[% interface | html %]/[% theme | html %]/img/go-top.png" alt="Go top" />
</a>
<a title="Move hold to bottom" href="request.pl?action=move&amp;where=bottom&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
<img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Go bottom" />
</a>
<a title="Move hold down" href="request.pl?action=move&amp;where=down&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
<img src="[% interface | html %]/[% theme | html %]/img/go-down.png" alt="Go down" />
</a>
</td>
[% END %]
<td>
[% INCLUDE 'patron-title.inc' patron=reserveloo.patron hide_patron_infos_if_needed=1 %]
</td>
<td>[% reserveloo.notes | html %]</td>
<td>[% reserveloo.date | html %]</td>
<td>[% reserveloo.expirationdate | html %]</td>
<td>
[% IF ( reserveloo.found ) %]
[% IF ( reserveloo.atdestination ) %]
[% IF ( reserveloo.found ) %]
Item waiting at <b> [% reserveloo.wbrname | html %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode | html %]" /> since [% reserveloo.waiting_date | $KohaDates %]
[% ELSE %]
Waiting to be pulled <input type="hidden" name="pickup" value="[% reserveloo.wbrcode | html %]" />
[% IF ( reserveloop ) %]
<form name="T[% time %]" action="modrequest.pl" method="post">
[% IF ( multi_hold ) %]
<input type = "hidden" name="multi_hold" value="1"/>
<input type = "hidden" name="biblionumbers" value="[% biblionumbers %]"/>
[% END %]
[% ELSE %]
Item being transferred to <b> [% reserveloo.wbrname | html %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode | html %]" />
[% END %]
[% ELSE %]
[% IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 %]
[% Branches.GetName(reserveloo.branchcode) | html %] <input type="hidden" name="pickup" value="[% reserveloo.branchcode | html %]" />
[% ELSE %]
<select name="pickup">
[% PROCESS options_for_libraries libraries => Branches.all({ search_params => { pickup_location => 1 }, selected => reserveloo.branchcode }) %]
</select>
[% END %]
<fieldset class="rows left">
<legend>Existing holds</legend>
[% FOREACH biblioloo IN biblioloop %]
[% IF ( biblioloo.reserveloop ) %]
<table>
[% IF ( multi_hold ) %]
<caption><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber %]">[% biblioloo.title |html %]</a></caption>
[% END %]
<tr>
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<th>Priority</th>
<th>&nbsp;</th>
[% ELSE %]
<th>Delete?</th>
[% END %]
<th>Patron</th>
<th>Notes</th>
<th>Date</th>
<th>Expiration</th>
<th>Pickup library</th>
<th>Details</th>
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<th><img src="[% interface %]/[% theme %]/img/go-bottom.png" alt="Toggle set to lowest priority" /></th>
[% END %]
<th>&nbsp;</th>
[% IF SuspendHoldsIntranet %]<th>&nbsp;</th><!-- Suspend Holds Column Header -->[% END %]
</tr>
[% FOREACH reserveloo IN biblioloo.reserveloop %]
<tr>
<td>
<input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id %]" />
<input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernumber %]" />
<input type="hidden" name="biblionumber" value="[% reserveloo.biblionumber %]" />
<select name="rank-request">
[% IF ( reserveloo.found ) %]
[% IF ( reserveloo.intransit ) %]
<option value="T" selected="selected">In transit</option>
[% ELSE %]
<option value="W" selected="selected">Waiting</option>
[% END %]
[% END %]
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
[% FOREACH optionloo IN reserveloo.optionloop %]
[% IF ( optionloo.selected ) %]
<option value="[% optionloo.num %]" selected="selected">[% optionloo.num %]</option>
[% ELSE %]
<option value="[% optionloo.num %]">[% optionloo.num %]</option>
[% END %]
[% END %]
[% ELSIF !reserveloo.found %]
<option value="[% reserveloo.priority %]" selected="selected">[% reserveloo.priority %]</option>
[% END %]
<option value="del">del</option>
</select>
</td>
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<td style="white-space:nowrap;">
<a title="Move hold up" href="request.pl?action=move&amp;where=up&amp;borrowernumber=[% reserveloo.borrowernumber %]&amp;biblionumber=[% reserveloo.biblionumber %]&amp;reserve_id=[% reserveloo.reserve_id %]&amp;date=[% reserveloo.date %]">
<img src="[% interface %]/[% theme %]/img/go-up.png" alt="Go up" />
</a>
<a title="Move hold to top" href="request.pl?action=move&amp;where=top&amp;borrowernumber=[% reserveloo.borrowernumber %]&amp;biblionumber=[% reserveloo.biblionumber %]&amp;reserve_id=[% reserveloo.reserve_id %]&amp;date=[% reserveloo.date %]">
<img src="[% interface %]/[% theme %]/img/go-top.png" alt="Go top" />
</a>
<a title="Move hold to bottom" href="request.pl?action=move&amp;where=bottom&amp;borrowernumber=[% reserveloo.borrowernumber %]&amp;biblionumber=[% reserveloo.biblionumber %]&amp;reserve_id=[% reserveloo.reserve_id %]&amp;date=[% reserveloo.date %]">
<img src="[% interface %]/[% theme %]/img/go-bottom.png" alt="Go bottom" />
</a>
<a title="Move hold down" href="request.pl?action=move&amp;where=down&amp;borrowernumber=[% reserveloo.borrowernumber %]&amp;biblionumber=[% reserveloo.biblionumber %]&amp;reserve_id=[% reserveloo.reserve_id %]&amp;date=[% reserveloo.date %]">
<img src="[% interface %]/[% theme %]/img/go-down.png" alt="Go down" />
</a>
</td>
[% END %]
<td>
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrowernumber %]" >
[% IF ( reserveloo.hidename ) %]
[% reserveloo.cardnumber (reserveloo.borrowernumber) %]
[% ELSE %]
[% reserveloo.firstname %] [% reserveloo.surname %]
[% END %]
</a>
</td>
<td>[% reserveloo.notes %]</td>
<td>[% reserveloo.date %]</td>
<td>[% reserveloo.expirationdate %]</td>
<td>
[% IF ( reserveloo.found ) %]
[% IF ( reserveloo.atdestination ) %]
[% IF ( reserveloo.found ) %]
Item waiting at <b> [% reserveloo.wbrname %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" /> since [% reserveloo.waiting_date | $KohaDates %]
[% ELSE %]
Waiting to be pulled <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" />
[% END %]
[% ELSE %]
Item being transferred to <b> [% reserveloo.wbrname %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" />
[% END %]
[% ELSE %]
[% IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 %]
[% Branches.GetName(reserveloo.branchcode) %] <input type="hidden" name="pickup" value="[% reserveloo.branchcode %]" />
[% ELSE %]
<select name="pickup">
[% PROCESS options_for_libraries libraries => Branches.all( selected => reserveloo.branchcode ) %]
</select>
[% END %]
[% END %]
</td>
<td>
[% IF ( reserveloo.found ) %]
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reserveloo.biblionumber %]">
[% IF ( reserveloo.barcodenumber ) %]
[% reserveloo.barcodenumber %]
<input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber %]" />
[% ELSE %]
No barcode
[% END %]
</a>
[% ELSE %]
[% IF ( reserveloo.item_level_hold ) %]
<i>
Only item
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reserveloo.biblionumber %]">
[% IF ( reserveloo.barcodenumber ) %]
[% reserveloo.barcodenumber %]
<input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber %]" />
[% ELSE %]
No barcode
[% END %]
</a>
</i>
[% ELSE %]
[% IF reserveloo.itemtype %]
<i>Next available [% ItemTypes.GetDescription( reserveloo.itemtype ) %] item</i>
[% ELSE %]
<i>Next available</i>
[% END %]
<input type="hidden" name="itemnumber" value="" />
[% END %]
[% END %]
</td>
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<td>
<a title="Toggle lowest priority" href="request.pl?action=setLowestPriority&amp;borrowernumber=[% reserveloo.borrowernumber %]&amp;biblionumber=[% reserveloo.biblionumber %]&amp;reserve_id=[% reserveloo.reserve_id %]&amp;date=[% reserveloo.date %]">
[% IF ( reserveloo.lowestPriority ) %]
<img src="[% interface %]/[% theme %]/img/go-bottom.png" alt="Unset lowest priority" />
[% ELSE %]
<img src="[% interface %]/[% theme %]/img/go-down.png" alt="Set to lowest priority" />
[% END %]
</a>
</td>
[% END %]
<td>
<a class="cancel-hold" title="Cancel hold" href="request.pl?action=cancel&amp;borrowernumber=[% reserveloo.borrowernumber %]&amp;biblionumber=[% reserveloo.biblionumber %]&amp;reserve_id=[% reserveloo.reserve_id %]&amp;date=[% reserveloo.date %]">
<img src="[% interface %]/[% theme %]/img/x.png" alt="Cancel" />
</a>
</td>
[% IF SuspendHoldsIntranet %]
<td>
[% UNLESS ( reserveloo.found ) %]
<input type="button" value="[% IF ( reserveloo.suspend ) %]Unsuspend[% ELSE %]Suspend[% END %]" onclick="window.location.href='request.pl?action=toggleSuspend&amp;reserve_id=[% reserveloo.reserve_id %]&amp;borrowernumber=[% reserveloo.borrowernumber %]&amp;biblionumber=[% reserveloo.biblionumber %]&amp;date=[% reserveloo.date %]&amp;suspend_until=' + $('#suspend_until_[% reserveloo.reserve_id %]').val()" />
[% IF AutoResumeSuspendedHolds %]
<label for="suspend_until_[% reserveloo.reserve_id %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
<input name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" size="10" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker suspend_until_datepicker" />
<a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.reserve_id %]').value='';">Clear date</a>
[% ELSE %]
<input type="hidden" name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" value=""/>
[% END %]
[% ELSE %]
<input type="hidden" name="suspend_until" value="" />
[% END %]
</td>
[% END # IF SuspendHoldsIntranet %]
</tr>
[% END %] <!-- existing reserveloop -->
</table>
[% END %]<!-- /reserveloop -->
[% END %]<!-- /biblioloop -->
<fieldset class="action">
<input type="submit" name="submit" value="Update hold(s)" />
</fieldset>
</fieldset>
</form>
[% END %]
</td>
<td>
[% IF ( reserveloo.found ) %]
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reserveloo.biblionumber | html %]">
[% IF ( reserveloo.barcodenumber ) %]
[% reserveloo.barcodenumber | html %]
<input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber | html %]" />
[% ELSE %]
No barcode
[% END %]
</a>
[% ELSE %]
[% IF ( reserveloo.item_level_hold ) %]
<i>Only item
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reserveloo.biblionumber | html %]">
[% IF ( reserveloo.barcodenumber ) %]
[% reserveloo.barcodenumber | html %]
<input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber | html %]" />
[% ELSE %]
No barcode
[% END %]
</a>
</i>
[% ELSE %]
[% IF reserveloo.itemtype %]
<i>Next available [% ItemTypes.GetDescription( reserveloo.itemtype ) | html %] item</i>
[% ELSE %]
<i>Next available</i>
[% END %]
<input type="hidden" name="itemnumber" value="" />
[% END %]
[% END %]
</td>
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<td>
<a title="Toggle lowest priority" href="request.pl?action=setLowestPriority&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
[% IF ( reserveloo.lowestPriority ) %]
<img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Unset lowest priority" />
[% ELSE %]
<img src="[% interface | html %]/[% theme | html %]/img/go-down.png" alt="Set to lowest priority" />
[% END %]
</a>
</td>
[% END %]
<td>
<a class="cancel-hold" title="Cancel hold" href="request.pl?action=cancel&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
<img src="[% interface | html %]/[% theme | html %]/img/x.png" alt="Cancel" />
</a>
</td>
[% IF SuspendHoldsIntranet %]
<td>
[% UNLESS ( reserveloo.found ) %]
<input type="button" value="[% IF ( reserveloo.suspend ) %]Unsuspend[% ELSE %]Suspend[% END %]" onclick="window.location.href='request.pl?action=toggleSuspend&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;date=[% reserveloo.date | html %]&amp;suspend_until=' + $('#suspend_until_[% reserveloo.reserve_id | html %]').val()" />
[% IF AutoResumeSuspendedHolds %]
<label for="suspend_until_[% reserveloo.reserve_id | html %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
<input name="suspend_until" id="suspend_until_[% reserveloo.reserve_id | html %]" size="10" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker suspend_until_datepicker" />
<a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.reserve_id | html %]').value='';">Clear date</a>
[% ELSE %]
<input type="hidden" name="suspend_until" id="suspend_until_[% reserveloo.reserve_id | html %]" value=""/>
[% END %]
[% ELSE %]
<input type="hidden" name="suspend_until" value="" />
[% END %]
</td>
[% END # IF SuspendHoldsIntranet %]
</tr>
[% END %] <!-- existing reserveloop -->
</table>
[% END %]<!-- /reserveloop -->
[% END %]<!-- /biblioloop -->
<fieldset class="action">
<input type="submit" name="submit" value="Update hold(s)" />
</fieldset>
</fieldset>
</form>
[% END %]
[% END %]
</div>
</div>