Bug 30082: Bibliographic details tab missing when user can't add local cover image
authorOwen Leonard <oleonard@myacpl.org>
Fri, 11 Feb 2022 15:24:43 +0000 (15:24 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 16 Feb 2022 21:51:11 +0000 (11:51 -1000)
commitadb11b866bea087c6745cff946a7c4ba763d3083
tree12e7c9a280255ea8178d6aafadff7b43a14dc780
parentbafd7cff70016d869e0bb7bc4048d5a45b0ccac2
Bug 30082: Bibliographic details tab missing when user can't add local cover image

This patch corrects the template logic which determines whether the
"Images" tab should be displayed on the bibliographic detail page. The
"Images" tab should display whenever local cover images are enabled, not
just if the user has permission to manage cover images.

To test, apply the patch and go to Administration -> System preferences.

- Enable the LocalCoverImages system preference.
- Locate and view the detail page for a bibliographic record in the
  catalog which doesn't have a local cover image attached.

  - If you are logged in as a user with upload_local_cover_images
    permission you should see an "Images" tab with the message "No
    images have been uploaded for this bibliographic record yet" and an
    upload button.
  - If you are logged in as a user without upload_local_cover_images
    permission you should see an "Images" tab with just the "No
    images..." message.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt