From ca9ea52eb82a780e0a5c4490a7573581f6e9911e 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 66d042b4e5..ede14d5b88 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 80c7a46e30..0488931441 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 @@ -120,6 +120,7 @@ Copy number Enumeration Barcode + Format Patron Date Actions @@ -184,6 +185,7 @@ [% ar.item.copynumber | html %] [% ar.item.enumchron | html %] [% ar.item.barcode | html %] + [% IF ar.format == 'PHOTOCOPY' %]Copy[% ELSIF ar.format == 'SCAN' %]Scan[% END %]

@@ -221,6 +223,7 @@ Copy number Enumeration Barcode + Format Patron Date Actions @@ -283,6 +286,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 de929cbc2f..a5656e3a17 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 @@

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