From f0e721f441168d674e9872e280153aaace19c08e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 14 Nov 2022 16:12:04 +0000 Subject: [PATCH] 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 --- .../prog/en/modules/catalogue/moredetail.tt | 774 ++++++++++-------- 1 file changed, 433 insertions(+), 341 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index 01dfde5d84..053d8b9401 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -17,24 +17,24 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - + [% END %]
@@ -42,343 +42,435 @@
-

Item details for [% INCLUDE 'biblio-title-head.inc' %]

+

Item details for [% INCLUDE 'biblio-title-head.inc' %]

-[% INCLUDE 'cat-toolbar.inc' %] + [% INCLUDE 'cat-toolbar.inc' %] -
+
-

[% title | html %]

- [% IF ( subtitle ) %]

[% FOREACH subtitl IN subtitle %] [% subtitl | html %][% END %]

[% END %] - [% IF ( author ) %]

by [% author | html %]

[% END %] -
-
-
    -
  1. Biblionumber: [% biblionumber | html %] 
  2. - [% UNLESS ( item_level_itypes ) %] -
  3. Item type: [% itemtypename | html %] 
  4. - [% END %] - [% IF ( rentalcharge ) %]
  5. Rental charge:[% rentalcharge | $Price %] 
  6. [% END %] - [% IF ( rentalcharge_daily ) %]
  7. Daily rental charge:[% rentalcharge_daily | $Price %] 
  8. [% END %] - [% IF ( rentalcharge_hourly ) %]
  9. Hourly rental charge:[% rentalcharge_hourly | $Price %] 
  10. [% END %] -
  11. ISBN: [% isbn | html %] 
  12. -
  13. Publication details:[% place | html %] [% publishercode | html %] [% publicationyear | html %] 
  14. - [% IF ( volumeddesc ) %]
  15. Volume: [% volumeddesc | html %]
  16. [% END %] -
  17. Physical details: [% pages | html %] [% illus | html %] [% size | html %] 
  18. - [% IF ( bnotes ) %]
  19. Notes: [% bnotes | html %]
  20. [% END %] -
  21. No. of items: [% count | html %] [% IF ( hiddencount ) %]total ([% showncount | html %] shown / [% hiddencount | html %] hidden) -Show all items[% END %]
  22. -
-
-
- - [% IF ONLY_ONE || updated_exclude_from_local_holds_priority.defined %] -
- [% END %] - - [% IF ( ONLY_ONE ) %] -
You are only viewing one item. View all
- [% END %] - - [% IF updated_exclude_from_local_holds_priority.defined %] -
- [% IF updated_exclude_from_local_holds_priority %] - Exclude from local holds priority updated to 'Yes' - [% ELSE %] - Exclude from local holds priority updated to 'No' - [% END %] -
- [% END %] - - [% FOREACH ITEM_DAT IN ITEM_DATA %] - [% SET not_for_loan = 0 %] - [% IF ITEM_DAT.notforloan || ITEM_DAT.effective_itemtype.notforloan %] - [% SET not_for_loan = 1 %] - [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] - [% END %] -
-

Barcode [% ITEM_DAT.barcode | html %] [% IF not_for_loan %][% not_for_loan_description | html %] [% END %]

- -

Item information [% UNLESS ( ITEM_DAT.nomod ) %] - [% IF ( CAN_user_editcatalogue_edit_items ) %] - Edit item - [% END %] - [% END %]

-
-
    -
  1. Home library: [% Branches.GetName( ITEM_DAT.homebranch ) | html %] 
  2. - [% IF ( item_level_itypes ) %] -
  3. Item type: [% ITEM_DAT.itype | html %] 
  4. - [% END %] - [% IF ( ITEM_DAT.ccode) %]
  5. Collection: [% ITEM_DAT.ccode | html %]
  6. [% END %] -
  7. Item callnumber: [% ITEM_DAT.itemcallnumber | html %] 
  8. - [% IF ( ITEM_DAT.displaycopy ) %]
  9. Copy number: [% ITEM_DAT.copyvol | html %] 
  10. [% END %] - [% IF ( ITEM_DAT.replacementprice ) %]
  11. Replacement price: [% ITEM_DAT.replacementprice | $Price %] 
  12. [% END %] - [% IF ITEM_DAT.materials %]
  13. Materials specified: [% ITEM_DAT.materials | html %]
  14. [% END %] -
-

