From b66458901268e6cb19585e8de3ea6adb458522fc Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 2 Dec 2020 08:55:38 +0100 Subject: [PATCH] Bug 27130: Don't display itemnumber under "File type" section There is no need to have the "File type" section when we attach a cover item to an item (we cannot upload a zip file) This patch removes the fieldset abd adds the itemnumebr to the breadcrumbs and headings. It also adjusts the help text, removing ZIP as an option when uploading for a biblio or item Lastly it adjusts the results page to use a heading to make things a bit clearer Test plan: 1 - Enable 'LocalCoverImages' system preference 2 - Browse to the details page for a record 3 - Under the 'Images' tab click 'Upload' 4 - Note the display includes File type section with a biblionuber input 5 - Upload an image and note the results page 6 - Return to the biblio, this time on the 'Holdings' tab 7 - Click the down arrow next to 'Edit' and choose 'Upload image' 8 - Note the form has a File type section with an itemnumber input 9 - Apply patch 10 - Repeat steps 2-9, making sure changes to page make sense 11 - Note the breadcrumbs have been updated 12 - Confirm you can complete the upload of the cover for an item and that results look as expected Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- .../prog/en/modules/tools/upload-images.tt | 59 +++++++++++-------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt index 592113b93c..df25880b04 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt @@ -16,10 +16,10 @@ @@ -28,10 +28,8 @@
-

Upload local cover image

- [% IF ( uploadimage ) %] -

Image upload results :

+

Image upload results :

  • [% total | html %] images found
  • [% IF ( error ) %] @@ -58,8 +56,21 @@

[% END # /IF uploadimage %] + + [% UNLESS itemnumber || biblionumber %] +

Upload local cover image

+ [% ELSIF itemnumber %] +

Upload local cover image for itemnumber: [% itemnumber | html %]

+ [% ELSIF biblionumber %] +

Upload local cover image for biblionumber: [% biblionumber | html %]

+ [% END %] +
    -
  • Select an image file or ZIP file to upload. The tool will accept images in GIF, JPEG, PNG, and XPM formats.
  • + [% UNLESS itemnumber || biblionumber %] +
  • Select an image file or ZIP file to upload. The tool will accept images in GIF, JPEG, PNG, and XPM formats.
  • + [% ELSE %] +
  • Select an image file to upload. The tool will accept images in GIF, JPEG, PNG, and XPM formats.
  • + [% END %]
@@ -88,15 +99,13 @@
-
- - - -
-
- File type -
    - [% UNLESS itemnumber %] + + + + [% UNLESS itemnumber || biblionumber %] +
    + File type +
    1. [% IF (filetype != 'image' ) %] @@ -122,13 +131,15 @@
    2. - [% ELSE %] - - - - [% END %] -
    -
    +
+
+ [% ELSIF itemnumber %] + + + [% ELSIF biblionumber %] + + + [% END %]
Options
    -- 2.39.5