When adding a local cover image at item level, after file upload there is a section 'File type'. This is for multiple files upload into a zip for biblio level. Not sure how to fix this.
Created attachment 114084 [details] [review] 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 legend of the fieldset. Test plan: Attach a cover image to an image, then to a bibliographic record. Notice the change and confirm it makes sense.
When attaching a cover image to an item, form has a <ol> without <li> : <fieldset class="rows"> <ol> <label for="itemnumber">Cover itemnumber: </label> <input type="text" id="itemnumber" name="itemnumber" value="108" size="15" readonly="readonly"> <input type="hidden" name="filetype" value="image"> </ol> add a <li> ?
Created attachment 114102 [details] [review] 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 legend of the fieldset. Test plan: Attach a cover image to an image, then to a bibliographic record. Notice the change and confirm it makes sense.
Created attachment 114103 [details] [review] 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 legend of the fieldset. Test plan: Attach a cover image to an image, then to a bibliographic record. Notice the change and confirm it makes sense. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Created attachment 114104 [details] [review] 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 legend of the fieldset. Test plan: Attach a cover image to an item, then to a bibliographic record. Notice the change and confirm it makes sense. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
I don't think this makes things much better - why do we have an itemnumber that we cannot edit? It would be better to have that in the breadcrumbs or page title, no? Also, it seems the code for supporting multiple image uploads (zip file) has references to itemnumber, but never actually receive/calculate it. In my opinion the bug is that one cannot choose a zip file to upload item covers. When attaching a cover to the biblio we actually can edit the biblionumber, which seems like a bad idea, but we should at least be consistent
(In reply to Nick Clemens from comment #6) > I don't think this makes things much better - why do we have an itemnumber > that we cannot edit? It would be better to have that in the breadcrumbs or > page title, no? I don't understand what you mean. When I upload a cover image for an item I am at /cgi-bin/koha/tools/upload-cover-image.pl?itemnumber=37&filetype=image I don't see any info about the biblio or the item. Are you suggesting we should add them on this view? > Also, it seems the code for supporting multiple image uploads (zip file) has > references to itemnumber, but never actually receive/calculate it. > > In my opinion the bug is that one cannot choose a zip file to upload item > covers. Yes, it's a limitation from bug 26145. We could eventually implement it but it's not the point of this bug report. > When attaching a cover to the biblio we actually can edit the biblionumber, > which seems like a bad idea, but we should at least be consistent Indeed, we could remove the readonly attribute.
Created attachment 114888 [details] [review] 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
Created attachment 114889 [details] After original patch The form now includes a disabled itemnumber input
(In reply to Jonathan Druart from comment #7) > I don't understand what you mean. > When I upload a cover image for an item I am at > /cgi-bin/koha/tools/upload-cover-image.pl?itemnumber=37&filetype=image > > I don't see any info about the biblio or the item. Are you suggesting we > should add them on this view? I attached an image and an alternate patch that removes the fieldset all together and moves the info
both patches are identical :)
Created attachment 114890 [details] [review] 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
(In reply to Jonathan Druart from comment #11) > both patches are identical :) Heh, 'git commit --amend' != 'git commit --amend -a'
Nick, that's not possible to completely hide the input. If you are coming from the tools module you need to pass the biblionumber Home › Tools › Upload local cover image
(In reply to Jonathan Druart from comment #14) > Nick, that's not possible to completely hide the input. > If you are coming from the tools module you need to pass the biblionumber > > Home › Tools › Upload local cover image I don't hide the input when coming from tools - upload a file - select 'Image file' as type, and the biblionumber input appears - maybe I misunderstand?
Created attachment 114917 [details] [review] 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 <jonathan.druart@bugs.koha-community.org>
That's me, the behaviour is great with your patch, thanks!
Created attachment 115014 [details] [review] 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 <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Much better and works as expected, no regressions found. Passing QA
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.02
Missing dependency, not backported to 20.05