Created attachment 130506 [details] Screenshot showing the problem There is an error in the logic controlling whether the "Images" tab appears on the bibliographic detail page in the staff interface. If the LocalCoverImages preference is enabled but the logged-in user doesn't have CAN_user_tools_upload_local_cover_images permission the "No images..." text appears outside of the tabs. This is because the logic for displaying the message differs from the logic for displaying the corresponding tab link.
Created attachment 130510 [details] [review] 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.
Created attachment 130530 [details] [review] 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>
Created attachment 130537 [details] [review] 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>
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Pushed to 21.11.x for 21.11.03
Pushed to 21.05.x for 21.05.11
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.