From 8c6281f9856c7a08e86410f6d309d5788c937759 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
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
Signed-off-by: Jonathan Druart
---
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 a22325e785..7133512853 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
@@ -12,6 +12,7 @@
Volume |
Issue |
Date |
+ TOC |
Pages |
Chapters |
Notes |
@@ -57,6 +58,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 5ab9d5a079..56536b9fbd 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
@@ -177,6 +177,11 @@
+
+
+
+
+
@@ -299,6 +304,7 @@
Volume |
Issue |
Date |
+ TOC |
Pages |
Chapters |
Patron notes |
@@ -318,6 +324,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 dd646b4866..e51eb1bd66 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
@@ -114,6 +114,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 3c6bb1206d..1a383f7551 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.39.5