From 69d56d1859f4a0c661962142d7fee2dd13aa111d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 13 Jan 2025 13:51:23 +0100 Subject: [PATCH] Bug 38714: sco/sco-main.tt Signed-off-by: Lucas Gass Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- .../bootstrap/en/modules/sco/sco-main.tt | 467 ++++++++++-------- 1 file changed, 251 insertions(+), 216 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 a0b180a989..735741f3f2 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 @@ -57,228 +57,28 @@ [% INCLUDE 'masthead-sco.inc' %]
-
-
+ [% IF ( display_patron_image ) %] -
+ [% SET main_div_class = 'col-10 order-first order-md-first order-lg-2' %] [% ELSE %] -
+ [% SET main_div_class = 'col order-first order-md-first order-lg-2' %] [% END %] + [% UNLESS ( hide_main ) %] + [% IF ( validuser ) %] +
+
+

[% LibraryName | html %] Self checkout system

- [% FOREACH item IN impossible %] -
- -

Item cannot be checked out.

-

Sorry, this item cannot be checked out at this station.

- [% IF ( item.title ) %] -

Title: [% item.title | html %]

+ [% PROCESS display_errors %] + +
You are logged in as [% borrowername | html %].
+ [% INCLUDE 'opac-note.inc' sco="true" %] + [% IF patron_has_hold_fee %] +
A hold fee was charged to your account for collecting this item.
[% END %] -

- [% IF ( item.circ_error_UNKNOWN_BARCODE ) %] - The system does not recognize this barcode. - [% ELSIF ( item.circ_error_max_loans_allowed ) %] - You have reached the maximum limit of items checked out. - [% ELSIF ( item.circ_error_ISSUED_TO_ANOTHER ) %] - This item is checked out to someone else. - [% ELSIF ( item.circ_error_NO_MORE_RENEWALS ) %] - You cannot renew this item again. - [% ELSIF ( item.circ_error_NOT_FOR_LOAN ) %] - This item is not for loan. - [% ELSIF ( item.circ_error_DEBT ) %] - You owe the library [% item.DEBT | $Price with_symbol => 1%] and cannot check out. - [% ELSIF ( item.circ_error_WTHDRAWN ) %] - This item has been withdrawn from the collection. - [% ELSIF ( item.circ_error_RESTRICTED ) %] - This item is restricted. - [% ELSIF ( item.circ_error_RESERVED ) %] - This item is on hold for another patron. - [% ELSIF ( item.circ_error_ITEMNOTSAMEBRANCH ) %] - This item belongs to another library. - [% ELSIF ( item.circ_error_EXPIRED ) %] - Your account has expired. - [% ELSIF ( item.circ_error_DEBARRED ) %] - Your account has been suspended. - [% ELSIF ( item.circ_error_CARD_LOST ) %] - This library card has been declared lost. - [% ELSIF ( item.circ_error_GNA ) %] - Your contact information seems to be incomplete. - [% ELSIF ( item.circ_error_INVALID_DATE ) %] - Due date is not valid. - [% ELSIF ( item.circ_error_ADDITIONAL_MATERIALS ) %] - Item must be checked out at a circulation desk. - [% END %] - Please see a member of the library staff. -

