Bug 25025 - Drag-and-drop cover image upload
Summary: Drag-and-drop cover image upload
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 25941
Blocks:
  Show dependency treegraph
 
Reported: 2020-03-31 13:52 UTC by Owen Leonard
Modified: 2022-03-04 12:58 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 25025: Drag-and-drop cover image upload (36.59 KB, patch)
2021-08-13 13:30 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25025: Drag-and-drop cover image upload (38.89 KB, patch)
2022-02-15 17:40 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25025: Drag-and-drop cover image upload (39.04 KB, patch)
2022-02-16 16:16 UTC, Solene D
Details | Diff | Splinter Review
Bug 25025: Drag-and-drop cover image upload (39.09 KB, patch)
2022-02-19 20:27 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2020-03-31 13:52:50 UTC
It would be really nice if the process for adding a local cover image to a title was a simple as dragging the image file into the local cover images tab on the bibliographic detail page.
Comment 1 Owen Leonard 2021-08-13 13:30:01 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2021-08-13 13:41:20 UTC
(In reply to Owen Leonard from comment #0)
> dragging the image file into the local cover images
> tab on the bibliographic detail page.

This patch doesn't do this (you still have to go to the "Upload local cover images" page), but it lays the framework for making it possible.

I'm putting it back to ASSIGNED because there is a problem with the way the page displays item information when you upload an image at the item level.
Comment 3 Owen Leonard 2022-02-15 17:40:22 UTC Comment hidden (obsolete)
Comment 4 Solene D 2022-02-16 16:16:12 UTC Comment hidden (obsolete)
Comment 5 Solene D 2022-02-16 16:18:32 UTC
Executed the test, everything is working for me
Comment 6 Katrin Fischer 2022-02-19 20:27:07 UTC
Created attachment 130912 [details] [review]
Bug 25025: Drag-and-drop cover image upload

This patch updates the Upload local cover image page so that the user
has the option of dragging a file from a folder on their computer
instead of using a file upload button.

The patch also adds a preview of uploaded single images and display of
existing images on the record you're adding to.

To test, apply the patch and make sure the LocalCoverImages system
preference is enabled.

- Go to Tools -> Upload local cover image and test the following
  processes:

- Upload single cover image, specifying a biblionumber
  - Test dragging an image from a file on your computer
  - Test clicking the "Drop files here or click..." link.
    - You should see a preview of the image file on the screen, with
      information about the file: file name, image type, file size.
      - Click "Process images"
        - with "Existing covers will be replaced" checked
        - with "Existing covers will be replaced" unchecked

  When the upload process completes you should see information about the
  title in the page heading and a thumbnail of the cover in the sidebar.
  - Test that the image can be deleted from this page. You should be
    redirected back to this page with the same title still selected.

- Upload a zip file of images
  - Test dragging an image from a file on your computer
  - Test clicking the "Drop files here or click..." link.
    - A zip file can't be previewed onscreen but you should see the same
      file information and a Font Awesome "zip file" icon.
      - Click "Process images"

From the bibliographic detail page, click the "Images" tab, and click
"Upload." With this workflow the field asking for a biblionumber should
not appear.

From the bibliographic detail page, in the holdings table, choose Edit
-> Upload image. This process should be the same as above but should
provide item information on the screen. Confirm that images are uploaded
correctly to the specific item.

Test with AllowMultipleCovers enabled and disabled to confirm that the
"Existing covers will be replaced" checkbox is enabled only when
multiple covers are possible.

Signed-off-by: Solène Desvaux <solene.desvaux@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2022-02-19 20:27:29 UTC
This is a really nice update to the feature!
Comment 8 Fridolin Somers 2022-03-02 08:48:28 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