From 7342209b34d642935651e7b2275c3ca14656c4b1 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 6 Jun 2024 17:14:35 +0000 Subject: [PATCH] Bug 37048: Use template wrapper for self checkout page This patch updates the OPAC's self checkout page template to use WRAPPERs for the Bootstrap tabs markup. To test, apply the patch and enable the "WebBasedSelfCheck" system preference if necessary. - Navigate to the self checkout page (http://127.0.0.1:8080/cgi-bin/koha/sco/sco-main.pl) - Start checking out to a patron - You should see three tabs, "Checkouts", "Holds", and "Charges." The tabs should look correct and work correctly. Sponsored-By: Athens County Public Libraries Signed-off-by: David Nind Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer --- .../bootstrap/en/modules/sco/sco-main.tt | 275 +++++++++--------- 1 file changed, 140 insertions(+), 135 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index d0896ec024..c8366f4d11 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -308,152 +308,157 @@
- -
-
-
- [% IF ( new_issue ) %] -
-

- Checked out: - [% new_issue.item.biblio.title | html %] ([% new_issue.item.barcode | html %]). - - [% IF new_issue.item.is_bundle %] - [% SET bundle_items_count = new_issue.item.bundle_items.count %] - [% tnx('Bundle of {count} item', 'Bundle of {count} items', bundle_items_count, { count = bundle_items_count }) | html %]. - [% END %] + Holds ([% HOLDS.count | html %]) + [% END %] + [% WRAPPER tab_item tabname= "account" %] + Charges ([% total | $Price %]) + [% END %] + [% END # /WRAPPER tabs_nav %] + + [% WRAPPER tab_panels %] + [% WRAPPER tab_panel tabname="checkouts" bt_active= 1 %] +

+
+ [% IF ( new_issue ) %] +
+

+ Checked out: + [% new_issue.item.biblio.title | html %] ([% new_issue.item.barcode | html %]). + + [% IF new_issue.item.is_bundle %] + [% SET bundle_items_count = new_issue.item.bundle_items.count %] + [% tnx('Bundle of {count} item', 'Bundle of {count} items', bundle_items_count, { count = bundle_items_count }) | html %]. + [% END %] - Due on [% new_issue.date_due | $KohaDates as_due_date => 1 %] -

-
- [% END %] - [% IF ( issues_count ) %] - [% IF ( Koha.Preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %] - - - - - - - - - - - [% UNLESS ( nofines ) %] - - [% END %] - - - - - [% FOREACH ISSUE IN ISSUES %] - - - + + [% END # / FOREACH ISSUE %] + +
Checkouts for [% borrowername | html %] ([% issues_count | html %] total)
Checked out onTitleCall numberDueRenewFines
[% ISSUE.issuedate | html %] - [% UNLESS ( noitemlinks ) %] - [% ISSUE.title | html %] - [% ELSE %] - [% ISSUE.title | html %] - [% END %] - [% IF ( newissues.match(ISSUE.barcode)) %] - NEW + Due on [% new_issue.date_due | $KohaDates as_due_date => 1 %] +

+ + [% END %] + [% IF ( issues_count ) %] + [% IF ( Koha.Preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %] + + + + + + + + + + + [% UNLESS ( nofines ) %] + [% END %] - [% ISSUE.author | html %] - ([% ISSUE.barcode | html %]) - - - [% IF ( ISSUE.overdue ) %] - - [% ELSE %] - - [% END %] - + + + + [% FOREACH ISSUE IN ISSUES %] + + + + + [% IF ( ISSUE.overdue ) %] + + [% ELSE %] + [% END %] - [% IF ISSUE.auto_renew %] -
This item is scheduled for automatic renewal + + [% UNLESS ( nofines ) %] + [% END %] - - - [% UNLESS ( nofines ) %] - - [% END %] - - - [% END # / FOREACH ISSUE %] - -
Checkouts for [% borrowername | html %] ([% issues_count | html %] total)
Checked out onTitleCall numberDueRenewFines[% ISSUE.itemcallnumber | html %] - [% ISSUE.date_due | $KohaDates as_due_date => 1 %] - - [% ISSUE.date_due | $KohaDates as_due_date => 1 %] - -
- [% INCLUDE 'csrf-token.inc' %] - Issue renews - - - - - [% IF ISSUE.can_be_renewed %] - - - [% UNLESS ( ISSUE.renew ) %] - +
[% ISSUE.issuedate | html %] + [% UNLESS ( noitemlinks ) %] + [% ISSUE.title | html %] [% ELSE %] - + [% ISSUE.title | html %] [% END %] - [% ELSE %] - [% IF ISSUE.renew_error == 'onsite_checkout' %] - This is a on-site checkout, it cannot be renewed. - [% ELSIF ISSUE.renew_error == 'too_unseen' %] - You have renewed this item the maximum number of consecutive times without it being seen by the library. - [% ELSIF ISSUE.renew_error == 'too_soon' %] - This item cannot yet be renewed. - [% ELSE %] - No renewals allowed - [% END %] - [% IF Koha.Preference('SCOAllowCheckin') %] -
- - - -
+ [% IF ( newissues.match(ISSUE.barcode)) %] + NEW [% END %] + [% ISSUE.author | html %] + ([% ISSUE.barcode | html %]) +
[% ISSUE.itemcallnumber | html %] + [% ISSUE.date_due | $KohaDates as_due_date => 1 %] + + [% ISSUE.date_due | $KohaDates as_due_date => 1 %] + + + [% INCLUDE 'csrf-token.inc' %] + Issue renews + + + + + [% IF ISSUE.can_be_renewed %] + + + [% UNLESS ( ISSUE.renew ) %] + + [% ELSE %] + + [% END %] + [% ELSE %] + [% IF ISSUE.renew_error == 'onsite_checkout' %] + This is a on-site checkout, it cannot be renewed. + [% ELSIF ISSUE.renew_error == 'too_unseen' %] + You have renewed this item the maximum number of consecutive times without it being seen by the library. + [% ELSIF ISSUE.renew_error == 'too_soon' %] + This item cannot yet be renewed. + [% ELSE %] + No renewals allowed + [% END %] + [% IF Koha.Preference('SCOAllowCheckin') %] +
+ + + +
+ [% END %] + [% END %] + [% IF ISSUE.auto_renew %] +
This item is scheduled for automatic renewal + [% END %] + +
+ [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %] + - [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %] -
- [% ELSE %] - Show your checkouts - [% END # / IF ( Koha.preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %] +
+ [% ELSE %] + Show your checkouts + [% END # / IF ( Koha.preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %] + [% ELSE %] +

You currently have nothing checked out.

+ [% END # / IF issues_count %] +
+
+ [% END # /tab_panel %] + [% WRAPPER tab_panel tabname="holds" %] + [% IF HOLDS.count > 0 %] + [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %] [% ELSE %] -

You currently have nothing checked out.

- [% END # / IF issues_count %] -
-
-
- [% IF HOLDS.count > 0 %] - [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %] - [% ELSE %] -

You currently have no pending holds.

- [% END %] -
-
- [% PROCESS 'account-table.inc' %] -
-
+

You currently have no pending holds.

+ [% END %] + [% END # /tab_panel %] + [% WRAPPER tab_panel tabname="account" %] + [% PROCESS 'account-table.inc' %] + [% END # /tab_panel %] + [% END # /WRAPPER tab_panels %] + [% END # /WRAPPER tabs %] + + [% ELSE # IF validuser %]
-- 2.39.5