From 759d830268e97897ebf3482f72ca68edd16e234d Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 17 Apr 2025 16:22:58 -0300 Subject: [PATCH] Bug 38340: Move templates Signed-off-by: Tomas Cohen Arazi --- Koha/ILL/Backend/intra-includes/cancel.inc | 16 -- Koha/ILL/Backend/intra-includes/confirm.inc | 18 -- Koha/ILL/Backend/intra-includes/edititem.inc | 94 ----------- Koha/ILL/Backend/intra-includes/migrate.inc | 123 -------------- Koha/ILL/Backend/opac-includes/create.inc | 159 ------------------ .../includes/ill/backends/Standard/cancel.inc | 16 ++ .../ill/backends/Standard/confirm.inc | 18 ++ .../ill/backends/Standard}/create.inc | 0 .../ill/backends/Standard/edititem.inc | 94 +++++++++++ .../ill/backends/Standard}/illview.inc | 0 .../backends/Standard/inc}/custom_fields.inc | 24 ++- .../Standard/inc}/form_input_helpers.inc | 0 .../backends/Standard/inc}/forms/article.inc | 0 .../ill/backends/Standard/inc}/forms/book.inc | 0 .../backends/Standard/inc}/forms/chapter.inc | 0 .../Standard/inc}/forms/conference.inc | 0 .../ill/backends/Standard/inc}/forms/dvd.inc | 0 .../backends/Standard/inc}/forms/journal.inc | 0 .../backends/Standard/inc}/forms/other.inc | 0 .../backends/Standard/inc}/forms/resource.inc | 0 .../backends/Standard/inc}/forms/thesis.inc | 0 .../ill/backends/Standard/inc}/shared.js | 0 .../ill/backends/Standard/migrate.inc | 117 +++++++++++++ .../includes/ill/backends/Standard/create.inc | 141 ++++++++++++++++ .../backends/Standard/inc/custom_fields.inc | 34 ++++ .../Standard/inc/form_input_helpers.inc | 52 ++++++ .../backends/Standard/inc/forms/article.inc | 16 ++ .../ill/backends/Standard/inc/forms/book.inc | 6 + .../backends/Standard/inc/forms/chapter.inc | 14 ++ .../Standard/inc/forms/conference.inc | 16 ++ .../ill/backends/Standard/inc/forms/dvd.inc | 12 ++ .../backends/Standard/inc/forms/journal.inc | 7 + .../ill/backends/Standard/inc/forms/other.inc | 0 .../backends/Standard/inc/forms/resource.inc | 17 ++ .../backends/Standard/inc/forms/thesis.inc | 10 ++ .../ill/backends/Standard/inc/shared.js | 44 +++++ 36 files changed, 625 insertions(+), 423 deletions(-) delete mode 100644 Koha/ILL/Backend/intra-includes/cancel.inc delete mode 100644 Koha/ILL/Backend/intra-includes/confirm.inc delete mode 100644 Koha/ILL/Backend/intra-includes/edititem.inc delete mode 100644 Koha/ILL/Backend/intra-includes/migrate.inc delete mode 100644 Koha/ILL/Backend/opac-includes/create.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/cancel.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/confirm.inc rename {Koha/ILL/Backend/intra-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard}/create.inc (100%) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/edititem.inc rename {Koha/ILL/Backend/intra-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard}/illview.inc (100%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/custom_fields.inc (71%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/form_input_helpers.inc (100%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/forms/article.inc (100%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/forms/book.inc (100%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/forms/chapter.inc (100%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/forms/conference.inc (100%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/forms/dvd.inc (100%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/forms/journal.inc (100%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/forms/other.inc (100%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/forms/resource.inc (100%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/forms/thesis.inc (100%) rename {Koha/ILL/Backend/shared-includes => koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc}/shared.js (100%) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/migrate.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/custom_fields.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/form_input_helpers.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/article.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/book.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/chapter.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/conference.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/dvd.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/journal.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/other.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/resource.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/thesis.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/shared.js diff --git a/Koha/ILL/Backend/intra-includes/cancel.inc b/Koha/ILL/Backend/intra-includes/cancel.inc deleted file mode 100644 index 3d93a4e8447..00000000000 --- a/Koha/ILL/Backend/intra-includes/cancel.inc +++ /dev/null @@ -1,16 +0,0 @@ -[% IF whole.error %] -

Unhandled error

-[% END %] - -[% IF whole.stage == "confirm" %] -

Cancel manual request

-

Proceeding with this action will set this request to 'Cancelled'.

-

This means that actions have been taken to cancel this request at the source with whom the request was placed.

-

If you can confirm this has been done, please proceed.

-

- [% base_url = "/cgi-bin/koha/ill/ill-requests.pl" %] - [% proceed_url = base_url _ "?method=cancel&stage=confirm" _ "&illrequest_id=" _ request.illrequest_id %] - Revert request - Cancel -

-[% END %] diff --git a/Koha/ILL/Backend/intra-includes/confirm.inc b/Koha/ILL/Backend/intra-includes/confirm.inc deleted file mode 100644 index 21a307fcd05..00000000000 --- a/Koha/ILL/Backend/intra-includes/confirm.inc +++ /dev/null @@ -1,18 +0,0 @@ -[% IF whole.error %] -

Unhandled error

-[% END %] - -[% IF whole.stage == "confirm" %] -

Confirm manual request

-

Proceeding with this action will set this request to 'Requested'.

-

This means that actions have been taken to request this request from a source.

-

If you can confirm this has been done, please proceed.

-

- [% base_url = "/cgi-bin/koha/ill/ill-requests.pl" %] - [% proceed_url = base_url _ "?method=confirm&stage=confirm" _ "&illrequest_id=" _ request.illrequest_id %] - Confirm request - Cancel -

-[% ELSE %] -

Unknown stage. This should not have happened. -[% END %] diff --git a/Koha/ILL/Backend/intra-includes/edititem.inc b/Koha/ILL/Backend/intra-includes/edititem.inc deleted file mode 100644 index 20a694e804f..00000000000 --- a/Koha/ILL/Backend/intra-includes/edititem.inc +++ /dev/null @@ -1,94 +0,0 @@ -[% cwd = whole.cwd %] -[% PROCESS "${cwd}/shared-includes/form_input_helpers.inc" %] -[% IF whole.error %] -[% IF whole.status == 'missing_type' %] -

Please note: Mandatory field 'type' is missing.

-[% ELSE %] -

Unhandled error

-[% END %] -[% END %] - -[% IF whole.stage == "form" %] -

Edit a manual ILL request

-
- [% INCLUDE 'csrf-token.inc' %] -
- General details -
    -
  1. - - -
  2. -
-
- [% type = whole.value.other.type %] - [% IF type %] - [% INCLUDE "${cwd}/shared-includes/forms/${type}.inc" %] - [% END %] - [% INCLUDE "${cwd}/shared-includes/custom_fields.inc" %] -
- - Cancel -
- - - - -
- [% BLOCK backend_jsinclude %] - - [% END %] -[% ELSE %] -

Unknown stage. This should not have happened. -[% END %] diff --git a/Koha/ILL/Backend/intra-includes/migrate.inc b/Koha/ILL/Backend/intra-includes/migrate.inc deleted file mode 100644 index 02bc61093fd..00000000000 --- a/Koha/ILL/Backend/intra-includes/migrate.inc +++ /dev/null @@ -1,123 +0,0 @@ -[% IF whole.error %] -[% IF whole.status == 'missing_identifier' %] -

Please note: Mandatory field Identifier is missing.

-[% ELSIF whole.status == 'missing_branch' %] -

Please note: Library is a mandatory field.

-[% ELSIF whole.status == 'invalid_borrower' %] -

Please note: The patrons details you entered are invalid.

-[% ELSIF whole.status == 'invalid_branch' %] -

Please note: The library you chose is invalid.

-[% ELSE %] -

Unhandled error

-[% END %] -[% END %] - -[% IF whole.stage == "form" %] -

Migrating an ILL request

-
-
- General details -
    -
  1. - - - [% IF required %] -
    Required
    - [% END %] -
  2. -
-
- [% cwd = whole.cwd %] - [% type = whole.value.other.type %] - [% IF type %] - [% INCLUDE "${cwd}/shared-includes/forms/${type}.inc" %] - [% END %] - [% INCLUDE "${cwd}/shared-includes/custom_fields.inc" %] -
- Patron options -
    -
  1. - - -
    Required
    -
  2. -
  3. - xxx - -
    Required
    -
  4. -
-
-
- - Cancel -
-
-[% BLOCK backend_jsinclude %] - -[% END %] - -[% ELSE %] -

Unknown stage. This should not have happened. - -[% END %] diff --git a/Koha/ILL/Backend/opac-includes/create.inc b/Koha/ILL/Backend/opac-includes/create.inc deleted file mode 100644 index b4d5e2c2e58..00000000000 --- a/Koha/ILL/Backend/opac-includes/create.inc +++ /dev/null @@ -1,159 +0,0 @@ -[% USE Koha %] -[% PROCESS 'i18n.inc' %] -[% cwd = whole.cwd %] -[% PROCESS "${cwd}/shared-includes/form_input_helpers.inc" %] -[% IF whole.error %] -[% IF whole.status == 'missing_identifier' %] -

- Please note: Mandatory field Identifier is missing. -
-[% ELSIF whole.status == 'missing_type' %] -
- Please note: Type is a mandatory field. -
-[% ELSIF whole.status == 'missing_unauth_data' %] -
- Please note: Patron data (first name, last name and e-mail) are mandatory fields. -
-[% ELSIF whole.status == 'missing_branch' %] -
- Please note: Library is a mandatory field. -
-[% ELSIF whole.status == 'invalid_borrower' %] -
- Please note: The patron details you entered are invalid. -
-[% ELSIF whole.status == 'invalid_branch' %] -
- Please note: The library you chose is invalid. -
-[% ELSIF whole.status == 'failed_captcha' %] -
You typed in the wrong characters in the box before submitting. Please try again.
-[% ELSE %] -

Unhandled error

-[% END %] -[% END %] -[% SET opac = whole.value.other.opac %] - -[% IF whole.stage == "form" %] -

Create an ILL request

-
- [% INCLUDE 'csrf-token.inc' %] -
- Patron options -
    - [% IF unauthenticated_ill && !logged_in_user%] - [% PROCESS ill_text_input_field required = 1 id = 'unauthenticated_first_name' label = t('First name') value = whole.value.other.unauthenticated_first_name %] - [% PROCESS ill_text_input_field required = 1 id = 'unauthenticated_last_name' label = t('Last name') value = whole.value.other.unauthenticated_last_name %] - [% PROCESS ill_text_input_field required = 1 id = 'unauthenticated_email' label = t('E-mail address') value = whole.value.other.unauthenticated_email %] - [% END %] - [% WRAPPER ill_select_field required = 1 id = 'branchcode' label = t('Destination library') %] - - [% FOREACH branch IN branches %] - [% IF whole.value.other.branchcode && branch.branchcode == whole.value.other.branchcode %] - - [% ELSE %] - - [% END %] - [% END %] - [% END #ill_select_field %] -
-
-
- General details -
    - [% WRAPPER ill_select_field required = 1 id = 'type' label = t('Type') %] - - [% IF whole.value.other.type.lower == "book" %] - - [% ELSE %] - - [% END %] - [% IF whole.value.other.type.lower == "chapter" %] - - [% ELSE %] - - [% END %] - [% IF whole.value.other.type.lower == "journal" %] - - [% ELSE %] - - [% END %] - [% IF whole.value.other.type.lower == "article" %] - - [% ELSE %] - - [% END %] - [% IF whole.value.other.type.lower == "thesis" %] - - [% ELSE %] - - [% END %] - [% IF whole.value.other.type.lower == "conference" %] - - [% ELSE %] - - [% END %] - [% IF whole.value.other.type.lower == "dvd" %] - - [% ELSE %] - - [% END %] - [% IF whole.value.other.type.lower == "other" %] - - [% ELSE %] - - [% END %] - [% IF whole.value.other.type.lower == "resource" %] - - [% ELSE %] - - [% END %] - [% END #ill_select_field %] -
-
- [% type = whole.value.other.type %] - [% IF type %] - [% INCLUDE "${cwd}/shared-includes/forms/${type}.inc" %] - [% END %] - [% INCLUDE "${cwd}/shared-includes/custom_fields.inc" %] - [% IF whole.value.other.type && unauthenticated_ill && !logged_in_user%] -
- Verification -
    -
  1. - - - -
    Required
    - - - Please type the following characters into the preceding box: [% captcha | html %] -
  2. -
-
- [% END %] -
- - Cancel -
- - - -
- -[% ELSE %] -

Unknown stage. This should not have happened. - -[% END %] -[% BLOCK backend_jsinclude %] - -[% END %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/cancel.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/cancel.inc new file mode 100644 index 00000000000..51ea0f1d0d9 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/cancel.inc @@ -0,0 +1,16 @@ +[% IF whole.error %] +

Unhandled error

+[% END %] + +[% IF whole.stage == "confirm" %] +

Cancel manual request

+

Proceeding with this action will set this request to 'Cancelled'.

+

This means that actions have been taken to cancel this request at the source with whom the request was placed.

+

If you can confirm this has been done, please proceed.

+

+ [% base_url = "/cgi-bin/koha/ill/ill-requests.pl" %] + [% proceed_url = base_url _ "?method=cancel&stage=confirm" _ "&illrequest_id=" _ request.illrequest_id %] + Revert request + Cancel +

+[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/confirm.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/confirm.inc new file mode 100644 index 00000000000..d80ffdb8eb5 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/confirm.inc @@ -0,0 +1,18 @@ +[% IF whole.error %] +

Unhandled error

+[% END %] + +[% IF whole.stage == "confirm" %] +

Confirm manual request

+

Proceeding with this action will set this request to 'Requested'.

+

This means that actions have been taken to request this request from a source.

+

If you can confirm this has been done, please proceed.

+

+ [% base_url = "/cgi-bin/koha/ill/ill-requests.pl" %] + [% proceed_url = base_url _ "?method=confirm&stage=confirm" _ "&illrequest_id=" _ request.illrequest_id %] + Confirm request + Cancel +

+[% ELSE %] +

Unknown stage. This should not have happened.

+[% END %] diff --git a/Koha/ILL/Backend/intra-includes/create.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/create.inc similarity index 100% rename from Koha/ILL/Backend/intra-includes/create.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/create.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/edititem.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/edititem.inc new file mode 100644 index 00000000000..f84506fcf62 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/edititem.inc @@ -0,0 +1,94 @@ +[% cwd = whole.cwd %] +[% PROCESS "${cwd}/shared-includes/form_input_helpers.inc" %] +[% IF whole.error %] + [% IF whole.status == 'missing_type' %] +

Please note: Mandatory field 'type' is missing.

+ [% ELSE %] +

Unhandled error

+ [% END %] +[% END %] + +[% IF whole.stage == "form" %] +

Edit a manual ILL request

+
+ [% INCLUDE 'csrf-token.inc' %] +
+ General details +
    +
  1. + + +
  2. +
+
+ [% type = whole.value.other.type %] + [% IF type %] + [% INCLUDE "${cwd}/shared-includes/forms/${type}.inc" %] + [% END %] + [% INCLUDE "${cwd}/shared-includes/custom_fields.inc" %] +
+ + Cancel +
+ + + + +
+ [% BLOCK backend_jsinclude %] + + [% END %] +[% ELSE %] +

Unknown stage. This should not have happened.

+[% END %] diff --git a/Koha/ILL/Backend/intra-includes/illview.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/illview.inc similarity index 100% rename from Koha/ILL/Backend/intra-includes/illview.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/illview.inc diff --git a/Koha/ILL/Backend/shared-includes/custom_fields.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/custom_fields.inc similarity index 71% rename from Koha/ILL/Backend/shared-includes/custom_fields.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/custom_fields.inc index 1badd2af787..e49b3832632 100644 --- a/Koha/ILL/Backend/shared-includes/custom_fields.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/custom_fields.inc @@ -7,30 +7,28 @@ [% FOREACH key IN keys %]
  • [% IF opac %] - - + + [% ELSE %] - - + + [% END %] - +
  • [% i = i + 1 %] [% END %] - diff --git a/Koha/ILL/Backend/shared-includes/form_input_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/form_input_helpers.inc similarity index 100% rename from Koha/ILL/Backend/shared-includes/form_input_helpers.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/form_input_helpers.inc diff --git a/Koha/ILL/Backend/shared-includes/forms/article.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/article.inc similarity index 100% rename from Koha/ILL/Backend/shared-includes/forms/article.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/article.inc diff --git a/Koha/ILL/Backend/shared-includes/forms/book.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/book.inc similarity index 100% rename from Koha/ILL/Backend/shared-includes/forms/book.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/book.inc diff --git a/Koha/ILL/Backend/shared-includes/forms/chapter.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/chapter.inc similarity index 100% rename from Koha/ILL/Backend/shared-includes/forms/chapter.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/chapter.inc diff --git a/Koha/ILL/Backend/shared-includes/forms/conference.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/conference.inc similarity index 100% rename from Koha/ILL/Backend/shared-includes/forms/conference.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/conference.inc diff --git a/Koha/ILL/Backend/shared-includes/forms/dvd.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/dvd.inc similarity index 100% rename from Koha/ILL/Backend/shared-includes/forms/dvd.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/dvd.inc diff --git a/Koha/ILL/Backend/shared-includes/forms/journal.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/journal.inc similarity index 100% rename from Koha/ILL/Backend/shared-includes/forms/journal.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/journal.inc diff --git a/Koha/ILL/Backend/shared-includes/forms/other.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/other.inc similarity index 100% rename from Koha/ILL/Backend/shared-includes/forms/other.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/other.inc diff --git a/Koha/ILL/Backend/shared-includes/forms/resource.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/resource.inc similarity index 100% rename from Koha/ILL/Backend/shared-includes/forms/resource.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/resource.inc diff --git a/Koha/ILL/Backend/shared-includes/forms/thesis.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/thesis.inc similarity index 100% rename from Koha/ILL/Backend/shared-includes/forms/thesis.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/forms/thesis.inc diff --git a/Koha/ILL/Backend/shared-includes/shared.js b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/shared.js similarity index 100% rename from Koha/ILL/Backend/shared-includes/shared.js rename to koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/inc/shared.js diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/migrate.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/migrate.inc new file mode 100644 index 00000000000..75f5cfe0886 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/migrate.inc @@ -0,0 +1,117 @@ +[% IF whole.error %] + [% IF whole.status == 'missing_identifier' %] +

    Please note: Mandatory field Identifier is missing.

    + [% ELSIF whole.status == 'missing_branch' %] +

    Please note: Library is a mandatory field.

    + [% ELSIF whole.status == 'invalid_borrower' %] +

    Please note: The patrons details you entered are invalid.

    + [% ELSIF whole.status == 'invalid_branch' %] +

    Please note: The library you chose is invalid.

    + [% ELSE %] +

    Unhandled error

    + [% END %] +[% END %] + +[% IF whole.stage == "form" %] +

    Migrating an ILL request

    +
    +
    + General details +
      +
    1. + + + [% IF required %] +
      Required
      + [% END %] +
    2. +
    +
    + [% cwd = whole.cwd %] + [% type = whole.value.other.type %] + [% IF type %] + [% INCLUDE "${cwd}/shared-includes/forms/${type}.inc" %] + [% END %] + [% INCLUDE "${cwd}/shared-includes/custom_fields.inc" %] +
    + Patron options +
      +
    1. + + +
      Required
      +
    2. +
    3. + xxx + +
      Required
      +
    4. +
    +
    +
    + + Cancel +
    +
    + [% BLOCK backend_jsinclude %] + + [% END %] +[% ELSE %] +

    Unknown stage. This should not have happened.

    +[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc new file mode 100644 index 00000000000..31c8d5959fb --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc @@ -0,0 +1,141 @@ +[% USE Koha %] +[% PROCESS 'i18n.inc' %] +[% cwd = whole.cwd %] +[% PROCESS "${cwd}/shared-includes/form_input_helpers.inc" %] +[% IF whole.error %] + [% IF whole.status == 'missing_identifier' %] +
    Please note: Mandatory field Identifier is missing.
    + [% ELSIF whole.status == 'missing_type' %] +
    Please note: Type is a mandatory field.
    + [% ELSIF whole.status == 'missing_unauth_data' %] +
    Please note: Patron data (first name, last name and e-mail) are mandatory fields.
    + [% ELSIF whole.status == 'missing_branch' %] +
    Please note: Library is a mandatory field.
    + [% ELSIF whole.status == 'invalid_borrower' %] +
    Please note: The patron details you entered are invalid.
    + [% ELSIF whole.status == 'invalid_branch' %] +
    Please note: The library you chose is invalid.
    + [% ELSIF whole.status == 'failed_captcha' %] +
    You typed in the wrong characters in the box before submitting. Please try again.
    + [% ELSE %] +

    Unhandled error

    + [% END %] +[% END %] +[% SET opac = whole.value.other.opac %] + +[% IF whole.stage == "form" %] +

    Create an ILL request

    +
    + [% INCLUDE 'csrf-token.inc' %] +
    + Patron options +
      + [% IF unauthenticated_ill && !logged_in_user %] + [% PROCESS ill_text_input_field required = 1 id = 'unauthenticated_first_name' label = t('First name') value = whole.value.other.unauthenticated_first_name %] + [% PROCESS ill_text_input_field required = 1 id = 'unauthenticated_last_name' label = t('Last name') value = whole.value.other.unauthenticated_last_name %] + [% PROCESS ill_text_input_field required = 1 id = 'unauthenticated_email' label = t('E-mail address') value = whole.value.other.unauthenticated_email %] + [% END %] + [% WRAPPER ill_select_field required = 1 id = 'branchcode' label = t('Destination library') %] + + [% FOREACH branch IN branches %] + [% IF whole.value.other.branchcode && branch.branchcode == whole.value.other.branchcode %] + + [% ELSE %] + + [% END %] + [% END %] + [% END #ill_select_field %] +
    +
    +
    + General details +
      + [% WRAPPER ill_select_field required = 1 id = 'type' label = t('Type') %] + + [% IF whole.value.other.type.lower == "book" %] + + [% ELSE %] + + [% END %] + [% IF whole.value.other.type.lower == "chapter" %] + + [% ELSE %] + + [% END %] + [% IF whole.value.other.type.lower == "journal" %] + + [% ELSE %] + + [% END %] + [% IF whole.value.other.type.lower == "article" %] + + [% ELSE %] + + [% END %] + [% IF whole.value.other.type.lower == "thesis" %] + + [% ELSE %] + + [% END %] + [% IF whole.value.other.type.lower == "conference" %] + + [% ELSE %] + + [% END %] + [% IF whole.value.other.type.lower == "dvd" %] + + [% ELSE %] + + [% END %] + [% IF whole.value.other.type.lower == "other" %] + + [% ELSE %] + + [% END %] + [% IF whole.value.other.type.lower == "resource" %] + + [% ELSE %] + + [% END %] + [% END #ill_select_field %] +
    +
    + [% type = whole.value.other.type %] + [% IF type %] + [% INCLUDE "${cwd}/shared-includes/forms/${type}.inc" %] + [% END %] + [% INCLUDE "${cwd}/shared-includes/custom_fields.inc" %] + [% IF whole.value.other.type && unauthenticated_ill && !logged_in_user %] +
    + Verification +
      +
    1. + + + +
      Required
      + + + Please type the following characters into the preceding box: [% captcha | html %] +
    2. +
    +
    + [% END %] +
    + + Cancel +
    + + + +
    +[% ELSE %] +

    Unknown stage. This should not have happened.

    +[% END %] +[% BLOCK backend_jsinclude %] + +[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/custom_fields.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/custom_fields.inc new file mode 100644 index 00000000000..e49b3832632 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/custom_fields.inc @@ -0,0 +1,34 @@ +
    + Custom fields +
      + [% keys = whole.value.other.custom_key.split('\0') %] + [% values = whole.value.other.custom_value.split('\0') %] + [% i = 0 %] + [% FOREACH key IN keys %] +
    1. + [% IF opac %] + + + [% ELSE %] + + + [% END %] + +
    2. + [% i = i + 1 %] + [% END %] +
    + + +
    + + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/form_input_helpers.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/form_input_helpers.inc new file mode 100644 index 00000000000..5ac8be9b868 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/form_input_helpers.inc @@ -0,0 +1,52 @@ +[% BLOCK ill_text_input_field %] +
  • + + [% IF opac %] + + [% ELSE %] + + [% END %] + [% IF required %] +
    Required
    + [% END %] + [% SET required = 0 %] +
  • +[% END %] + +[% BLOCK ill_select_field %] +
  • + + [% IF opac %] + + [% END %] + [% content | $raw %] + + [% IF required %] +
    Required
    + [% END %] + [% SET required = 0 %] +
  • +[% END %] + +[% BLOCK book_text_input_fields %] + [% PROCESS ill_text_input_field id = 'title' label = t('Title') value = whole.value.other.title %] + [% PROCESS ill_text_input_field id = 'author' label = t('Author') value = whole.value.other.author %] + [% PROCESS ill_text_input_field id = 'editor' label = t('Editor') value = whole.value.other.editor %] + [% PROCESS ill_text_input_field id = 'publisher' label = t('Publisher') value = whole.value.other.publisher %] + [% PROCESS ill_text_input_field id = 'published_place' label = t('Place of publication') value = whole.value.other.published_place %] + [% PROCESS ill_text_input_field id = 'year' label = t('Year') value = whole.value.other.year %] + [% PROCESS ill_text_input_field id = 'part_edition' label = t('Part / Edition') value = whole.value.other.part_edition %] + [% PROCESS ill_text_input_field id = 'volume' label = t('Volume') value = whole.value.other.volume %] + [% PROCESS ill_text_input_field id = 'isbn' label = t('ISBN') value = whole.value.other.isbn %] + [% PROCESS ill_text_input_field id = 'doi' label = t('DOI') value = whole.value.other.doi %] +[% END %] + +[% BLOCK journal_text_input_fields %] + [% PROCESS ill_text_input_field id = 'title' label = t('Title') value = whole.value.other.title %] + [% PROCESS ill_text_input_field id = 'volume' label = t('Volume') value = whole.value.other.volume %] + [% PROCESS ill_text_input_field id = 'issue' label = t('Issue number') value = whole.value.other.issue %] + [% PROCESS ill_text_input_field id = 'year' label = t('Year') value = whole.value.other.year %] + [% PROCESS ill_text_input_field id = 'issn' label = t('ISSN') value = whole.value.other.issn %] +[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/article.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/article.inc new file mode 100644 index 00000000000..07a52d3eaed --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/article.inc @@ -0,0 +1,16 @@ +
    + Journal details +
      + [% PROCESS journal_text_input_fields %] +
    +
    +
    + Article details +
      + [% PROCESS ill_text_input_field id = 'article_title' label = t('Article title') value = whole.value.other.article_title %] + [% PROCESS ill_text_input_field id = 'article_author' label = t('Article author') value = whole.value.other.article_author %] + [% PROCESS ill_text_input_field id = 'published_date' label = t('Publication date') value = whole.value.other.published_date %] + [% PROCESS ill_text_input_field id = 'pages' label = t('Pages') value = whole.value.other.pages %] + [% PROCESS ill_text_input_field id = 'doi' label = t('DOI') value = whole.value.other.doi %] +
    +
    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/book.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/book.inc new file mode 100644 index 00000000000..0f84f669011 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/book.inc @@ -0,0 +1,6 @@ +
    + Book details +
      + [% PROCESS book_text_input_fields %] +
    +
    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/chapter.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/chapter.inc new file mode 100644 index 00000000000..48312571931 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/chapter.inc @@ -0,0 +1,14 @@ +
    + Book details +
      + [% PROCESS book_text_input_fields %] +
    +
    +
    + Chapter details +
      + [% PROCESS ill_text_input_field id = 'chapter_author' label = t('Author') value = whole.value.other.chapter_author %] + [% PROCESS ill_text_input_field id = 'chapter' label = t('Chapter') value = whole.value.other.chapter %] + [% PROCESS ill_text_input_field id = 'pages' label = t('Pages') value = whole.value.other.pages %] +
    +
    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/conference.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/conference.inc new file mode 100644 index 00000000000..ce74a27e59a --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/conference.inc @@ -0,0 +1,16 @@ +
    + Conference details +
      + [% PROCESS ill_text_input_field id = 'title' label = t('Conference title') value = whole.value.other.title %] + [% PROCESS ill_text_input_field id = 'publication' label = t('Publication') value = whole.value.other.publication %] + [% PROCESS ill_text_input_field id = 'conference_date' label = t('Conference date') value = whole.value.other.conference_date %] + [% PROCESS ill_text_input_field id = 'venue' label = t('Venue') value = whole.value.other.venue %] + [% PROCESS ill_text_input_field id = 'sponsor' label = t('Sponsor') value = whole.value.other.sponsor %] + [% PROCESS ill_text_input_field id = 'volume' label = t('Volume') value = whole.value.other.volume %] + [% PROCESS ill_text_input_field id = 'isbn' label = t('ISBN') value = whole.value.other.isbn %] + [% PROCESS ill_text_input_field id = 'issn' label = t('ISSN') value = whole.value.other.issn %] + [% PROCESS ill_text_input_field id = 'part_edition' label = t('Part') value = whole.value.other.part_edition %] + [% PROCESS ill_text_input_field id = 'paper_title' label = t('Paper title') value = whole.value.other.paper_title %] + [% PROCESS ill_text_input_field id = 'paper_author' label = t('Paper author') value = whole.value.other.paper_author %] +
    +
    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/dvd.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/dvd.inc new file mode 100644 index 00000000000..380c429ee76 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/dvd.inc @@ -0,0 +1,12 @@ +
    + DVD details +
      + [% PROCESS ill_text_input_field id = 'title' label = t('Title') value = whole.value.other.title %] + [% PROCESS ill_text_input_field id = 'author' label = t('Author') value = whole.value.other.author %] + [% PROCESS ill_text_input_field id = 'studio' label = t('Studio') value = whole.value.other.studio %] + [% PROCESS ill_text_input_field id = 'genre' label = t('Genre') value = whole.value.other.genre %] + [% PROCESS ill_text_input_field id = 'year' label = t('Year') value = whole.value.other.year %] + [% PROCESS ill_text_input_field id = 'format' label = t('Format') value = whole.value.other.format %] + [% PROCESS ill_text_input_field id = 'language' label = t('Language') value = whole.value.other.language %] +
    +
    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/journal.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/journal.inc new file mode 100644 index 00000000000..80b05ddfd81 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/journal.inc @@ -0,0 +1,7 @@ +
    + Journal details +
      + [% PROCESS journal_text_input_fields %] + [% PROCESS ill_text_input_field id = 'doi' label = t('DOI') value = whole.value.other.doi %] +
    +
    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/other.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/other.inc new file mode 100644 index 00000000000..e69de29bb2d diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/resource.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/resource.inc new file mode 100644 index 00000000000..b24a76463cb --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/resource.inc @@ -0,0 +1,17 @@ +
    + Generic resource details +
      + [% PROCESS ill_text_input_field id = 'title' label = t('Title') value = whole.value.other.title %] + [% PROCESS ill_text_input_field id = 'author' label = t('Author') value = whole.value.other.author %] + [% PROCESS ill_text_input_field id = 'editor' label = t('Editor') value = whole.value.other.editor %] + [% PROCESS ill_text_input_field id = 'publisher' label = t('Publisher') value = whole.value.other.publisher %] + [% PROCESS ill_text_input_field id = 'published_place' label = t('Place of publication') value = whole.value.other.published_place %] + [% PROCESS ill_text_input_field id = 'year' label = t('Year') value = whole.value.other.year %] + [% PROCESS ill_text_input_field id = 'part_edition' label = t('Part / Edition') value = whole.value.other.part_edition %] + [% PROCESS ill_text_input_field id = 'volume' label = t('Volume') value = whole.value.other.volume %] + [% PROCESS ill_text_input_field id = 'pages' label = t('Pages') value = whole.value.other.pages %] + [% PROCESS ill_text_input_field id = 'isbn' label = t('ISBN') value = whole.value.other.isbn %] + [% PROCESS ill_text_input_field id = 'issn' label = t('ISSN') value = whole.value.other.issn %] + [% PROCESS ill_text_input_field id = 'doi' label = t('DOI') value = whole.value.other.doi %] +
    +
    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/thesis.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/thesis.inc new file mode 100644 index 00000000000..af99af03de8 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/forms/thesis.inc @@ -0,0 +1,10 @@ +
    + Thesis details +
      + [% PROCESS ill_text_input_field id = 'title' label = t('Title') value = whole.value.other.title %] + [% PROCESS ill_text_input_field id = 'author' label = t('Author') value = whole.value.other.author %] + [% PROCESS ill_text_input_field id = 'institution' label = t('Institution') value = whole.value.other.institution %] + [% PROCESS ill_text_input_field id = 'published_date' label = t('Publication date') value = whole.value.other.published_date %] + [% PROCESS ill_text_input_field id = 'doi' label = t('DOI') value = whole.value.other.doi %] +
    +
    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/shared.js b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/shared.js new file mode 100644 index 00000000000..c65fcdab401 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/inc/shared.js @@ -0,0 +1,44 @@ +var core = [ [% whole.core %] ]; +var opac = [% opac || 0 %]; +document.addEventListener('DOMContentLoaded', function() { + $('#add-new-fields').click(function(e) { + e.preventDefault(); + var row = '
  • ' + + '' + + ' ' + + ' ' + + '
  • '; + $('#standard-fields').append(row); + }); + $('#standard-fields').on('click', '.delete-new-field', + function(event) { + event.preventDefault(); + $(event.target).parent().remove(); + } + ); + $('#type').change(function() { + $('#create_form').prepend( + '' + ); + $('#create_form').submit(); + }); + $('#standard-fields').on('keyup', '.custom-name', function() { + var val = $(this).val(); + if (core.indexOf(val.toLowerCase()) > -1) { + $('#custom-warning').text(__("The name '%s' is not permitted").format(val)).show(); + $('#ill-submit').attr('disabled', true); + $('#add-new-fields').attr('disabled', true); + } else { + $('#custom-warning').hide(); + $('#ill-submit').attr('disabled', false); + $('#add-new-fields').attr('disabled', false); + } + }); +}); -- 2.49.0