Bugzilla – Attachment 110310 Details for
Bug 25941
Reindent Upload local cover image page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25941: Reindent Upload local cover image page
Bug-25941-Reindent-Upload-local-cover-image-page.patch (text/plain), 14.05 KB, created by
David Nind
on 2020-09-18 03:06:52 UTC
(
hide
)
Description:
Bug 25941: Reindent Upload local cover image page
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-09-18 03:06:52 UTC
Size:
14.05 KB
patch
obsolete
>From 316471824dc80bd5bd82ea23ced09dcc0fc0d871 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../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 @@ > </head> > > <body id="tools_upload-images" class="tools"> >-[% INCLUDE 'header.inc' %] >-[% INCLUDE 'cat-search.inc' %] >- >-<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[% END %]</div> >- >-<div class="main container-fluid"> >- <div class="row"> >- <div class="col-sm-10 col-sm-push-2"> >- <main> >- >-<h1>Upload local cover image</h1> >-[% IF ( uploadimage ) %] >-<p>Image upload results :</p> >-<ul> >- <li>[% total | html %] images found</li> >- [% IF ( error ) %] >- <div class="dialog alert"> >- [% IF ( error == 'UZIPFAIL' ) %]<p><b>Failed to unzip archive.<br />Please ensure you are uploading a valid zip file and try again.</b></p> >- [% ELSIF ( error == 'OPNLINK' ) %]<p><b>Cannot open folder index (idlink.txt or datalink.txt) to read.<br />Please verify that it exists.</b></p> >- [% ELSIF ( error == 'OPNIMG' ) %]<p><b>Cannot process file as an image.<br />Please ensure you only upload GIF, JPEG, PNG, or XPM images.</b></p> >- [% ELSIF ( error == 'DELERR' ) %]<p><b>Unrecognized or missing field delimiter.<br />Please verify that you are using either a single quote or a tab.</b></p> >- [% ELSIF ( error == 'DBERR' ) %]<p><b>Unable to save image to database.</b></p> >- [% ELSE %]<p><b>An unknown error has occurred.<br />Please review the error log for more details.</b></p>[% END %] >- </div> >- </li> >- [% END %] >- <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">View final record</a></li> >- <li><a href="/cgi-bin/koha/tools/tools-home.pl">Back</a></li> >-</ul> >-<hr /> >-[% 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> >-</ul> >-<form method="post" action="/cgi-bin/koha/tools/upload-cover-image.pl" id="uploadfile" enctype="multipart/form-data"> >-<fieldset class="rows" > >-<legend>Upload images</legend> >-<ol> >- <li> >- <div id="fileuploadform"> >- <label for="fileToUpload" class="required">Select the file to upload: </label> >- <input type="file" id="fileToUpload" name="fileToUpload" required="required" class="required" /> >- <span class="required">Required</span> >- </div> </li> >-</ol> >- <fieldset class="action"><button class="submit btn btn-default">Upload file</button></fieldset> >-</fieldset> >- >- <div id="uploadpanel"> >- <div id="fileuploadstatus" class="progress_panel">Upload progress: >- <progress max="100" value="0" id="fileuploadprogress"> >- </progress> >- <span class="fileuploadpercent">0</span>% >- </div> >- <div id="fileuploadfailed"></div> >+ [% INCLUDE 'header.inc' %] >+ [% INCLUDE 'cat-search.inc' %] >+ >+ <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 >+ [% END %] > </div> >-</form> >- >- <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> >- <li class="radio"> >- [% IF (filetype != 'image' ) %]<input type="radio" id="zipfile" name="filetype" value="zip" checked="checked" />[% ELSE %]<input type="radio" id="zipfile" name="filetype" value="zip" />[% END %] >- <label for="zipfile">ZIP file</label> >- </li> >- <li class="radio"> >- [% IF (filetype == 'image' ) %]<input type="radio" id="image" name="filetype" value="image" checked="checked" />[% ELSE %]<input type="radio" id="image" name="filetype" value="image" />[% END %] >- <label for="image">Image file</label> >- </li> >- <li class="radio"> >- [% IF ( filetype == 'image' ) %]<span id="bibnum">[% ELSE %]<span id="bibnum" style="display: none">[% END %]<label for="biblionumber">Enter cover biblionumber: </label><input type="text" id="biblionumber" name="biblionumber" value="[% biblionumber | html %]" size="15" /></span> >- </li> >- </ol> >- </fieldset> >- <fieldset class="rows"> >- <legend>Options</legend> >- <ol> >- <li class="checkbox"> >- [% IF AllowMultipleCovers == 0 %]<input type="checkbox" id="replace" name="replace" checked="checked" disabled="disabled" value="1" />[% ELSE %]<input type="checkbox" id="replace" name="replace" value="1" />[% END %] >- <label for="replace">Replace existing covers</label> >- </li> >- </ol> >- </fieldset> >- <fieldset class="action"><button type="submit" class="btn btn-default btn-sm">Process images</button></fieldset> >-</form> >+ >+ <div class="main container-fluid"> >+ <div class="row"> >+ <div class="col-sm-10 col-sm-push-2"> >+ <main> >+ >+ <h2>Upload local cover image</h2> >+ >+ [% IF ( uploadimage ) %] >+ <h3>Image upload results :</h3> >+ [% IF ( error ) %] >+ <div class="dialog alert"> >+ [% IF ( error == 'UZIPFAIL' ) %] >+ <p><b>Failed to unzip archive.<br />Please ensure you are uploading a valid zip file and try again.</b></p> >+ [% ELSIF ( error == 'OPNLINK' ) %] >+ <p><b>Cannot open folder index (idlink.txt or datalink.txt) to read.<br />Please verify that it exists.</b></p> >+ [% ELSIF ( error == 'OPNIMG' ) %] >+ <p><b>Cannot process file as an image.<br />Please ensure you only upload GIF, JPEG, PNG, or XPM images.</b></p> >+ [% ELSIF ( error == 'DELERR' ) %] >+ <p><b>Unrecognized or missing field delimiter.<br />Please verify that you are using either a single quote or a tab.</b></p> >+ [% ELSIF ( error == 'DBERR' ) %] >+ <p><b>Unable to save image to database.</b></p> >+ [% ELSE %] >+ <p><b>An unknown error has occurred.<br />Please review the error log for more details.</b></p> >+ [% END %] >+ </div> >+ [% END %] >+ <ul> >+ <li>[% total | html %] images found</li> >+ <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">View final record</a></li> >+ <li><a href="/cgi-bin/koha/tools/tools-home.pl">Back</a></li> >+ </ul> >+ <hr /> >+ [% END %] >+ >+ <p>Select an image file or ZIP file to upload. The tool will accept images in GIF, JPEG, PNG, and XPM formats.</p> >+ >+ <form method="post" action="/cgi-bin/koha/tools/upload-cover-image.pl" id="uploadfile" enctype="multipart/form-data"> >+ <fieldset class="rows" > >+ <legend>Upload images</legend> >+ <ol> >+ <li> >+ <div id="fileuploadform"> >+ <label for="fileToUpload" class="required">Select the file to upload: </label> >+ <input type="file" id="fileToUpload" name="fileToUpload" required="required" class="required" /> >+ <span class="required">Required</span> >+ </div> >+ </li> >+ </ol> >+ <fieldset class="action"> >+ <button class="submit btn btn-default">Upload file</button> >+ </fieldset> >+ </fieldset> >+ >+ <div id="uploadpanel"> >+ <div id="fileuploadstatus" class="progress_panel">Upload progress: >+ <progress max="100" value="0" id="fileuploadprogress"></progress> >+ <span class="fileuploadpercent">0</span>% >+ </div> >+ <div id="fileuploadfailed"></div> >+ </div> >+ </form> >+ >+ <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="" /> >+ >+ <legend>File type</legend> >+ <ol> >+ <li class="radio"> >+ [% IF (filetype != 'image' ) %] >+ <input type="radio" id="zipfile" name="filetype" value="zip" checked="checked" /> >+ [% ELSE %] >+ <input type="radio" id="zipfile" name="filetype" value="zip" /> >+ [% END %] >+ <label for="zipfile">ZIP file</label> >+ </li> >+ <li class="radio"> >+ [% IF (filetype == 'image' ) %] >+ <input type="radio" id="image" name="filetype" value="image" checked="checked" /> >+ [% ELSE %] >+ <input type="radio" id="image" name="filetype" value="image" /> >+ [% END %] >+ <label for="image">Image file</label> >+ </li> >+ <li class="radio"> >+ [% IF ( filetype == 'image' ) %] >+ <span id="bibnum"> >+ [% ELSE %] >+ <span id="bibnum" style="display: none"> >+ [% END %] >+ <label for="biblionumber">Enter cover biblionumber: </label> >+ <input type="text" id="biblionumber" name="biblionumber" value="[% biblionumber | html %]" size="15" /> >+ </span> >+ </li> >+ </ol> >+ </fieldset> >+ >+ <fieldset class="rows"> >+ <legend>Options</legend> >+ <ol> >+ <li class="checkbox"> >+ [% IF AllowMultipleCovers == 0 %] >+ <input type="checkbox" id="replace" name="replace" checked="checked" disabled="disabled" value="1" /> >+ [% ELSE %] >+ <input type="checkbox" id="replace" name="replace" value="1" /> >+ [% END %] >+ <label for="replace">Replace existing covers</label> >+ </li> >+ </ol> >+ </fieldset> >+ >+ <fieldset class="action"> >+ <button type="submit" class="btn btn-default btn-sm">Process images</button> >+ </fieldset> >+ </form> > > </main> > </div> <!-- /.col-sm-10.col-sm-push-2 --> >@@ -110,7 +149,7 @@ > [% INCLUDE 'tools-menu.inc' %] > </aside> > </div> <!-- /.col-sm-2.col-sm-pull-10 --> >- </div> <!-- /.row --> >+ </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/tools-menu.js") | $raw %] >-- >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 25941
:
106603
|
106604
|
110310
|
110311
|
110447
|
112003
|
112004
|
112374
|
112375
|
112429
|
112430