- - [% IF ( item.returnitem && Koha.Preference('SCOAllowCheckin') ) %] -
- [% INCLUDE 'csrf-token.inc' %] - Return - - - - - - -
- [% END %] - -
- Error - - - - - - -
-
- [% END # / FOREACH impossible %] - - [% FOREACH c IN confirm %] -

Please confirm the checkout:

- - [% IF ( c.confirm_renew_issue ) %] -

This item is already checked out to you: [% c.confirm | html %] ([% c.barcode | html %])

- [% END %] - - [% IF ( c.renew && Koha.Preference('SCOAllowCheckin') ) %] -
- [% INCLUDE 'csrf-token.inc' %] - Return - - - - - - - -
- [% END %] - - [% UNLESS ( c.renew ) %] -
- [% INCLUDE 'csrf-token.inc' %] - Renew - - - - - - - -
- [% ELSE %] -
- [% INCLUDE 'csrf-token.inc' %] - Renew - - - - - - - -
- [% END %] - -
- Cancel - - - - - -
-
- [% END # / FOREACH confirm %] - - [% IF ( nopermission ) %] - -
- -

Access denied

-

Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.

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

Session lost

-

You are accessing self-checkout from a different IP address! please log in again.

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

Record not found

-

Your userid was not found in the database. Please try again.

-
- [% END %] - - [% IF ( issued ) %] - [% IF batch_checkouts_allowed %] - [% FOREACH barcode IN newissues.split(',') %] - -
-

Item checked out ([% barcode | html %])

-
- [% END %] - [% ELSE %] - -
-

Item checked out ([% newissues.split(',').last | html %])

-
- [% END %] - [% ELSIF ( renewed ) %] - -
-

Item renewed ([% barcode | html %])

-
- [% ELSIF ( renewed == 0) %] - -
-

Item not renewed

-
- [% ELSIF ( returned == 0 ) %] - -
-

Item not checked in: please see circulation staff for assistance

-
- [% ELSIF ( returned == 1 ) %] - -
-

Item checked in ([% barcode | html %])

-
- [% END %] - - [% UNLESS ( hide_main ) %] - - [% IF ( patronid ) %] - [% IF ( validuser ) %] -
You are logged in as [% borrowername | html %].
- [% INCLUDE 'opac-note.inc' sco="true" %] - [% IF patron_has_hold_fee %] -
A hold fee was charged to your account for collecting this item.
- [% END %] - [% END %] - - [% IF ( nouser ) %] -
-

Sorry

-

The userid [% patronid | html %] was not found in the database. Please try again.

-
- [% END %] - [% END # / IF patronid %] - - [% IF ( validuser ) %]
[% INCLUDE 'csrf-token.inc' %] @@ -475,8 +275,31 @@ [% END # /WRAPPER tab_panels %] [% END # /WRAPPER tabs %] + [% IF ( SCOMainUserBlock ) %] +
+ [% PROCESS koha_news_block news => SCOMainUserBlock %] +
+ [% END %] +
+
+
[% ELSE # IF validuser %] + +
+
+
+

[% LibraryName | html %] Self checkout system

+ + [% PROCESS display_errors %] + + [% IF patronid && nouser %] +
+

Sorry

+

The userid [% patronid | html %] was not found in the database. Please try again.

+
+ [% END %] +
[% INCLUDE 'csrf-token.inc' %] @@ -524,8 +347,6 @@
- [% END # / IF validuser %] - [% END # / UNLESS ( hide_main %] [% IF ( SCOMainUserBlock ) %]
[% PROCESS koha_news_block news => SCOMainUserBlock %] @@ -534,6 +355,26 @@
+ + [% END # / IF validuser %] + [% ELSE # / UNLESS ( hide_main %] +
+
+
+

[% LibraryName | html %] Self checkout system

+ + [% PROCESS display_errors %] + + [% IF ( SCOMainUserBlock ) %] +
+ [% PROCESS koha_news_block news => SCOMainUserBlock %] +
+ [% END %] +
+
+
+ [% END # / UNLESS ( hide_main %] +
@@ -666,3 +507,197 @@ [% IF ( Koha.Preference('SCOUserJS') ) %][% END %] [% END %] + +[% BLOCK display_errors %] + [% FOREACH item IN impossible %] +
+ +

Item cannot be checked out.

+

Sorry, this item cannot be checked out at this station.

+ [% IF ( item.title ) %] +

Title: [% item.title | html %]

+ [% END %] + +

+ [% IF ( item.circ_error_UNKNOWN_BARCODE ) %] + The system does not recognize this barcode. + [% ELSIF ( item.circ_error_max_loans_allowed ) %] + You have reached the maximum limit of items checked out. + [% ELSIF ( item.circ_error_ISSUED_TO_ANOTHER ) %] + This item is checked out to someone else. + [% ELSIF ( item.circ_error_NO_MORE_RENEWALS ) %] + You cannot renew this item again. + [% ELSIF ( item.circ_error_NOT_FOR_LOAN ) %] + This item is not for loan. + [% ELSIF ( item.circ_error_DEBT ) %] + You owe the library [% item.DEBT | $Price with_symbol => 1%] and cannot check out. + [% ELSIF ( item.circ_error_WTHDRAWN ) %] + This item has been withdrawn from the collection. + [% ELSIF ( item.circ_error_RESTRICTED ) %] + This item is restricted. + [% ELSIF ( item.circ_error_RESERVED ) %] + This item is on hold for another patron. + [% ELSIF ( item.circ_error_ITEMNOTSAMEBRANCH ) %] + This item belongs to another library. + [% ELSIF ( item.circ_error_EXPIRED ) %] + Your account has expired. + [% ELSIF ( item.circ_error_DEBARRED ) %] + Your account has been suspended. + [% ELSIF ( item.circ_error_CARD_LOST ) %] + This library card has been declared lost. + [% ELSIF ( item.circ_error_GNA ) %] + Your contact information seems to be incomplete. + [% ELSIF ( item.circ_error_INVALID_DATE ) %] + Due date is not valid. + [% ELSIF ( item.circ_error_ADDITIONAL_MATERIALS ) %] + Item must be checked out at a circulation desk. + [% END %] + Please see a member of the library staff. +

+ + [% IF ( item.returnitem && Koha.Preference('SCOAllowCheckin') ) %] +
+ [% INCLUDE 'csrf-token.inc' %] + Return + + + + + + +
+ [% END %] + +
+ Error + + + + + + +
+
+ [% END # / FOREACH impossible %] + + [% FOREACH c IN confirm %] +

Please confirm the checkout:

+ + [% IF ( c.confirm_renew_issue ) %] +

This item is already checked out to you: [% c.confirm | html %] ([% c.barcode | html %])

+ [% END %] + + [% IF ( c.renew && Koha.Preference('SCOAllowCheckin') ) %] +
+ [% INCLUDE 'csrf-token.inc' %] + Return + + + + + + + +
+ [% END %] + + [% UNLESS ( c.renew ) %] +
+ [% INCLUDE 'csrf-token.inc' %] + Renew + + + + + + + +
+ [% ELSE %] +
+ [% INCLUDE 'csrf-token.inc' %] + Renew + + + + + + + +
+ [% END %] + +
+ Cancel + + + + + +
+
+ [% END # / FOREACH confirm %] + + [% IF ( nopermission ) %] + +
+ +

Access denied

+

Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.

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

Session lost

+

You are accessing self-checkout from a different IP address! please log in again.

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

Record not found

+

Your userid was not found in the database. Please try again.

+
+ [% END %] + + [% IF ( issued ) %] + [% IF batch_checkouts_allowed %] + [% FOREACH barcode IN newissues.split(',') %] + +
+

Item checked out ([% barcode | html %])

+
+ [% END %] + [% ELSE %] + +
+

Item checked out ([% newissues.split(',').last | html %])

+
+ [% END %] + [% ELSIF ( renewed ) %] + +
+

Item renewed ([% barcode | html %])

+
+ [% ELSIF ( renewed == 0) %] + +
+

Item not renewed

+
+ [% ELSIF ( returned == 0 ) %] + +
+

Item not checked in: please see circulation staff for assistance

+
+ [% ELSIF ( returned == 1 ) %] + +
+

Item checked in ([% barcode | html %])

+
+ [% END %] +[% END %]