Bugzilla – Attachment 114890 Details for
Bug 27130
Adding local cover image at item level shows 'File type' section
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27130: [alternate] Don't display itemnumber under "File type" section
Bug-27130-alternate-Dont-display-itemnumber-under-.patch (text/plain), 7.00 KB, created by
Nick Clemens (kidclamp)
on 2021-01-06 13:44:11 UTC
(
hide
)
Description:
Bug 27130: [alternate] Don't display itemnumber under "File type" section
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-01-06 13:44:11 UTC
Size:
7.00 KB
patch
obsolete
>From 08e8c8d35b2abe35dc4eee370640d194db94d29a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 2 Dec 2020 08:55:38 +0100 >Subject: [PATCH] Bug 27130: [alternate] 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 >--- > .../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 @@ > <div id="breadcrumbs"> > <a href="/cgi-bin/koha/mainpage.pl">Home</a> › > <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › >- [% IF ( uploadimage ) %] >- <a href="/cgi-bin/koha/tools/upload-cover-image.pl">Upload local cover image</a> › Upload results >- [% ELSE %] >- Upload local cover image >+ <a href="/cgi-bin/koha/tools/upload-cover-image.pl">Upload local cover image</a> >+ [% IF ( uploadimage ) %] › Upload results >+ [% ELSIF itemnumber %] › Upload cover for itemnumber: [% itemnumber | html %] >+ [% ELSIF biblionumber %] › Upload cover for biblionumber: [% biblionumber | html %] > [% END %] > </div> > >@@ -28,10 +28,8 @@ > <div class="col-sm-10 col-sm-push-2"> > <main> > >- <h1>Upload local cover image</h1> >- > [% IF ( uploadimage ) %] >- <p>Image upload results :</p> >+ <h1>Image upload results :</h1> > <ul> > <li>[% total | html %] images found</li> > [% IF ( error ) %] >@@ -58,8 +56,21 @@ > </ul> > <hr /> > [% END # /IF uploadimage %] >+ >+ [% UNLESS itemnumber || biblionumber %] >+ <h1>Upload local cover image</h1> >+ [% ELSIF itemnumber %] >+ <h1>Upload local cover image for itemnumber: [% itemnumber | html %]</h1> >+ [% ELSIF biblionumber %] >+ <h1>Upload local cover image for biblionumber: [% biblionumber | html %]</h1> >+ [% END %] >+ > <ul> >- <li>Select an image file or ZIP file to upload. The tool will accept images in GIF, JPEG, PNG, and XPM formats.</li> >+ [% UNLESS itemnumber || biblionumber %] >+ <li>Select an image file or ZIP file to upload. The tool will accept images in GIF, JPEG, PNG, and XPM formats.</li> >+ [% ELSE %] >+ <li>Select an image file to upload. The tool will accept images in GIF, JPEG, PNG, and XPM formats.</li> >+ [% END %] > </ul> > > <form method="post" action="/cgi-bin/koha/tools/upload-cover-image.pl" id="uploadfile" enctype="multipart/form-data"> >@@ -88,15 +99,13 @@ > </form> <!-- /#uploadfile --> > > <form method="post" id="processfile" action="/cgi-bin/koha/tools/upload-cover-image.pl" enctype="multipart/form-data"> >- <fieldset class="rows"> >- <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" /> >- <input type="hidden" name="runinbackground" id="runinbackground" value="" /> >- <input type="hidden" name="completedJobID" id="completedJobID" value="" /> >- </fieldset> >- <fieldset class="rows"> >- <legend>File type</legend> >- <ol> >- [% UNLESS itemnumber %] >+ <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" /> >+ <input type="hidden" name="runinbackground" id="runinbackground" value="" /> >+ <input type="hidden" name="completedJobID" id="completedJobID" value="" /> >+ [% UNLESS itemnumber || biblionumber %] >+ <fieldset class="rows"> >+ <legend>File type</legend> >+ <ol> > <li class="radio"> > [% IF (filetype != 'image' ) %] > <input type="radio" id="zipfile" name="filetype" value="zip" checked="checked" /> >@@ -122,13 +131,15 @@ > <label for="biblionumber">Enter cover biblionumber: </label> > <input type="text" id="biblionumber" name="biblionumber" value="[% biblionumber | html %]" size="15" /></span> > </li> >- [% ELSE %] >- <label for="itemnumber">Cover itemnumber: </label> >- <input type="text" id="itemnumber" name="itemnumber" value="[% itemnumber | html %]" size="15" readonly="readonly" /> >- <input type="hidden" name="filetype" value="image" /> >- [% END %] >- </ol> >- </fieldset> >+ </ol> >+ </fieldset> >+ [% ELSIF itemnumber %] >+ <input type="hidden" id="itemnumber" name="itemnumber" value="[% itemnumber | html %]" /> >+ <input type="hidden" name="filetype" value="image" /> >+ [% ELSIF biblionumber %] >+ <input type="hidden" id="biblionumber" name="biblionumber" value="[% biblionumber | html %]" /> >+ <input type="hidden" name="filetype" value="image" /> >+ [% END %] > <fieldset class="rows"> > <legend>Options</legend> > <ol> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27130
:
114084
|
114102
|
114103
|
114104
|
114888
|
114889
|
114890
|
114917
|
115014