Bug 28825 - Can't edit local cover image for item from details page
Summary: Can't edit local cover image for item from details page
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 28179
Blocks:
  Show dependency treegraph
 
Reported: 2021-08-06 16:47 UTC by Owen Leonard
Modified: 2021-08-13 20:22 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.03


Attachments
Bug 28825: Can't edit local cover image for item from details page (2.54 KB, patch)
2021-08-06 17:18 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28825: Can't edit local cover image for item from details page (2.59 KB, patch)
2021-08-08 18:14 UTC, David Nind
Details | Diff | Splinter Review
Bug 28825: Can't edit local cover image for item from details page (2.66 KB, patch)
2021-08-10 09:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28825: Can't edit local cover image for item from details page (2.64 KB, patch)
2021-08-10 09:48 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 2021-08-06 16:47:55 UTC
When viewing the details of a bibliographic record which has an item with a local cover image, clicking the image in the holdings table triggers a lightbox view of the cover. The footer of the lightbox modal contains a link: "Local cover image (edit)"

This edit link does not work. It works correctly if you're viewing a local cover image attached at the bibliographic level.
Comment 1 Owen Leonard 2021-08-06 17:18:32 UTC
Created attachment 123584 [details] [review]
Bug 28825: Can't edit local cover image for item from details page

This patch corrects the markup for local cover images attached to items.
The correction allows correct display of an "edit" link when the user
clicks an item's cover image and views it in the lightbox-style modal.

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

- View the details of a bibliographic record in the catalog which has
  items attached..
- In the table of holdings, click Edit -> Upload image.
- Upload an image for the item and return to the bibliographic detail
  page.
- Your image should now be displayed in the holdings table.
- Click the image to view it.
- In the footer of the modal there is an edit link: "Local cover image
  (edit). Before this patch the edit link would lead to a missing page.
  After applying the patch the link should take you to the "Image view"
  where you have the option of deleting the image or uploading another
  one.
Comment 2 David Nind 2021-08-08 18:14:35 UTC
Created attachment 123600 [details] [review]
Bug 28825: Can't edit local cover image for item from details page

This patch corrects the markup for local cover images attached to items.
The correction allows correct display of an "edit" link when the user
clicks an item's cover image and views it in the lightbox-style modal.

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

- View the details of a bibliographic record in the catalog which has
  items attached..
- In the table of holdings, click Edit -> Upload image.
- Upload an image for the item and return to the bibliographic detail
  page.
- Your image should now be displayed in the holdings table.
- Click the image to view it.
- In the footer of the modal there is an edit link: "Local cover image
  (edit). Before this patch the edit link would lead to a missing page.
  After applying the patch the link should take you to the "Image view"
  where you have the option of deleting the image or uploading another
  one.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2021-08-10 09:46:52 UTC
Created attachment 123663 [details] [review]
Bug 28825: Can't edit local cover image for item from details page

This patch corrects the markup for local cover images attached to items.
The correction allows correct display of an "edit" link when the user
clicks an item's cover image and views it in the lightbox-style modal.

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

- View the details of a bibliographic record in the catalog which has
  items attached..
- In the table of holdings, click Edit -> Upload image.
- Upload an image for the item and return to the bibliographic detail
  page.
- Your image should now be displayed in the holdings table.
- Click the image to view it.
- In the footer of the modal there is an edit link: "Local cover image
  (edit). Before this patch the edit link would lead to a missing page.
  After applying the patch the link should take you to the "Image view"
  where you have the option of deleting the image or uploading another
  one.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Katrin Fischer 2021-08-10 09:48:36 UTC
Created attachment 123664 [details] [review]
Bug 28825: Can't edit local cover image for item from details page

This patch corrects the markup for local cover images attached to items.
The correction allows correct display of an "edit" link when the user
clicks an item's cover image and views it in the lightbox-style modal.

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

- View the details of a bibliographic record in the catalog which has
  items attached..
- In the table of holdings, click Edit -> Upload image.
- Upload an image for the item and return to the bibliographic detail
  page.
- Your image should now be displayed in the holdings table.
- Click the image to view it.
- In the footer of the modal there is an edit link: "Local cover image
  (edit). Before this patch the edit link would lead to a missing page.
  After applying the patch the link should take you to the "Image view"
  where you have the option of deleting the image or uploading another
  one.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2021-08-11 11:24:25 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Kyle M Hall 2021-08-13 11:58:55 UTC
Pushed to 21.05.x for 21.05.03
Comment 7 Fridolin Somers 2021-08-13 20:22:38 UTC
Depends on Bug 28179 not in 20.11.x