Bug 22032

Summary: Improve local cover image tab on detail page
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, ethan.amohia, josef.moravec, katrin.fischer, martin.renvoize, nick
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 21304    
Bug Blocks: 22035, 30082    
Attachments: Bug 22032: Improve local cover image tab on detail page
Bug 22032: Improve local cover image tab on detail page
Bug 22032: Improve local cover image tab on detail page
Bug 22032: Improve local cover image tab on detail page

Description Owen Leonard 2018-12-20 16:05:09 UTC
I have a few improvements I'd like to make to the local cover image tab on the bibliographic detail page in the staff client:

 - Make upload button visible even if there is an existing image
 - Improve style of thumbnails and delete link
 - Show spinner for pending AJAX deletion
 - Improve error-handling of deletion process
Comment 1 Owen Leonard 2018-12-20 17:06:04 UTC Comment hidden (obsolete)
Comment 2 Lucas Gass 2018-12-24 18:07:42 UTC
Created attachment 83481 [details] [review]
Bug 22032: Improve local cover image tab on detail page

This patch makes a variety of improvements to the images tab of the
staff client's bibliographic detail page.

To test, apply the patch and regenerate the staff client CSS.

 - Enable the LocalCoverImages system preference.
 - Locate a bibliographic record which has no images attached.
   - There should be a "no images" message and an upload button.
     - Upload an image and return to the detail page.
       - The "Images" tab should have a nicely-styled thumbnail of the
         image you uploaded.
         - Test the "Delete image" link: It should ask for a
           confirmation. If you confirm, the image should disappear and
           a "loading" spinner should appear.
           - When the image has been deleted the thumbnail container
             should disappear and the "no images" message should
             reappear.
 - Test this process with AllowMultipleCovers enabled and disabled.

Extra credit: Modify the AJAX url in the removeLocalImage
function in detail.tt. After misspelling a parameter name or the URL
path, clicking the "Delete image" link should trigger an alert and
re-show the image thumbnail.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Ethan 2019-01-17 22:07:40 UTC
Looks like its already been signed off but wasnt set to signed off.
Comment 4 Katrin Fischer 2019-01-20 11:59:05 UTC
Moving to BLOCKED because of the dependency.
Comment 5 Katrin Fischer 2019-03-06 07:11:33 UTC
Created attachment 86128 [details] [review]
Bug 22032: Improve local cover image tab on detail page

This patch makes a variety of improvements to the images tab of the
staff client's bibliographic detail page.

To test, apply the patch and regenerate the staff client CSS.

 - Enable the LocalCoverImages system preference.
 - Locate a bibliographic record which has no images attached.
   - There should be a "no images" message and an upload button.
     - Upload an image and return to the detail page.
       - The "Images" tab should have a nicely-styled thumbnail of the
         image you uploaded.
         - Test the "Delete image" link: It should ask for a
           confirmation. If you confirm, the image should disappear and
           a "loading" spinner should appear.
           - When the image has been deleted the thumbnail container
             should disappear and the "no images" message should
             reappear.
 - Test this process with AllowMultipleCovers enabled and disabled.

Extra credit: Modify the AJAX url in the removeLocalImage
function in detail.tt. After misspelling a parameter name or the URL
path, clicking the "Delete image" link should trigger an alert and
re-show the image thumbnail.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Owen Leonard 2019-03-19 13:10:08 UTC
Created attachment 86739 [details] [review]
Bug 22032: Improve local cover image tab on detail page

This patch makes a variety of improvements to the images tab of the
staff client's bibliographic detail page.

To test, apply the patch and regenerate the staff client CSS.

 - Enable the LocalCoverImages system preference.
 - Locate a bibliographic record which has no images attached.
   - There should be a "no images" message and an upload button.
     - Upload an image and return to the detail page.
       - The "Images" tab should have a nicely-styled thumbnail of the
         image you uploaded.
         - Test the "Delete image" link: It should ask for a
           confirmation. If you confirm, the image should disappear and
           a "loading" spinner should appear.
           - When the image has been deleted the thumbnail container
             should disappear and the "no images" message should
             reappear.
 - Test this process with AllowMultipleCovers enabled and disabled.

Extra credit: Modify the AJAX url in the removeLocalImage
function in detail.tt. After misspelling a parameter name or the URL
path, clicking the "Delete image" link should trigger an alert and
re-show the image thumbnail.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Nick Clemens 2019-03-22 20:38:13 UTC
Awesome work all!

Pushed to master for 19.05
Comment 8 Martin Renvoize 2019-04-01 10:39:41 UTC
Enhancement will not be backported to 18.11.x series.