Statuses [% IF ( ITEM_DAT.status_advisory ) %]( - [% IF ( not_for_loan ) %] - [% IF not_for_loan_description %] - [% not_for_loan_description | html %] - [% ELSE %] - Not for loan +

[% title | html %]

+ [% IF ( subtitle ) %] +

[% FOREACH subtitl IN subtitle %] [% subtitl | html %][% END %]

+ [% END %] + [% IF ( author ) %] +

by [% author | html %]

[% END %] - [% END %] - [% IF ( ITEM_DAT.itemlost ) %]Lost[% END %] - [% IF ( ITEM_DAT.damaged ) %]Damaged[% END %] - [% IF ( ITEM_DAT.withdrawn ) %]Withdrawn[% END %] - )[% END %] -
-
    -
  1. Current library: [% Branches.GetName( ITEM_DAT.holdingbranch ) | html %] 
  2. -
  3. Checkout status: - [% SET checkout = ITEM_DAT.object.checkout %] - [% IF ( checkout ) %]Checked out to - [% INCLUDE 'patron-title.inc' patron => checkout.patron hide_patron_infos_if_needed=1 %] - [% IF ( checkout.lastreneweddate ) %] - Last renewed [% checkout.lastreneweddate | $KohaDates %], - [% END %] - [% IF ( checkout.date_due ) %] - Due back on [% checkout.date_due | $KohaDates %] - [% ELSE %] - Not checked out - [% END %] - [% END %] -  
  4. -
  5. Current renewals: - [% ITEM_DAT.renewals | html %] - [% IF ITEM_DAT.renewals %] - [ View ] - [% END %] -
  6. - [% IF itemlostloop %] -
  7. Lost status: - [% IF ( CAN_user_circulate ) %] - [% SET ClaimReturnedLostValue = Koha.Preference('ClaimReturnedLostValue') %] -
    - - - +
    +
    +
      +
    1. Biblionumber: [% biblionumber | html %] 
    2. + [% UNLESS ( item_level_itypes ) %] +
    3. Item type: [% itemtypename | html %] 
    4. + [% END %] + [% IF ( rentalcharge ) %] +
    5. Rental charge:[% rentalcharge | $Price %] 
    6. + [% END %] + [% IF ( rentalcharge_daily ) %] +
    7. Daily rental charge:[% rentalcharge_daily | $Price %] 
    8. + [% END %] + [% IF ( rentalcharge_hourly ) %] +
    9. Hourly rental charge:[% rentalcharge_hourly | $Price %] 
    10. + [% END %] +
    11. ISBN: [% isbn | html %] 
    12. +
    13. Publication details:[% place | html %] [% publishercode | html %] [% publicationyear | html %] 
    14. + [% IF ( volumeddesc ) %] +
    15. Volume: [% volumeddesc | html %]
    16. + [% END %] +
    17. Physical details: [% pages | html %] [% illus | html %] [% size | html %] 
    18. + [% IF ( bnotes ) %] +
    19. Notes: [% bnotes | html %]
    20. + [% END %] +
    21. + No. of items: + [% count | html %] + [% IF ( hiddencount ) %] + total ([% showncount | html %] shown / [% hiddencount | html %] hidden) + Show all items + [% END %] +
    22. +
    +
    +
    - [% IF ClaimReturnedLostValue && ITEM_DAT.itemlost == ClaimReturnedLostValue %] - + [% IF ONLY_ONE || updated_exclude_from_local_holds_priority.defined %] +
    + [% END %] + + [% IF ( ONLY_ONE ) %] +
    You are only viewing one item. View all
    + [% END %] + + [% IF updated_exclude_from_local_holds_priority.defined %] +
    + [% IF updated_exclude_from_local_holds_priority %] + Exclude from local holds priority updated to 'Yes' + [% ELSE %] + Exclude from local holds priority updated to 'No' + [% END %] +
    + [% END %] + + [% FOREACH ITEM_DAT IN ITEM_DATA %] + [% SET not_for_loan = 0 %] + [% IF ITEM_DAT.notforloan || ITEM_DAT.effective_itemtype.notforloan %] + [% SET not_for_loan = 1 %] + [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] [% END %] - - [% FOREACH itemlostloo IN itemlostloop %] - [% IF ClaimReturnedLostValue && !ITEM_DAT.itemlost && itemlostloo.authorised_value == ClaimReturnedLostValue #Filter claims returned status from pulldown %] - - [% ELSIF itemlostloo.authorised_value == ITEM_DAT.itemlost %] - - [% ELSE %] - +
    +

    + Barcode [% ITEM_DAT.barcode | html %] [% IF not_for_loan %][% not_for_loan_description | html %] [% END %] +

    + +

    + Item information + [% UNLESS ( ITEM_DAT.nomod ) %] + [% IF ( CAN_user_editcatalogue_edit_items ) %] + Edit item [% END %] [% END %] - - - +

    - [% IF ClaimReturnedLostValue && ITEM_DAT.itemlost == ClaimReturnedLostValue %] - -

    Item has been claimed as returned.

    - [% ELSE %] - - - [% END %] - - [% ELSE %] - [% FOREACH itemlostloo IN itemlostloop %] - [% IF ( itemlostloo.selected ) %] - [% itemlostloo.lib | html %] - [% END %] - [% END %] -   - [% END %] -
  8. - [% IF ITEM_DAT.itemlost != "" && ITEM_DAT.itemlost_on %] -
  9. Lost on:[% ITEM_DAT.itemlost_on | $KohaDates %]  
  10. - [% END %] - [% END %] - [% IF itemdamagedloop %] -
  11. Damaged status: - [% IF ( CAN_user_circulate ) %] -
    - - - - - -
    - [% ELSE %] - [% FOREACH itemdamagedloo IN itemdamagedloop %] - [% IF ( itemdamagedloo.selected ) %] - [% itemdamagedloo.lib | html %] - [% END %] - [% END %] -   - [% END %] -
  12. - [% IF ITEM_DAT.damaged != "" && ITEM_DAT.damaged_on %] -
  13. Damaged on:[% ITEM_DAT.damaged_on | $KohaDates %]  
  14. - [% END %] - [% END %] - - [% IF itemwithdrawnloop %] -
  15. Withdrawn status: - [% IF ( CAN_user_circulate ) %] -
    - - - - - -
    - [% ELSE %] - [% FOREACH itemwithdrawn IN itemwithdrawnloop %] - [% IF itemwithdrawn.authorised_value == ITEM_DAT.withdrawn %] - [% itemwithdrawn.lib | html %] - [% END %] - [% END %] -   + + +
    +
      +
    1. Current library: [% Branches.GetName( ITEM_DAT.holdingbranch ) | html %] 
    2. +
    3. + Checkout status: + [% SET checkout = ITEM_DAT.object.checkout %] + [% IF ( checkout ) %] + Checked out to [% INCLUDE 'patron-title.inc' patron => checkout.patron hide_patron_infos_if_needed=1 %] + [% IF ( checkout.lastreneweddate ) %] + Last renewed [% checkout.lastreneweddate | $KohaDates %], + [% END %] + [% IF ( checkout.date_due ) %] + Due back on [% checkout.date_due | $KohaDates %] + [% ELSE %] + Not checked out + [% END %] + [% END %] +
    4. +
    5. + Current renewals: + [% ITEM_DAT.renewals | html %] + [% IF ITEM_DAT.renewals %] + [ View ] + [% END %] +
    6. + [% IF itemlostloop %] +
    7. + Lost status: + [% IF ( CAN_user_circulate ) %] + [% SET ClaimReturnedLostValue = Koha.Preference('ClaimReturnedLostValue') %] +
      + + + + + [% IF ClaimReturnedLostValue && ITEM_DAT.itemlost == ClaimReturnedLostValue %] + + [% END %] + + [% FOREACH itemlostloo IN itemlostloop %] + [% IF ClaimReturnedLostValue && !ITEM_DAT.itemlost && itemlostloo.authorised_value == ClaimReturnedLostValue #Filter claims returned status from pulldown %] + + [% ELSIF itemlostloo.authorised_value == ITEM_DAT.itemlost %] + + [% ELSE %] + + [% END %] + [% END %] + + + + + [% IF ClaimReturnedLostValue && ITEM_DAT.itemlost == ClaimReturnedLostValue %] + +

      Item has been claimed as returned.

      + [% ELSE %] + + + [% END %] +
      + [% ELSE %] + [% FOREACH itemlostloo IN itemlostloop %] + [% IF ( itemlostloo.selected ) %] + [% itemlostloo.lib | html %] + [% END %] + [% END %] + [% END %] +
    8. + [% IF ITEM_DAT.itemlost != "" && ITEM_DAT.itemlost_on %] +
    9. Lost on:[% ITEM_DAT.itemlost_on | $KohaDates %]
    10. + [% END %] + [% END %] + + [% IF itemdamagedloop %] +
    11. + Damaged status: + [% IF ( CAN_user_circulate ) %] +
      + + + + + + +
      + [% ELSE %] + [% FOREACH itemdamagedloo IN itemdamagedloop %] + [% IF ( itemdamagedloo.selected ) %] + [% itemdamagedloo.lib | html %] + [% END %] + [% END %] + [% END %] +
    12. + [% IF ITEM_DAT.damaged != "" && ITEM_DAT.damaged_on %] +
    13. Damaged on:[% ITEM_DAT.damaged_on | $KohaDates %]
    14. + [% END %] + [% END %] + + [% IF itemwithdrawnloop %] +
    15. + Withdrawn status: + [% IF ( CAN_user_circulate ) %] +
      + + + + + + +
      + [% ELSE %] + [% FOREACH itemwithdrawn IN itemwithdrawnloop %] + [% IF itemwithdrawn.authorised_value == ITEM_DAT.withdrawn %] + [% itemwithdrawn.lib | html %] + [% END %] + [% END %] + [% END %] +
    16. + [% IF ITEM_DAT.withdrawn != "" && ITEM_DAT.withdrawn_on %] +
    17. Withdrawn on:[% ITEM_DAT.withdrawn_on | $KohaDates %]
    18. + [% END %] + [% END %] +
    +
    +
+ +
+

Priority

+
+
    +
  1. + Exclude from local holds priority: +
    + + + + + + +
    +
  2. +
+
+
+ +
+

History

+
+
    + + [% IF ITEM_DAT.basketno %] +
  1. + Order date: + [% IF ( CAN_user_acquisition_order_manage ) %] + [% ITEM_DAT.orderdate | $KohaDates %] + [% ELSE %] + [% ITEM_DAT.orderdate | $KohaDates %] + [% END %] +
  2. +
  3. + Vendor: + [% ITEM_DAT.vendor | html %] +
  4. + [% END %] + + [% IF ITEM_DAT.dateaccessioned %] +
  5. + Accession date: + [% IF ( CAN_user_acquisition_order_receive && ITEM_DAT.invoiceid ) %] + [% ITEM_DAT.dateaccessioned | $KohaDates %] + [% ELSE %] + [% ITEM_DAT.dateaccessioned | $KohaDates %] + [% END %] +
  6. + [% END %] + + [% IF ( ITEM_DAT.invoicenumber ) %] +
  7. + Invoice number: + [% ITEM_DAT.invoicenumber | html %] +
  8. + [% END %] + +
  9. + Total checkouts: + [% IF ( ITEM_DAT.issues ) %] + [% ITEM_DAT.issues | html %] + [% ELSE %] + 0 + [% END %] + (View item's checkout history) +
  10. + +
  11. + Last seen: + [% IF ( ITEM_DAT.datelastseen ) %] + [% ITEM_DAT.datelastseen | $KohaDates %] + [%END %] +
  12. +
  13. + Last borrowed: + [% IF (ITEM_DAT.datelastborrowed ) %][% ITEM_DAT.datelastborrowed | $KohaDates %][% END %] +
  14. + [% IF Koha.Preference('StoreLastBorrower') && ITEM_DAT.object.last_returned_by %] +
  15. + Last returned by: + [% ITEM_DAT.object.last_returned_by.cardnumber | html %] +
  16. + [% END %] + [% IF ( ITEM_DAT.card0 ) %] +
  17. + Last borrower: + [% ITEM_DAT.card0 | html %]  +
  18. + [% END %] + [% IF ( ITEM_DAT.card1 ) %] +
  19. + Previous borrower: + [% ITEM_DAT.card1 | html %]  +
  20. + [% END %] + [% IF ( ITEM_DAT.card2 ) %] +
  21. + Previous borrower: + [% ITEM_DAT.card2 | html %]  +
  22. + [% END %] + [% IF ( ITEM_DAT.paidfor ) %] +
  23. + Paid for?: + [% INCLUDE 'patron-title.inc' patron=ITEM_DAT.paidfor.patron hide_patron_infos_if_needed=1 %] on [% ITEM_DAT.paidfor.created_on | $KohaDates %] +
  24. + [% END %] + + [% IF ( ITEM_DAT.enumchron ) %] +
  25. + Serial enumeration: + [% ITEM_DAT.enumchron | html %]  +
  26. + [% END %] + +
  27. + Public note: + [% IF ( CAN_user_editcatalogue_edit_items ) %] +
    + + + +
    + [% ELSE %] + [% ITEM_DAT.itemnotes | html %] + [% END %] +
  28. + +
  29. + Non-public note: + [% IF ( CAN_user_editcatalogue_edit_items ) %] +
    + + + +
    + [% ELSE %] + [% ITEM_DAT.itemnotes_nonpublic | html %] + [% END %] +
  30. +
+
+
[% END %] - - [% IF ITEM_DAT.withdrawn != "" && ITEM_DAT.withdrawn_on %] -
  • Withdrawn on:[% ITEM_DAT.withdrawn_on | $KohaDates %]  
  • - [% END %] - [% END %] - -
    - -

    Priority

    -
    -
      -
    1. - Exclude from local holds priority: -
      - - - - - -
      -
    2. -
    -
    - -

    History

    -
    -
      - - [% IF ITEM_DAT.basketno %] -
    1. Order date: - [% IF ( CAN_user_acquisition_order_manage ) %] - [% ITEM_DAT.orderdate | $KohaDates %] - [% ELSE %] - [% ITEM_DAT.orderdate | $KohaDates %] - [% END %] -
    2. -
    3. Vendor: - [% ITEM_DAT.vendor | html %] -
    4. - [% END %] - - [% IF ITEM_DAT.dateaccessioned %] -
    5. Accession date: - [% IF ( CAN_user_acquisition_order_receive && ITEM_DAT.invoiceid ) %] - [% ITEM_DAT.dateaccessioned | $KohaDates %] - [% ELSE %] - [% ITEM_DAT.dateaccessioned | $KohaDates %] - [% END %] -
    6. - [% END %] - [% IF ( ITEM_DAT.invoicenumber ) %] -
    7. Invoice number: - [% ITEM_DAT.invoicenumber | html %] -
    8. - [% END %] - -
    9. Total checkouts: - [% IF ( ITEM_DAT.issues ) %] - [% ITEM_DAT.issues | html %] - [% ELSE %] - 0 - [% END %] (View item's checkout history)
    10. - -
    11. Last seen:[% IF ( ITEM_DAT.datelastseen ) %][% ITEM_DAT.datelastseen | $KohaDates %] [%END %] 
    12. -
    13. Last borrowed:[% IF (ITEM_DAT.datelastborrowed ) %][% ITEM_DAT.datelastborrowed | $KohaDates %][% END %] 
    14. - [% IF Koha.Preference('StoreLastBorrower') && ITEM_DAT.object.last_returned_by %] -
    15. Last returned by: [% ITEM_DAT.object.last_returned_by.cardnumber | html %] 
    16. - [% END %] - [% IF ( ITEM_DAT.card0 ) %]
    17. Last borrower: [% ITEM_DAT.card0 | html %] 
    18. [% END %] - [% IF ( ITEM_DAT.card1 ) %]
    19. Previous borrower: [% ITEM_DAT.card1 | html %] 
    20. [% END %] - [% IF ( ITEM_DAT.card2 ) %]
    21. Previous borrower: [% ITEM_DAT.card2 | html %] 
    22. [% END %] - [% IF ( ITEM_DAT.paidfor ) %]
    23. Paid for?: [% INCLUDE 'patron-title.inc' patron=ITEM_DAT.paidfor.patron hide_patron_infos_if_needed=1 %] on [% ITEM_DAT.paidfor.created_on | $KohaDates %]
    24. [% END %] - - [% IF ( ITEM_DAT.enumchron ) %]
    25. Serial enumeration: [% ITEM_DAT.enumchron | html %] 
    26. [% END %] - -
    27. - Public note: - [% IF ( CAN_user_editcatalogue_edit_items ) %] -
      - - - -
      - [% ELSE %] - [% ITEM_DAT.itemnotes | html %] -   - [% END %] -
    28. - -
    29. - Non-public note: - [% IF ( CAN_user_editcatalogue_edit_items ) %] -
      - - - -
      - [% ELSE %] - [% ITEM_DAT.itemnotes_nonpublic | html %] -   - [% END %] -
    30. -
    -
    -
    -[% END %] - -
    -