From f23bcadb2fe670c00b40e6f545718066bd5dbe6a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 11 Feb 2022 15:24:43 +0000 Subject: [PATCH] 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 Signed-off-by: Katrin Fischer Signed-off-by: Fridolin Somers Signed-off-by: Kyle M Hall (cherry picked from commit 557bcbfa5240dd4b8fd4a32b7cde04183f86bc77) Signed-off-by: Andrew Fuerste-Henry --- .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 196afe2ed5..03c55e144e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -280,11 +280,9 @@ [% IF suggestions.count %]
  • Suggestion details
  • [% END %] [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
  • Editions
  • [% END %][% END %] [% IF ( LocalCoverImages ) %] - [% IF ( localimages.count || CAN_user_tools_upload_local_cover_images ) %] -
  • - Images ([% localimages.count || 0 | html %]) -
  • - [% END %] +
  • + Images ([% localimages.count || 0 | html %]) +
  • [% END %] [% IF HTML5MediaEnabled && HTML5MediaSets.size %]
  • Play media
  • [% END %] [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %] -- 2.39.5