Bug 32193: Reindent item details template
This patch performs general template cleanup to the lists template: Make indentation consistent, replace tabs with spaces, and trim trailing whitespace. To test, apply the patch and confirm that the layout of the page is unchanged. Test the various operations on the page: - Setting lost status - Setting damaged status - Setting withdrawn status - Setting local holds priority status - Adding a public or non-public note Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
689446fda0
commit
f0e721f441
1 changed files with 433 additions and 341 deletions
|
@ -49,8 +49,13 @@
|
|||
<div id="catalogue_detail_biblio">
|
||||
|
||||
<h2>[% title | html %]</h2>
|
||||
[% IF ( subtitle ) %]<h4>[% FOREACH subtitl IN subtitle %] [% subtitl | html %][% END %]</h4>[% END %]
|
||||
[% IF ( author ) %]<h4>by [% author | html %]</h4>[% END %]
|
||||
[% IF ( subtitle ) %]
|
||||
<h4>[% FOREACH subtitl IN subtitle %] [% subtitl | html %][% END %]</h4>
|
||||
[% END %]
|
||||
[% IF ( author ) %]
|
||||
<h4>by [% author | html %]</h4>
|
||||
[% END %]
|
||||
|
||||
<div class="listgroup">
|
||||
<div class="rows">
|
||||
<ol class="bibliodetails">
|
||||
|
@ -58,16 +63,32 @@
|
|||
[% UNLESS ( item_level_itypes ) %]
|
||||
<li><span class="label">Item type:</span> [% itemtypename | html %] </li>
|
||||
[% END %]
|
||||
[% IF ( rentalcharge ) %]<li><span class="label">Rental charge:</span>[% rentalcharge | $Price %] </li>[% END %]
|
||||
[% IF ( rentalcharge_daily ) %]<li><span class="label">Daily rental charge:</span>[% rentalcharge_daily | $Price %] </li>[% END %]
|
||||
[% IF ( rentalcharge_hourly ) %]<li><span class="label">Hourly rental charge:</span>[% rentalcharge_hourly | $Price %] </li>[% END %]
|
||||
[% IF ( rentalcharge ) %]
|
||||
<li><span class="label">Rental charge:</span>[% rentalcharge | $Price %] </li>
|
||||
[% END %]
|
||||
[% IF ( rentalcharge_daily ) %]
|
||||
<li><span class="label">Daily rental charge:</span>[% rentalcharge_daily | $Price %] </li>
|
||||
[% END %]
|
||||
[% IF ( rentalcharge_hourly ) %]
|
||||
<li><span class="label">Hourly rental charge:</span>[% rentalcharge_hourly | $Price %] </li>
|
||||
[% END %]
|
||||
<li><span class="label">ISBN:</span> [% isbn | html %] </li>
|
||||
<li><span class="label">Publication details:</span>[% place | html %] [% publishercode | html %] [% publicationyear | html %] </li>
|
||||
[% IF ( volumeddesc ) %]<li><span class="label">Volume:</span> [% volumeddesc | html %]</li>[% END %]
|
||||
[% IF ( volumeddesc ) %]
|
||||
<li><span class="label">Volume:</span> [% volumeddesc | html %]</li>
|
||||
[% END %]
|
||||
<li><span class="label">Physical details:</span> [% pages | html %] [% illus | html %] [% size | html %] </li>
|
||||
[% IF ( bnotes ) %]<li><span class="label">Notes:</span> [% bnotes | html %]</li>[% END %]
|
||||
<li><span class="label">No. of items:</span> [% count | html %] [% IF ( hiddencount ) %]total ([% showncount | html %] shown / [% hiddencount | html %] hidden)
|
||||
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblionumber | uri %]&showallitems=1">Show all items</a>[% END %]</li>
|
||||
[% IF ( bnotes ) %]
|
||||
<li><span class="label">Notes:</span> [% bnotes | html %]</li>
|
||||
[% END %]
|
||||
<li>
|
||||
<span class="label">No. of items:</span>
|
||||
[% count | html %]
|
||||
[% IF ( hiddencount ) %]
|
||||
total ([% showncount | html %] shown / [% hiddencount | html %] hidden)
|
||||
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblionumber | uri %]&showallitems=1">Show all items</a>
|
||||
[% END %]
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -97,27 +118,47 @@
|
|||
[% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
|
||||
[% END %]
|
||||
<div class="listgroup">
|
||||
<h3 id="item[% ITEM_DAT.itemnumber | html %]">Barcode [% ITEM_DAT.barcode | html %] [% IF not_for_loan %][% not_for_loan_description | html %] [% END %]</h3>
|
||||
<h3 id="item[% ITEM_DAT.itemnumber | html %]">
|
||||
Barcode [% ITEM_DAT.barcode | html %] [% IF not_for_loan %][% not_for_loan_description | html %] [% END %]
|
||||
</h3>
|
||||
|
||||
<h4>Item information [% UNLESS ( ITEM_DAT.nomod ) %]
|
||||
<h4>
|
||||
Item information
|
||||
[% UNLESS ( ITEM_DAT.nomod ) %]
|
||||
[% IF ( CAN_user_editcatalogue_edit_items ) %]
|
||||
<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% ITEM_DAT.biblionumber | uri %]&itemnumber=[% ITEM_DAT.itemnumber | uri %]"><i class="fa fa-pencil"></i> Edit item</a>
|
||||
[% END %]
|
||||
[% END %]</h4>
|
||||
[% END %]
|
||||
</h4>
|
||||
|
||||
<div class="rows">
|
||||
<ol class="bibliodetails">
|
||||
<li><span class="label">Home library:</span> [% Branches.GetName( ITEM_DAT.homebranch ) | html %] </li>
|
||||
[% IF ( item_level_itypes ) %]
|
||||
<li><span class="label">Item type:</span> [% ITEM_DAT.itype | html %] </li>
|
||||
[% END %]
|
||||
[% IF ( ITEM_DAT.ccode) %]<li><span class="label">Collection:</span> [% ITEM_DAT.ccode | html %]</li> [% END %]
|
||||
[% IF ( ITEM_DAT.ccode) %]
|
||||
<li><span class="label">Collection:</span> [% ITEM_DAT.ccode | html %]</li>
|
||||
[% END %]
|
||||
<li><span class="label">Item callnumber:</span> [% ITEM_DAT.itemcallnumber | html %] </li>
|
||||
[% IF ( ITEM_DAT.displaycopy ) %]<li><span class="label">Copy number:</span> [% ITEM_DAT.copyvol | html %] </li> [% END %]
|
||||
[% IF ( ITEM_DAT.replacementprice ) %]<li><span class="label">Replacement price:</span> [% ITEM_DAT.replacementprice | $Price %] </li> [% END %]
|
||||
[% IF ITEM_DAT.materials %]<li><span class="label">Materials specified:</span> [% ITEM_DAT.materials | html %] </li> [% END %]
|
||||
</ol></div></div>
|
||||
<div class="listgroup"><h4><span>Statuses</span> [% IF ( ITEM_DAT.status_advisory ) %](
|
||||
[% IF ( not_for_loan ) %]
|
||||
[% IF ( ITEM_DAT.displaycopy ) %]
|
||||
<li><span class="label">Copy number:</span> [% ITEM_DAT.copyvol | html %] </li>
|
||||
[% END %]
|
||||
[% IF ( ITEM_DAT.replacementprice ) %]
|
||||
<li><span class="label">Replacement price:</span> [% ITEM_DAT.replacementprice | $Price %] </li>
|
||||
[% END %]
|
||||
[% IF ITEM_DAT.materials %]
|
||||
<li><span class="label">Materials specified:</span> [% ITEM_DAT.materials | html %]</li>
|
||||
[% END %]
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="listgroup">
|
||||
<h4>
|
||||
<span>Statuses</span>
|
||||
[% IF ( ITEM_DAT.status_advisory ) %]
|
||||
([% IF ( not_for_loan ) %]
|
||||
[% IF not_for_loan_description %]
|
||||
[% not_for_loan_description | html %]
|
||||
[% ELSE %]
|
||||
|
@ -127,15 +168,18 @@
|
|||
[% IF ( ITEM_DAT.itemlost ) %]<span>Lost</span>[% END %]
|
||||
[% IF ( ITEM_DAT.damaged ) %]<span>Damaged</span>[% END %]
|
||||
[% IF ( ITEM_DAT.withdrawn ) %]<span>Withdrawn</span>[% END %]
|
||||
)[% END %]</h4>
|
||||
)
|
||||
[% END %]
|
||||
</h4>
|
||||
|
||||
<div class="rows">
|
||||
<ol class="bibliodetails">
|
||||
<li><span class="label">Current library:</span> [% Branches.GetName( ITEM_DAT.holdingbranch ) | html %] </li>
|
||||
<li><span class="label">Checkout status:</span>
|
||||
<li>
|
||||
<span class="label">Checkout status:</span>
|
||||
[% SET checkout = ITEM_DAT.object.checkout %]
|
||||
[% IF ( checkout ) %]<span>Checked out to
|
||||
[% INCLUDE 'patron-title.inc' patron => checkout.patron hide_patron_infos_if_needed=1 %]</span>
|
||||
[% IF ( checkout ) %]
|
||||
<span>Checked out to [% INCLUDE 'patron-title.inc' patron => checkout.patron hide_patron_infos_if_needed=1 %]</span>
|
||||
[% IF ( checkout.lastreneweddate ) %]
|
||||
<span>Last renewed [% checkout.lastreneweddate | $KohaDates %]</span>,
|
||||
[% END %]
|
||||
|
@ -145,15 +189,17 @@
|
|||
<span>Not checked out</span>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</li>
|
||||
<li><span class="label">Current renewals:</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="label">Current renewals:</span>
|
||||
[% ITEM_DAT.renewals | html %]
|
||||
[% IF ITEM_DAT.renewals %]
|
||||
[ <a class="checkout_renewals_view" data-renewals="[% ITEM_DAT.renewals | html | html %]" data-issueid="[% ITEM_DAT.object.checkout.id | html %]" href="#">View</a> ]
|
||||
[% END %]
|
||||
</li>
|
||||
[% IF itemlostloop %]
|
||||
<li><span class="label">Lost status:</span>
|
||||
<li>
|
||||
<span class="label">Lost status:</span>
|
||||
[% IF ( CAN_user_circulate ) %]
|
||||
[% SET ClaimReturnedLostValue = Koha.Preference('ClaimReturnedLostValue') %]
|
||||
<form action="updateitem.pl" method="post">
|
||||
|
@ -194,15 +240,16 @@
|
|||
[% itemlostloo.lib | html %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% END %]
|
||||
</li>
|
||||
[% IF ITEM_DAT.itemlost != "" && ITEM_DAT.itemlost_on %]
|
||||
<li><span class="label">Lost on:</span>[% ITEM_DAT.itemlost_on | $KohaDates %] </li>
|
||||
<li><span class="label">Lost on:</span>[% ITEM_DAT.itemlost_on | $KohaDates %]</li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% IF itemdamagedloop %]
|
||||
<li><span class="label">Damaged status:</span>
|
||||
<li>
|
||||
<span class="label">Damaged status:</span>
|
||||
[% IF ( CAN_user_circulate ) %]
|
||||
<form action="updateitem.pl" method="post">
|
||||
<input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber | html %]" />
|
||||
|
@ -219,23 +266,24 @@
|
|||
[% END %]
|
||||
</select>
|
||||
<input type="hidden" name="op" value="set_damaged" />
|
||||
<input type="submit" name="submit" class="btn btn-primary btn-xs" value="Set status" /></form>
|
||||
<input type="submit" name="submit" class="btn btn-primary btn-xs" value="Set status" />
|
||||
</form>
|
||||
[% ELSE %]
|
||||
[% FOREACH itemdamagedloo IN itemdamagedloop %]
|
||||
[% IF ( itemdamagedloo.selected ) %]
|
||||
[% itemdamagedloo.lib | html %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% END %]
|
||||
</li>
|
||||
[% IF ITEM_DAT.damaged != "" && ITEM_DAT.damaged_on %]
|
||||
<li><span class="label">Damaged on:</span>[% ITEM_DAT.damaged_on | $KohaDates %] </li>
|
||||
<li><span class="label">Damaged on:</span>[% ITEM_DAT.damaged_on | $KohaDates %]</li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% IF itemwithdrawnloop %]
|
||||
<li><span class="label">Withdrawn status:</span>
|
||||
<li>
|
||||
<span class="label">Withdrawn status:</span>
|
||||
[% IF ( CAN_user_circulate ) %]
|
||||
<form action="updateitem.pl" method="post">
|
||||
<input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber | html %]" />
|
||||
|
@ -252,24 +300,26 @@
|
|||
[% END %]
|
||||
</select>
|
||||
<input type="hidden" name="op" value="set_withdrawn" />
|
||||
<input type="submit" name="submit" class="btn btn-primary btn-xs" value="Set status" /></form>
|
||||
<input type="submit" name="submit" class="btn btn-primary btn-xs" value="Set status" />
|
||||
</form>
|
||||
[% ELSE %]
|
||||
[% FOREACH itemwithdrawn IN itemwithdrawnloop %]
|
||||
[% IF itemwithdrawn.authorised_value == ITEM_DAT.withdrawn %]
|
||||
[% itemwithdrawn.lib | html %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% END %]
|
||||
</li>
|
||||
[% IF ITEM_DAT.withdrawn != "" && ITEM_DAT.withdrawn_on %]
|
||||
<li><span class="label">Withdrawn on:</span>[% ITEM_DAT.withdrawn_on | $KohaDates %] </li>
|
||||
<li><span class="label">Withdrawn on:</span>[% ITEM_DAT.withdrawn_on | $KohaDates %]</li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ol></div></div>
|
||||
|
||||
<div class="listgroup"><h4>Priority</h4>
|
||||
<div class="listgroup">
|
||||
<h4>Priority</h4>
|
||||
<div class="rows">
|
||||
<ol class="bibliodetails">
|
||||
<li>
|
||||
|
@ -288,31 +338,36 @@
|
|||
[% END %]
|
||||
</select>
|
||||
<input type="hidden" name="op" value="set_exclude_priority" />
|
||||
<input type="submit" name="submit" class="btn btn-primary btn-xs" value="Update" /></form>
|
||||
<input type="submit" name="submit" class="btn btn-primary btn-xs" value="Update" />
|
||||
</form>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="listgroup"><h4>History</h4>
|
||||
<div class="listgroup">
|
||||
<h4>History</h4>
|
||||
<div class="rows">
|
||||
<ol class="bibliodetails">
|
||||
|
||||
[% IF ITEM_DAT.basketno %]
|
||||
<li><span class="label">Order date:</span>
|
||||
<li>
|
||||
<span class="label">Order date:</span>
|
||||
[% IF ( CAN_user_acquisition_order_manage ) %]
|
||||
<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% ITEM_DAT.basketno | uri %]">[% ITEM_DAT.orderdate | $KohaDates %]</a>
|
||||
[% ELSE %]
|
||||
[% ITEM_DAT.orderdate | $KohaDates %]
|
||||
[% END %]
|
||||
</li>
|
||||
<li><span class="label">Vendor:</span>
|
||||
<li>
|
||||
<span class="label">Vendor:</span>
|
||||
[% ITEM_DAT.vendor | html %]
|
||||
</li>
|
||||
[% END %]
|
||||
|
||||
[% IF ITEM_DAT.dateaccessioned %]
|
||||
<li><span class="label">Accession date:</span>
|
||||
<li>
|
||||
<span class="label">Accession date:</span>
|
||||
[% IF ( CAN_user_acquisition_order_receive && ITEM_DAT.invoiceid ) %]
|
||||
<a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% ITEM_DAT.invoiceid | uri %]">[% ITEM_DAT.dateaccessioned | $KohaDates %]</a>
|
||||
[% ELSE %]
|
||||
|
@ -320,30 +375,71 @@
|
|||
[% END %]
|
||||
</li>
|
||||
[% END %]
|
||||
|
||||
[% IF ( ITEM_DAT.invoicenumber ) %]
|
||||
<li><span class="label">Invoice number:</span>
|
||||
<li>
|
||||
<span class="label">Invoice number:</span>
|
||||
[% ITEM_DAT.invoicenumber | html %]
|
||||
</li>
|
||||
[% END %]
|
||||
|
||||
<li><span class="label">Total checkouts:</span>
|
||||
<li>
|
||||
<span class="label">Total checkouts:</span>
|
||||
[% IF ( ITEM_DAT.issues ) %]
|
||||
[% ITEM_DAT.issues | html %]
|
||||
[% ELSE %]
|
||||
0
|
||||
[% END %] (<a href="/cgi-bin/koha/circ/bookcount.pl?&biblionumber=[% ITEM_DAT.biblionumber | uri %]&itm=[% ITEM_DAT.itemnumber | uri %]">View item's checkout history</a>)</li>
|
||||
|
||||
<li><span class="label">Last seen:</span>[% IF ( ITEM_DAT.datelastseen ) %][% ITEM_DAT.datelastseen | $KohaDates %] [%END %] </li>
|
||||
<li><span class="label">Last borrowed:</span>[% IF (ITEM_DAT.datelastborrowed ) %][% ITEM_DAT.datelastborrowed | $KohaDates %][% END %] </li>
|
||||
[% IF Koha.Preference('StoreLastBorrower') && ITEM_DAT.object.last_returned_by %]
|
||||
<li><span class="label">Last returned by:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.object.last_returned_by.borrowernumber | uri %]">[% ITEM_DAT.object.last_returned_by.cardnumber | html %]</a> </li>
|
||||
[% END %]
|
||||
[% IF ( ITEM_DAT.card0 ) %]<li><span class="label">Last borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower0 | uri %]">[% ITEM_DAT.card0 | html %]</a> </li>[% END %]
|
||||
[% IF ( ITEM_DAT.card1 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower1 | uri %]">[% ITEM_DAT.card1 | html %]</a> </li>[% END %]
|
||||
[% IF ( ITEM_DAT.card2 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower2 | uri %]">[% ITEM_DAT.card2 | html %]</a> </li>[% END %]
|
||||
[% IF ( ITEM_DAT.paidfor ) %]<li><span class="label">Paid for?:</span> [% INCLUDE 'patron-title.inc' patron=ITEM_DAT.paidfor.patron hide_patron_infos_if_needed=1 %] on [% ITEM_DAT.paidfor.created_on | $KohaDates %]</li>[% END %]
|
||||
(<a href="/cgi-bin/koha/circ/bookcount.pl?&biblionumber=[% ITEM_DAT.biblionumber | uri %]&itm=[% ITEM_DAT.itemnumber | uri %]">View item's checkout history</a>)
|
||||
</li>
|
||||
|
||||
[% IF ( ITEM_DAT.enumchron ) %]<li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron | html %] </li>[% END %]
|
||||
<li>
|
||||
<span class="label">Last seen:</span>
|
||||
[% IF ( ITEM_DAT.datelastseen ) %]
|
||||
[% ITEM_DAT.datelastseen | $KohaDates %]
|
||||
[%END %]
|
||||
</li>
|
||||
<li>
|
||||
<span class="label">Last borrowed:</span>
|
||||
[% IF (ITEM_DAT.datelastborrowed ) %][% ITEM_DAT.datelastborrowed | $KohaDates %][% END %]
|
||||
</li>
|
||||
[% IF Koha.Preference('StoreLastBorrower') && ITEM_DAT.object.last_returned_by %]
|
||||
<li>
|
||||
<span class="label">Last returned by:</span>
|
||||
<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.object.last_returned_by.borrowernumber | uri %]">[% ITEM_DAT.object.last_returned_by.cardnumber | html %]</a>
|
||||
</li>
|
||||
[% END %]
|
||||
[% IF ( ITEM_DAT.card0 ) %]
|
||||
<li>
|
||||
<span class="label">Last borrower:</span>
|
||||
<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower0 | uri %]">[% ITEM_DAT.card0 | html %]</a>
|
||||
</li>
|
||||
[% END %]
|
||||
[% IF ( ITEM_DAT.card1 ) %]
|
||||
<li>
|
||||
<span class="label">Previous borrower:</span>
|
||||
<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower1 | uri %]">[% ITEM_DAT.card1 | html %]</a>
|
||||
</li>
|
||||
[% END %]
|
||||
[% IF ( ITEM_DAT.card2 ) %]
|
||||
<li>
|
||||
<span class="label">Previous borrower:</span>
|
||||
<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower2 | uri %]">[% ITEM_DAT.card2 | html %]</a>
|
||||
</li>
|
||||
[% END %]
|
||||
[% IF ( ITEM_DAT.paidfor ) %]
|
||||
<li>
|
||||
<span class="label">Paid for?:</span>
|
||||
[% INCLUDE 'patron-title.inc' patron=ITEM_DAT.paidfor.patron hide_patron_infos_if_needed=1 %] on [% ITEM_DAT.paidfor.created_on | $KohaDates %]
|
||||
</li>
|
||||
[% END %]
|
||||
|
||||
[% IF ( ITEM_DAT.enumchron ) %]
|
||||
<li>
|
||||
<span class="label">Serial enumeration:</span>
|
||||
[% ITEM_DAT.enumchron | html %]
|
||||
</li>
|
||||
[% END %]
|
||||
|
||||
<li>
|
||||
<span class="label">Public note:</span>
|
||||
|
@ -355,7 +451,6 @@
|
|||
</form>
|
||||
[% ELSE %]
|
||||
[% ITEM_DAT.itemnotes | html %]
|
||||
|
||||
[% END %]
|
||||
</li>
|
||||
|
||||
|
@ -369,16 +464,13 @@
|
|||
</form>
|
||||
[% ELSE %]
|
||||
[% ITEM_DAT.itemnotes_nonpublic | html %]
|
||||
|
||||
[% END %]
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div> <!-- /.col-sm-10.col-sm-push-2 -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue