From 9f60c739f309c86b0cd4ee67042c9ff33960c7dd 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 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 Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- circ/request-article.pl | 2 ++ .../en/includes/patron-article-requests.inc | 3 ++ .../prog/en/modules/circ/article-requests.tt | 4 +++ .../prog/en/modules/circ/request-article.tt | 23 +++++++++++++++ .../en/modules/opac-request-article.tt | 29 +++++++++++++++++++ .../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 48b1d02e56..fdbd74a525 100755 --- a/circ/request-article.pl +++ b/circ/request-article.pl @@ -66,6 +66,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( { @@ -81,6 +82,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 25279adfc8..b2a25a0580 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 286db72985..8cf05a2d5f 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 @@ -127,6 +127,7 @@ Copy number Enumeration Barcode + Format Patron Date Actions @@ -191,6 +192,7 @@ [% ar.item.copynumber | html %] [% ar.item.enumchron | html %] [% ar.item.barcode | html %] + [% IF ar.format == 'PHOTOCOPY' %]Copy[% ELSIF ar.format == 'SCAN' %]Scan[% END %]

@@ -228,6 +230,7 @@ Copy number Enumeration Barcode + Format Patron Date Actions @@ -290,6 +293,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 e59703482e..8d452ea0a2 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 @@ -143,6 +143,14 @@ +

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