From 33e6c6da18965bed1d0ac9d79eff48729f2c750b 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 --- .../prog/en/modules/catalogue/moredetail.tt | 746 ++++++++++-------- 1 file changed, 419 insertions(+), 327 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 %] +

[% title | html %]

+ [% IF ( subtitle ) %] +

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

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

by [% author | html %]

+ [% 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 %] +
+
+
    +
  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. +
+
+
- [% 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 %]

+ [% IF ONLY_ONE || updated_exclude_from_local_holds_priority.defined %] +
+ [% 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 + [% IF ( ONLY_ONE ) %] +
You are only viewing one item. View all
[% 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') %] -
    - - - + [% 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 %] - [% IF ClaimReturnedLostValue && ITEM_DAT.itemlost == ClaimReturnedLostValue %] - + [% 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 %] +
    +
      +
    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 %] +
    +
    +
- [% IF itemwithdrawnloop %] -
  • Withdrawn status: - [% IF ( CAN_user_circulate ) %] -
    - - - - - -
    - [% ELSE %] - [% FOREACH itemwithdrawn IN itemwithdrawnloop %] - [% IF itemwithdrawn.authorised_value == ITEM_DAT.withdrawn %] - [% itemwithdrawn.lib | html %] - [% END %] - [% END %] -   - [% END %] -
  • - [% IF ITEM_DAT.withdrawn != "" && ITEM_DAT.withdrawn_on %] -
  • Withdrawn on:[% ITEM_DAT.withdrawn_on | $KohaDates %]  
  • - [% 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') %] +
      + + + -

      Priority

      -
      -
        -
      1. - Exclude from local holds priority: - - - - - - -
      2. - -
      -
      -
      + [% 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 %] + + + -

      History

      -
      -
        + [% 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 %] + + [% IF ITEM_DAT.itemlost != "" && ITEM_DAT.itemlost_on %] +
      1. Lost on:[% ITEM_DAT.itemlost_on | $KohaDates %]
      2. + [% END %] + [% END %] - [% IF ITEM_DAT.basketno %] -
      3. Order date: - [% IF ( CAN_user_acquisition_order_manage ) %] - [% ITEM_DAT.orderdate | $KohaDates %] - [% ELSE %] - [% ITEM_DAT.orderdate | $KohaDates %] - [% END %] -
      4. -
      5. Vendor: - [% ITEM_DAT.vendor | html %] -
      6. - [% END %] + [% IF itemdamagedloop %] +
      7. + Damaged status: + [% IF ( CAN_user_circulate ) %] +
        + + + + + + +
        + [% ELSE %] + [% FOREACH itemdamagedloo IN itemdamagedloop %] + [% IF ( itemdamagedloo.selected ) %] + [% itemdamagedloo.lib | html %] + [% END %] + [% END %] + [% END %] +
      8. + [% IF ITEM_DAT.damaged != "" && ITEM_DAT.damaged_on %] +
      9. Damaged on:[% ITEM_DAT.damaged_on | $KohaDates %]
      10. + [% END %] + [% END %] - [% IF ITEM_DAT.dateaccessioned %] -
      11. Accession date: - [% IF ( CAN_user_acquisition_order_receive && ITEM_DAT.invoiceid ) %] - [% ITEM_DAT.dateaccessioned | $KohaDates %] - [% ELSE %] - [% ITEM_DAT.dateaccessioned | $KohaDates %] - [% END %] -
      12. - [% END %] - [% IF ( ITEM_DAT.invoicenumber ) %] -
      13. Invoice number: - [% ITEM_DAT.invoicenumber | html %] -
      14. - [% 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 %] +
      +
      +
      -
    8. Total checkouts: - [% IF ( ITEM_DAT.issues ) %] - [% ITEM_DAT.issues | html %] - [% ELSE %] - 0 - [% END %] (View item's checkout history)
    9. +
      +

      Priority

      +
      +
        +
      1. + Exclude from local holds priority: +
        + + + + + + +
        +
      2. +
      +
      +
      -
    10. Last seen:[% IF ( ITEM_DAT.datelastseen ) %][% ITEM_DAT.datelastseen | $KohaDates %] [%END %] 
    11. -
    12. Last borrowed:[% IF (ITEM_DAT.datelastborrowed ) %][% ITEM_DAT.datelastborrowed | $KohaDates %][% END %] 
    13. - [% IF Koha.Preference('StoreLastBorrower') && ITEM_DAT.object.last_returned_by %] -
    14. Last returned by: [% ITEM_DAT.object.last_returned_by.cardnumber | html %] 
    15. - [% END %] - [% IF ( ITEM_DAT.card0 ) %]
    16. Last borrower: [% ITEM_DAT.card0 | html %] 
    17. [% END %] - [% IF ( ITEM_DAT.card1 ) %]
    18. Previous borrower: [% ITEM_DAT.card1 | html %] 
    19. [% END %] - [% IF ( ITEM_DAT.card2 ) %]
    20. Previous borrower: [% ITEM_DAT.card2 | html %] 
    21. [% END %] - [% IF ( ITEM_DAT.paidfor ) %]
    22. Paid for?: [% INCLUDE 'patron-title.inc' patron=ITEM_DAT.paidfor.patron hide_patron_infos_if_needed=1 %] on [% ITEM_DAT.paidfor.created_on | $KohaDates %]
    23. [% END %] +
      +

      History

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