From 9f2481c66da281089795db09bfe384dda3ef8795 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 29 Jun 2020 17:52:16 +0000 Subject: [PATCH] Bug 25941: Reindent Upload local cover image page This patch reindents the "Upload local cover image" template to make indentation consistent. Some lines have been split up. Some markup inconsistencies have been corrected. To test, apply the patch and enable the LocalCoverImages system preference. - Go to Tools -> Upload local cover image. - Test uploading single images or ZIP files of images. - Confirm that everything works as expected. Use your preferred method for checking the differences between files while ignoring whitespace. I use diff with the "-w" flag, but I'm not some kind of diff deity. The only changes you see should be split lines. --- .../prog/en/modules/tools/upload-images.tt | 221 ++++++++++++--------- 1 file changed, 130 insertions(+), 91 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 ac771fd61e..195529da08 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 @@ -10,97 +10,136 @@ -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] - - - -
-
-
-
- -

Upload local cover image

-[% IF ( uploadimage ) %] -

Image upload results :

-
    -
  • [% total | html %] images found
  • - [% IF ( error ) %] -
    - [% IF ( error == 'UZIPFAIL' ) %]

    Failed to unzip archive.
    Please ensure you are uploading a valid zip file and try again.

    - [% ELSIF ( error == 'OPNLINK' ) %]

    Cannot open folder index (idlink.txt or datalink.txt) to read.
    Please verify that it exists.

    - [% ELSIF ( error == 'OPNIMG' ) %]

    Cannot process file as an image.
    Please ensure you only upload GIF, JPEG, PNG, or XPM images.

    - [% ELSIF ( error == 'DELERR' ) %]

    Unrecognized or missing field delimiter.
    Please verify that you are using either a single quote or a tab.

    - [% ELSIF ( error == 'DBERR' ) %]

    Unable to save image to database.

    - [% ELSE %]

    An unknown error has occurred.
    Please review the error log for more details.

    [% END %] -
    - - [% END %] -
  • View final record
  • -
  • Back
  • -
-
-[% END %] -
    -
  • Select an image file or ZIP file to upload. The tool will accept images in GIF, JPEG, PNG, and XPM formats.
  • -
-
-
-Upload images -
    -
  1. -
    - - - Required -
  2. -
-
-
- -
-
Upload progress: - - - 0% -
-
+ [% INCLUDE 'header.inc' %] + [% INCLUDE 'cat-search.inc' %] + + - - -
-
- - - -
-
- File type -
    -
  1. - [% IF (filetype != 'image' ) %][% ELSE %][% END %] - -
  2. -
  3. - [% IF (filetype == 'image' ) %][% ELSE %][% END %] - -
  4. -
  5. - [% IF ( filetype == 'image' ) %][% ELSE %] -
  6. -
-
-
- Options -
    -
  1. - [% IF AllowMultipleCovers == 0 %][% ELSE %][% END %] - -
  2. -
-
-
-
+ +
+
+
+
+ +

Upload local cover image

+ + [% IF ( uploadimage ) %] +

Image upload results :

+ [% IF ( error ) %] +
+ [% IF ( error == 'UZIPFAIL' ) %] +

Failed to unzip archive.
Please ensure you are uploading a valid zip file and try again.

+ [% ELSIF ( error == 'OPNLINK' ) %] +

Cannot open folder index (idlink.txt or datalink.txt) to read.
Please verify that it exists.

+ [% ELSIF ( error == 'OPNIMG' ) %] +

Cannot process file as an image.
Please ensure you only upload GIF, JPEG, PNG, or XPM images.

+ [% ELSIF ( error == 'DELERR' ) %] +

Unrecognized or missing field delimiter.
Please verify that you are using either a single quote or a tab.

+ [% ELSIF ( error == 'DBERR' ) %] +

Unable to save image to database.

+ [% ELSE %] +

An unknown error has occurred.
Please review the error log for more details.

+ [% END %] +
+ [% END %] + +
+ [% END %] + +

Select an image file or ZIP file to upload. The tool will accept images in GIF, JPEG, PNG, and XPM formats.

+ +
+
+ Upload images +
    +
  1. +
    + + + Required +
    +
  2. +
+
+ +
+
+ +
+
Upload progress: + + 0% +
+
+
+
+ +
+
+ + + + + File type +
    +
  1. + [% IF (filetype != 'image' ) %] + + [% ELSE %] + + [% END %] + +
  2. +
  3. + [% IF (filetype == 'image' ) %] + + [% ELSE %] + + [% END %] + +
  4. +
  5. + [% IF ( filetype == 'image' ) %] + + [% ELSE %] + +
  6. +
+
+ +
+ Options +
    +
  1. + [% IF AllowMultipleCovers == 0 %] + + [% ELSE %] + + [% END %] + +
  2. +
+
+ +
+ +
+
@@ -110,7 +149,7 @@ [% INCLUDE 'tools-menu.inc' %]
-
+
[% MACRO jsinclude BLOCK %] [% Asset.js("js/tools-menu.js") | $raw %] -- 2.11.0