From c29f57b9847518ce98971bec3b0c1d3cfb756e69 Mon Sep 17 00:00:00 2001
From: Marcel de Rooy
Date: Thu, 23 Sep 2021 13:23:44 +0000
Subject: [PATCH] Bug 29093: Interface changes
Content-Type: text/plain; charset=utf-8
Show the TOC checkbox on OPAC and staff.
Test plan:
Add new article request on OPAC or staff. Tick checkbox.
Verify if TOC is Yes on opac-user or staff patron details.
Check the list view on circ/article-requests.pl.
Signed-off-by: Marcel de Rooy
Signed-off-by: David Nind
Signed-off-by: Nick Clemens
---
circ/request-article.pl | 2 ++
.../prog/en/includes/patron-article-requests.inc | 5 +++++
.../intranet-tmpl/prog/en/modules/circ/article-requests.tt | 2 ++
.../intranet-tmpl/prog/en/modules/circ/request-article.tt | 7 +++++++
.../opac-tmpl/bootstrap/en/modules/opac-request-article.tt | 5 +++++
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 5 +++++
opac/opac-request-article.pl | 2 ++
7 files changed, 28 insertions(+)
diff --git a/circ/request-article.pl b/circ/request-article.pl
index 1c92927b82..dbe91dd52f 100755
--- a/circ/request-article.pl
+++ b/circ/request-article.pl
@@ -71,6 +71,7 @@ if ( $action eq 'create' ) {
my $chapters = $cgi->param('chapters') || undef;
my $patron_notes = $cgi->param('patron_notes') || undef;
my $format = $cgi->param('format') || undef;
+ my $toc_request = $cgi->param('toc_request');
try {
my $ar = Koha::ArticleRequest->new(
@@ -88,6 +89,7 @@ if ( $action eq 'create' ) {
chapters => $chapters,
patron_notes => $patron_notes,
format => $format,
+ toc_request => $toc_request ? 1 : 0,
}
)->request;
} catch {
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc
index b2a25a0580..f3ab76e62c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc
@@ -10,6 +10,7 @@
Volume |
Issue |
Date |
+ TOC |
Pages |
Chapters |
Notes |
@@ -55,6 +56,10 @@
[% ar.date | html %]
+
+ [% IF ar.toc_request %]Yes[% END %]
+ |
+
[% ar.pages | html %]
|
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt
index 0e4301e860..44a14123bc 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt
@@ -353,6 +353,7 @@
+ [% IF ar.toc_request %] Include TOC [% END %]
[% IF ar.title %] Title: [% ar.title | html %] [% END %]
[% IF ar.author %] Author: [% ar.author | html %] [% END %]
[% IF ar.volume %] Volume: [% ar.volume | html %] [% END %]
@@ -456,6 +457,7 @@
|
+ [% IF ar.toc_request %] Include TOC [% END %]
[% IF ar.title %] Title: [% ar.title | html %] [% END %]
[% IF ar.author %] Author: [% ar.author | html %] [% END %]
[% IF ar.volume %] Volume: [% ar.volume | html %] [% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt
index 7c2ea0fdb1..40b06282b2 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt
@@ -176,6 +176,11 @@
+
+
+
+
+
@@ -297,6 +302,7 @@
Volume |
Issue |
Date |
+ TOC |
Pages |
Chapters |
Patron notes |
@@ -316,6 +322,7 @@
[% ar.volume | html %] |
[% ar.issue | html %] |
[% ar.date | html %] |
+ [% IF ar.toc_request %]Yes[% END %] |
[% ar.pages | html %] |
[% ar.chapters | html %] |
[% ar.patron_notes | html %] |
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt
index 9dad25f038..d30d7a1197 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt
@@ -106,6 +106,11 @@
[% END %]
+
+
+
+
+
[% IF mandatory_fields.search('pages') %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
index 730400e7e1..da736d7094 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
@@ -777,6 +777,7 @@
Volume |
Issue |
Date |
+ TOC |
Pages |
Chapters |
Notes |
@@ -822,6 +823,10 @@
[% ar.date | html %]
|
+
+ [% IF ar.toc_request %]Yes[% END %]
+ |
+
[% ar.pages | html %]
|
diff --git a/opac/opac-request-article.pl b/opac/opac-request-article.pl
index b6048cc8c2..1ef7184e0b 100755
--- a/opac/opac-request-article.pl
+++ b/opac/opac-request-article.pl
@@ -62,6 +62,7 @@ if ( $action eq 'create' ) {
my $chapters = $cgi->param('chapters') || undef;
my $patron_notes = $cgi->param('patron_notes') || undef;
my $format = $cgi->param('format') || undef;
+ my $toc_request = $cgi->param('toc_request');
my $success;
@@ -82,6 +83,7 @@ if ( $action eq 'create' ) {
chapters => $chapters,
patron_notes => $patron_notes,
format => $format,
+ toc_request => $toc_request ? 1 : 0,
}
)->request;
$success = 1;
--
2.20.1