From 324a501f2c2544bac907f67107cbb6a00a3dc7d9 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 1 Jun 2023 14:16:18 +0000 Subject: [PATCH] Bug 33895: Use template wrapper for tabs: OPAC user summary This patch updates the OPAC user summary page so that it uses the new WRAPPER syntax to generate tabs markup. To test, apply the patch and log in to the OPAC. Check these tabs on the patron summary page: - Checkouts - Relatives' checkouts - Relatives' charges - Overdues - Charges - Credits - Clubs - Test enrolling and unenrolling - Holds - Recalls - Article requests - Overdrive - Test with OverDriveCirculation enabled - Logging in, logging out Signed-off-by: Sam Lau Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- .../bootstrap/en/includes/holds-table.inc | 428 +++++++++--------- .../bootstrap/en/modules/clubs/clubs-tab.tt | 4 +- .../bootstrap/en/modules/clubs/enroll.tt | 4 +- .../bootstrap/en/modules/opac-user.tt | 146 +++--- koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js | 2 +- 5 files changed, 293 insertions(+), 291 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc index 84fb105751..483f026453 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc @@ -3,234 +3,230 @@ [% USE KohaDates %] [% PROCESS 'i18n.inc' %] -[% IF ( HOLDS.count ) %] -
- - - - +
Holds ([% HOLDS.count | html %] total)
+ + + + + + [% IF ( showpriority ) %] + + [% ELSE %] + + [% END %] + + [% UNLESS( singleBranchMode) %] + + [% END %] + [% IF ( showpriority ) %] + + [% END %] + + [% IF SuspendHoldsOpac and ! onlyinfo %] + + [% END %] + [% IF ! onlyinfo %] + + [% END %] + + + + + [% SET all_holds_waiting = 1 %] + [% FOREACH HOLD IN HOLDS %] + [% UNLESS ( HOLD.is_waiting || HOLD.is_in_transit || HOLD.is_in_processing) %] + [% SET all_holds_waiting = 0 %] + [% END %] + [% IF ( HOLD.is_at_destination ) %] + + [% ELSIF HOLD.is_in_transit %] + + [% ELSE %] - - [% IF ( showpriority ) %] - - [% ELSE %] - - [% END %] - - [% UNLESS( singleBranchMode) %] - - [% END %] - [% IF ( showpriority ) %] - - [% END %] - - [% IF SuspendHoldsOpac and ! onlyinfo %] - - [% END %] + [% END %] + + [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio link=> 1 %] + [% HOLD.item.enumchron | html %] + [% ELSE %] + + [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio %] + [% HOLD.item.enumchron | html %] + [% END %] - - - - - [% SET all_holds_waiting = 1 %] - [% FOREACH HOLD IN HOLDS %] - [% UNLESS ( HOLD.is_waiting || HOLD.is_in_transit || HOLD.is_in_processing) %] - [% SET all_holds_waiting = 0 %] + [% HOLD.biblio.author | html %] + [% IF HOLD.item_group_id %] +

Next available item from item group: [% HOLD.item_group.description | html %]

[% END %] - [% IF ( HOLD.is_at_destination ) %] - - [% ELSIF HOLD.is_in_transit %] - - [% ELSE %] - + [% IF HOLD.item_level_hold %] +

Item on hold: [% HOLD.item.barcode | html %]

