Bug 23458: Clean up holds template in the staff client

This patch reindents reserve/request.tt to use four spaces and
to eliminate tabs, following coding guidelines. Trailing white space has
been removed.

To test, apply the patch and use your preferred method for checking the
differences between files while ignoring whitespace. I use diff with the
"-w" flag, but I'm no diffctator.

Test the process of placing a hold in the staff client: A single hold,
multiple holds, etc. Everything should work correctly.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2019-08-13 15:47:08 +00:00 committed by Martin Renvoize
parent 388f5fa0ff
commit b349fa1001
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -22,9 +22,18 @@
[% INCLUDE 'circ-search.inc' %] [% INCLUDE 'circ-search.inc' %]
[% UNLESS ( multi_hold ) %] [% UNLESS ( multi_hold ) %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | html %]">[% biblio.title | html %]</a> &rsaquo; Place a hold on [% INCLUDE 'biblio-title.inc' %]</div> <div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
<a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> &rsaquo;
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | html %]">[% biblio.title | html %]</a> &rsaquo;
Place a hold on [% INCLUDE 'biblio-title.inc' %]
</div>
[% ELSE %] [% ELSE %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> &rsaquo; Confirm holds</div> <div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
<a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> &rsaquo;
Confirm holds
</div>
[% END %] [% END %]
<div class="main container-fluid"> <div class="main container-fluid">
@ -34,9 +43,10 @@
[% ELSE %] [% ELSE %]
<div class="col-sm-10 col-sm-push-2"> <div class="col-sm-10 col-sm-push-2">
[% END %] [% END %]
<main> <main>
[% IF ( noitems ) %] [% IF ( noitems ) %]
<div class="dialog alert"> <div class="dialog alert">
[%IF (multi_hold) %] [%IF (multi_hold) %]
<strong>Cannot place hold:</strong> one or more records without items attached. <strong>Cannot place hold:</strong> one or more records without items attached.
@ -44,7 +54,7 @@
<strong>Cannot place hold:</strong> this record has no items attached. <strong>Cannot place hold:</strong> this record has no items attached.
[% END %] [% END %]
</div> </div>
[% END %] [% END %]
[% IF ( messagetransfert ) %] [% IF ( messagetransfert ) %]
<div class="dialog message"> <div class="dialog message">
@ -65,11 +75,14 @@
[% UNLESS patron OR patron.borrowernumber OR noitems %] [% UNLESS patron OR patron.borrowernumber OR noitems %]
[% IF ( messageborrower ) %] [% IF ( messageborrower ) %]
<div class="dialog alert"><h3>Patron not found</h3><p>No patron with this name, please, try another</p> </div> <div class="dialog alert">
<h3>Patron not found</h3>
<p>No patron with this name, please, try another</p>
</div>
[% END %] [% END %]
<form id="holds_patronsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post"> <form id="holds_patronsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post">
<fieldset id="circ_holds_selectborrower" class="brief"> <fieldset id="circ_holds_selectborrower" class="brief">
[% UNLESS borrowers %] [% UNLESS borrowers %]
<label for="patron">Patron: </label> <label for="patron">Patron: </label>
<div class="hint">Enter patron card number or partial name:</div> <div class="hint">Enter patron card number or partial name:</div>
@ -81,28 +94,28 @@
[% ELSE %] [% ELSE %]
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
[% END %] [% END %]
</fieldset>
[% ELSE %] [% ELSE %]
[% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %] [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %]
[% END %]
</fieldset> </fieldset>
[% END %]
[% IF ( multi_hold ) %] [% IF ( multi_hold ) %]
<input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
[% END %] [% END %]
</form> </form>
[% ELSIF NOT noitems %] [% ELSIF NOT noitems %]
[% IF ( checked_previously && !multi_hold ) %] [% IF ( checked_previously && !multi_hold ) %]
<div class="dialog alert"> <div class="dialog alert">
<ul> <ul>
<li>Patron has previously checked out this title</li> <li>Patron has previously checked out this title</li>
</ul> </ul>
</div> </div>
[% END %] [% END %]
[% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %] [% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
<div class="dialog alert"> <div class="dialog alert">
[% UNLESS ( multi_hold ) %] [% UNLESS ( multi_hold ) %]
@ -136,12 +149,12 @@
[% END %] [% END %]
[% END %] [% END %]
[% END %] [% END %]
</div> </div>
[% END %] [% END %]
[% IF ( expiry || diffbranch || patron.is_debarred || ( amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') ) ) %] [% IF ( expiry || diffbranch || patron.is_debarred || ( amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') ) ) %]
<div class="dialog message"><ul> <div class="dialog message">
<ul>
[% IF ( expiry ) %] [% IF ( expiry ) %]
<li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>: <strong>Account has expired</strong></li> <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>: <strong>Account has expired</strong></li>
[% END %] [% END %]
@ -158,11 +171,15 @@
<li> <strong>Pickup library is different. </strong>Patron: <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> Patron's home library: ([% Branches.GetName(patron.branchcode) | html %] / [% patron.branchcode | html %] )</li> <li> <strong>Pickup library is different. </strong>Patron: <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> Patron's home library: ([% Branches.GetName(patron.branchcode) | html %] / [% patron.branchcode | html %] )</li>
[% END %] [% END %]
</ul></div> </ul>
[% END %] </div>
[% END %]
[% IF ( messageborrower ) %] [% IF ( messageborrower ) %]
<div class="dialog alert"><h3>Patron not found:</h3> <p>Name or barcode not found. Please try an other </p></div> <div class="dialog alert">
<h3>Patron not found:</h3>
<p>Name or barcode not found. Please try an other </p>
</div>
[% END %] [% END %]
<fieldset class="rows left"> <fieldset class="rows left">
@ -187,19 +204,23 @@
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
[% END %] [% END %]
<ol> <li><span class="label">Patron:</span> <ol>
<li>
<span class="label">Patron:</span>
[% IF ( patron.borrowernumber ) %] [% IF ( patron.borrowernumber ) %]
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a>
[% ELSE %] [% ELSE %]
Not defined yet Not defined yet
[% END %] [% END %]
</li> </li>
[% UNLESS ( multi_hold ) %] [% UNLESS ( multi_hold ) %]
<li> <li>
<span class="label">Estimated priority:</span> <span class="label">Estimated priority:</span>
<strong>[% fixedRank | html %]</strong> <strong>[% fixedRank | html %]</strong>
</li> </li>
[% END %] [% END %]
<li> <li>
<label for="holdnotes">Notes:</label> <label for="holdnotes">Notes:</label>
<textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea> <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
@ -240,7 +261,8 @@
</li> </li>
[% UNLESS ( multi_hold ) %] [% UNLESS ( multi_hold ) %]
<li> <label for="requestany">Hold next available item </label> <li>
<label for="requestany">Hold next available item </label>
[% IF force_hold_level == 'item' %] [% IF force_hold_level == 'item' %]
<input type="checkbox" id="requestany" name="request" disabled="true" /> <input type="checkbox" id="requestany" name="request" disabled="true" />
[% ELSIF force_hold_level == 'record' %] [% ELSIF force_hold_level == 'record' %]
@ -262,8 +284,8 @@
<input type="hidden" name="holds_to_place_count" value="1" /> <input type="hidden" name="holds_to_place_count" value="1" />
[% END %] [% END %]
[% END %] [% END %]
</ol>
</ol>
[% UNLESS ( multi_hold ) %] [% UNLESS ( multi_hold ) %]
<fieldset class="action"> <fieldset class="action">
[% IF ( patron.borrowernumber ) %] [% IF ( patron.borrowernumber ) %]
@ -276,13 +298,22 @@
[% END %] [% END %]
[% END %] [% END %]
</fieldset> </fieldset>
[% FOREACH bibitemloo IN bibitemloop %] [% FOREACH bibitemloo IN bibitemloop %]
<ol> <ol>
[% UNLESS ( item_level_itypes ) %] [% UNLESS ( item_level_itypes ) %]
<li><span class="label">Item type:</span> [% bibitemloo.description | html %]</li> <li>
<span class="label">Item type:</span>
[% bibitemloo.description | html %]
</li>
[% END %] [% END %]
[% IF ( bibitemloo.publicationyear ) %]<li><span class="label">Publication year:</span> [% bibitemloo.publicationyear | html %]</li>[% END %] [% IF ( bibitemloo.publicationyear ) %]
<li>
<span class="label">Publication year:</span>
[% bibitemloo.publicationyear | html %]
</li>
[% END %]
</ol> </ol>
<h2 style="padding: 0 1em;"> <h2 style="padding: 0 1em;">
@ -291,6 +322,7 @@
<span class="error"><i>(Required)</i></span> <span class="error"><i>(Required)</i></span>
[% END %] [% END %]
</h2> </h2>
<table id="requestspecific"> <table id="requestspecific">
<thead> <thead>
<tr> <tr>
@ -365,7 +397,6 @@
[% itemloo.itypename | html %] [% itemloo.itypename | html %]
</td> </td>
[% END %] [% END %]
<td> <td>
[% itemloo.barcode | html %] [% itemloo.barcode | html %]
</td> </td>
@ -408,9 +439,19 @@
Can't be cancelled when item is in transit Can't be cancelled when item is in transit
[% ELSE %] [% ELSE %]
[% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %]
[% IF ( itemloo.canreservefromotherbranches ) %]for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedFor.borrowernumber | uri %]">[% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %]</a>[% END %] [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %] [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] [% IF ( itemloo.canreservefromotherbranches ) %]
since for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedFor.borrowernumber | uri %]">[% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %]</a>
[% IF ( itemloo.waitingdate ) %][% itemloo.waitingdate | $KohaDates %][% ELSE %][% IF ( itemloo.reservedate ) %][% itemloo.reservedate | html %][% END %][% END %]. <a class="info cancel-hold" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&amp;CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&amp;CancelItemnumber=[% itemloo.itemnumber | html %]">Cancel hold</a> [% END %]
[% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %]
[% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since
[% IF ( itemloo.waitingdate ) %]
[% itemloo.waitingdate | $KohaDates %]
[% ELSE %]
[% IF ( itemloo.reservedate ) %]
[% itemloo.reservedate | html %]
[% END %]
[% END %].
<a class="info cancel-hold" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&amp;CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&amp;CancelItemnumber=[% itemloo.itemnumber | html %]">Cancel hold</a>
[% END %] [% END %]
[% ELSE %] [% ELSE %]
Not on hold Not on hold
@ -439,9 +480,12 @@
[% END %] <!-- itemloop --> [% END %] <!-- itemloop -->
</tbody> </tbody>
</table> </table>
[% IF ( bibitemloo.hiddencount ) %] [% IF ( bibitemloo.hiddencount ) %]
<form> <form>
<p class="hiddencount"><a href="request.pl?biblionumber=[% bibitemloo.biblionumber | uri %]&amp;borrowernumber=[% bibitemloo.borrowernumber | uri %]&amp;showallitems=1">Show all items ([% bibitemloo.hiddencount | html %] hidden)</a></p> <p class="hiddencount">
<a href="request.pl?biblionumber=[% bibitemloo.biblionumber | uri %]&amp;borrowernumber=[% bibitemloo.borrowernumber | uri %]&amp;showallitems=1">Show all items ([% bibitemloo.hiddencount | html %] hidden)</a>
</p>
</form> </form>
[% END %] <!-- hiddencount --> [% END %] <!-- hiddencount -->
[% END %] <!-- bibitemloop --> [% END %] <!-- bibitemloop -->
@ -466,13 +510,18 @@
[% END %] [% END %]
<td> <td>
[% UNLESS ( biblioloo.warn ) %] [% UNLESS ( biblioloo.warn ) %]
<input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/></td> <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/>
</td>
[% END %] [% END %]
<td> <td>
<ul> <ul>
<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a></li> <li>
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a>
</li>
[% IF ( biblioloo.publicationyear ) %] [% IF ( biblioloo.publicationyear ) %]
<li><span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]</li> <li>
<span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]
</li>
[% END %] [% END %]
</ul> </ul>
[% IF ( biblioloo.warn ) %] [% IF ( biblioloo.warn ) %]
@ -498,7 +547,10 @@
[% END %] [% END %]
[% IF ( biblioloo.alreadyres ) %] [% IF ( biblioloo.alreadyres ) %]
<li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> <strong>already has a hold</strong> on this item </li> <li>
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>
<strong>already has a hold</strong> on this item
</li>
[% END %] [% END %]
[% IF ( biblioloo.none_avail ) %] [% IF ( biblioloo.none_avail ) %]
<li> <strong>No items are available</strong> to be placed on hold</li> <li> <strong>No items are available</strong> to be placed on hold</li>
@ -511,7 +563,6 @@
</ul> </ul>
[% END %] [% END %]
[% END %] [% END %]
</td> </td>
</tr> </tr>
[% END %] [% END %]
@ -536,9 +587,9 @@
</fieldset> </fieldset>
</form> </form>
</fieldset> </fieldset>
[% END %] [% END %]
[% UNLESS ( patron ) %] [% UNLESS ( patron ) %]
[% IF ( reserveloop ) %] [% IF ( reserveloop ) %]
<form name="T[% time | html %]" action="modrequest.pl" method="post"> <form name="T[% time | html %]" action="modrequest.pl" method="post">
[% IF ( multi_hold ) %] [% IF ( multi_hold ) %]
@ -664,7 +715,7 @@
</fieldset> </fieldset>
</form> </form>
[% END %] [% END %]
[% END %] [% END %]
</main> </main>