From dd4caf70c00db061181f6dea0661f9cef18185e4 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 3 Apr 2018 16:19:13 +0200 Subject: [PATCH] Bug 20472: Add format field to the interface Content-Type: text/plain; charset=utf-8 We need to add the format to the forms entering new requests: opac/opac-request-article circ/request-article If the pref contains multiple formats like SCAN|PHOTOCOPY, the first listed format will be preselected on the request form. If there is only one option, we should not disable the select however. (Possibly hide it.) If we have no mandatory fields, we should not allow the submit of a complete empty form (check on OPAC). And we need to show the format of pending requests on forms: opac/opac-user circ/request-article (biblio detail tab) circ/article-requests (staff form to handle requests) members/moremember (Article requests tab at the bottom) circ/circulation (Checkout/Article requests tab) Note: The last two forms use the same include file. Test plan: [1] Add an article request via opac or staff. Choose Scan. [2] Verify that you see the Scan format on opac-user and the above-mentioned staff forms. Signed-off-by: Marcel de Rooy --- circ/request-article.pl | 2 ++ .../prog/en/includes/patron-article-requests.inc | 3 +++ .../prog/en/modules/circ/article-requests.tt | 4 +++ .../prog/en/modules/circ/request-article.tt | 23 +++++++++++++++++ .../bootstrap/en/modules/opac-request-article.tt | 29 ++++++++++++++++++++++ .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 3 +++ opac/opac-request-article.pl | 2 ++ 7 files changed, 66 insertions(+) diff --git a/circ/request-article.pl b/circ/request-article.pl index 7c0877bff8..639d30a769 100755 --- a/circ/request-article.pl +++ b/circ/request-article.pl @@ -67,6 +67,7 @@ if ( $action eq 'create' ) { my $pages = $cgi->param('pages') || undef; my $chapters = $cgi->param('chapters') || undef; my $patron_notes = $cgi->param('patron_notes') || undef; + my $format = $cgi->param('format') || undef; my $ar = Koha::ArticleRequest->new( { @@ -82,6 +83,7 @@ if ( $action eq 'create' ) { pages => $pages, chapters => $chapters, patron_notes => $patron_notes, + format => $format, } )->store(); 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 dca996ef96..6f785ff444 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 @@ -13,6 +13,7 @@ Pages Chapters Notes + Format Status Pickup library @@ -66,6 +67,8 @@ [% ar.patron_notes | html %] + [% IF ar.format == 'PHOTOCOPY' %]Copy[% ELSIF ar.format == 'SCAN' %]Scan[% END %] + [% IF ar.status == 'PENDING' %] Pending 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 d72c728cf4..9d56c848f1 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 @@ -118,6 +118,7 @@ Copy number Enumeration Barcode + Format Patron Date Actions @@ -188,6 +189,7 @@ [% ar.item.copynumber | html %] [% ar.item.enumchron | html %] [% ar.item.barcode | html %] + [% IF ar.format == 'PHOTOCOPY' %]Copy[% ELSIF ar.format == 'SCAN' %]Scan[% END %]

@@ -225,6 +227,7 @@ Copy number Enumeration Barcode + Format Patron Date Actions @@ -295,6 +298,7 @@ [% ar.item.copynumber | html %] [% ar.item.enumchron | html %] [% ar.item.barcode | html %] + [% IF ar.format == 'PHOTOCOPY' %]Copy[% ELSIF ar.format == 'SCAN' %]Scan[% 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 e2257fc8e5..aa13b85960 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 @@ -133,6 +133,14 @@

  • + + +
  • + +
  • + + + +
  • + +