[% END %] - - - [% IF ! HOLD.found %] - + + [% IF ! HOLD.found %] + - [% UNLESS( singleBranchMode) %] - + [% ELSE %] + + [% UNLESS( singleBranchMode) %] + + [% END %] + [% IF ( showpriority ) %] + + [% END %] + + [% ELSE %] + [% IF ( HOLD.is_in_transit ) %] + [% SET transfer = HOLD.item.get_transfer %] + [% branch_name = BLOCK %][% Branches.GetName( transfer.frombranch ) | html %][% END %] + Item in transit from [% branch_name| $raw %] since + [% transfer.datesent | $KohaDates %] + [% ELSIF ( HOLD.is_in_processing ) %] + Item in processing + [% ELSIF ( HOLD.suspend ) %] + Suspended[% IF ( HOLD.suspend_until ) %] until [% HOLD.suspend_until | $KohaDates %][% END %] + [% ELSE %] + [% IF HOLD.itemtype %] + Pending for next available item of item type '[% ItemTypes.GetDescription( HOLD.itemtype ) | html %]' + [% ELSE %] + Pending + [% END %] [% END %] - + [% IF SuspendHoldsOpac and ! onlyinfo %] + - [% IF SuspendHoldsOpac and ! onlyinfo %] - - [% END # / IF SuspendHoldsOpac %] - [% IF ! onlyinfo %] - - - [% END # / IF onlyinfo %] - - [% END # /FOREACH HOLDS %] - -
Holds ([% HOLDS.count | html %] total)
TitlePlaced onPlaced onExpires onPickup locationPriorityStatusSuspendModify
TitlePlaced onPlaced onExpires onPickup locationPriorityStatusSuspend [% IF ! onlyinfo %] - Modify
- [% IF ! onlyinfo %] - [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio link=> 1 %] - [% HOLD.item.enumchron | html %] - [% ELSE %] - - [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio %] - [% HOLD.item.enumchron | html %] - - [% END %] - [% HOLD.biblio.author | html %] - [% IF HOLD.item_group_id %] -

Next available item from item group: [% HOLD.item_group.description | html %]

- [% END %] - [% IF HOLD.item_level_hold %] -

Item on hold: [% HOLD.item.barcode | html %]

- [% END %] -
- Hold date: - [% HOLD.reservedate | $KohaDates %] - - - [% IF ( HOLD.expirationdate ) %] - Expiration: - [% HOLD.expirationdate | $KohaDates %] - [% ELSE %] - Expiration: - Never expires - [% END %] + + Hold date: + [% HOLD.reservedate | $KohaDates %] + + + [% IF ( HOLD.expirationdate ) %] + Expiration: + [% HOLD.expirationdate | $KohaDates %] [% ELSE %] - - - + Expiration: + Never expires [% END %] - - Pickup location: - [% HOLD.branch.branchname | html %] - [% IF ( HOLD.can_update_pickup_location_opac ) %] - - - - [% END %] - + - + [% END %] + + Pickup location: + [% HOLD.branch.branchname | html %] + [% IF ( HOLD.can_update_pickup_location_opac ) %] + + + + [% END %] + + Priority: + [% HOLD.priority | html %] + + Status: + [% IF ( HOLD.is_waiting ) %] + + [% IF ( HOLD.is_at_destination ) %] + Item waiting at [% HOLD.branch.branchname | html %] + [% IF ( HOLD.desk_id ) %], [% HOLD.desk.desk_name | html %],[% END %] + [% IF ( HOLD.waitingdate ) %] + since [% HOLD.waitingdate | $KohaDates %] + [% IF HOLD.expirationdate %] + until [% HOLD.expirationdate | $KohaDates %] + [% END %] + [% END %] + + [% ELSE %] + Item in transit to [% Branches.GetName( HOLD.branchcode ) | html %] [% END %] - [% IF ( showpriority ) %] - - Priority: - [% HOLD.priority | html %] - - Status: - [% IF ( HOLD.is_waiting ) %] - - [% IF ( HOLD.is_at_destination ) %] - Item waiting at [% HOLD.branch.branchname | html %] - [% IF ( HOLD.desk_id ) %], [% HOLD.desk.desk_name | html %],[% END %] - [% IF ( HOLD.waitingdate ) %] - since [% HOLD.waitingdate | $KohaDates %] - [% IF HOLD.expirationdate %] - until [% HOLD.expirationdate | $KohaDates %] - [% END %] - [% END %] - - [% ELSE %] - Item in transit to [% Branches.GetName( HOLD.branchcode ) | html %] - [% END %] + [% END %] + + [% IF ( HOLD.is_cancelable_from_opac ) %] + [% IF HOLD.suspend %] +
+ + +
[% ELSE %] - [% IF ( HOLD.is_in_transit ) %] - [% SET transfer = HOLD.item.get_transfer %] - [% branch_name = BLOCK %][% Branches.GetName( transfer.frombranch ) | html %][% END %] - Item in transit from [% branch_name| $raw %] since - [% transfer.datesent | $KohaDates %] - [% ELSIF ( HOLD.is_in_processing ) %] - Item in processing - [% ELSIF ( HOLD.suspend ) %] - Suspended[% IF ( HOLD.suspend_until ) %] until [% HOLD.suspend_until | $KohaDates %][% END %] + [% IF AutoResumeSuspendedHolds %] + Suspend [% ELSE %] - [% IF HOLD.itemtype %] - Pending for next available item of item type '[% ItemTypes.GetDescription( HOLD.itemtype ) | html %]' - [% ELSE %] - Pending - [% END %] - [% END %] - [% END %] -
- [% IF ( HOLD.is_cancelable_from_opac ) %] - [% IF HOLD.suspend %] -
- - -
- [% ELSE %] - [% IF AutoResumeSuspendedHolds %] - Suspend - [% ELSE %] -
- - -
- [% END # / IF AutoResumeSuspendedHolds %] - [% END # / IF HOLD.suspend %] - [% END # / IF ( HOLD.is_cancelable_from_opac )%] -
- [% IF ( HOLD.is_cancelable_from_opac ) %] -
- - - -
- [% ELSIF HOLD.is_waiting && HOLD.cancellation_requestable_from_opac %] -
- + - - +
- [% END %] -
+ [% END # / IF AutoResumeSuspendedHolds %] + [% END # / IF HOLD.suspend %] + [% END # / IF ( HOLD.is_cancelable_from_opac )%] + + [% END # / IF SuspendHoldsOpac %] + [% IF ! onlyinfo %] + + [% IF ( HOLD.is_cancelable_from_opac ) %] +
+ + + +
+ [% ELSIF HOLD.is_waiting && HOLD.cancellation_requestable_from_opac %] +
+ + + + +
+ [% END %] + + + [% END # / IF onlyinfo %] + + [% END # /FOREACH HOLDS %] + + - [% IF SuspendHoldsOpac and ! onlyinfo %] - [% UNLESS ( all_holds_waiting ) %] -
-
- - +[% IF SuspendHoldsOpac and ! onlyinfo %] + [% UNLESS ( all_holds_waiting ) %] +
+ + + - [% IF AutoResumeSuspendedHolds %] - - -

Clear date to suspend indefinitely

- [% END %] - -
-
-
-
- - -
-
- [% END %] - [% END %] -
-[% END # / #HOLDS.count %] + [% IF AutoResumeSuspendedHolds %] + + +

Clear date to suspend indefinitely

+ [% END %] + +
+
+
+
+ + +
+
+ [% END %] +[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt index c084ae304f..8e0f99659d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt @@ -76,7 +76,7 @@