From b0c79ac14d8a897b44ae1ba7a9c16cde207f3c4b 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 --- .../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 3b56260668..70a22e7262 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -275,11 +275,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.30.2