From 4037f7a8fa4506878aa4dd85c5993ca65d97ffff Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 30 Jan 2025 19:29:44 +0000 Subject: [PATCH] Bug 38773: SMTP server is not showing on the library detail page This patch fixes and incorrect template variable name, making it possible to see a library's SMTP server when viewing the details of an individual library. Test plan copied from the original bug report: 1. Create an SMTP server in Koha (it doesn't need to be valid) a. Go to Administration -> Additional parameters -> SMTP servers b. Click "New STP server" c. Fill all mandatory fields (it doesn't need to be valid information) d. Click "Submit" 2. Add the created SMTP server to a library a. Go to Administration -> Basic parameters -> Libraries b. Choose a library and click on Edit (in column "Actions") c. On the line "SMTP server" select the server created d. Click "Submit" 3. Check the display a. Go to Administration -> Basic parameters -> Libraries b. Check that the name of the SMTP server you just selected is displayed in the column SMTP server c. Click on the name of the library you modified d. Check that the line "SMTP server" shows the correct information. 4. Test with different permissions a. If the logged-in user has both 'manage_libraries' and 'manage_smtp_servers' permissions the SMTP server name should be liked to the edit form for that server. b. If the logged-in user has only 'manage_libraries' permission there should be no link. --- .../prog/en/modules/admin/branches.tt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt index 6c6ef20c66e..59608f71680 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -517,10 +517,16 @@ Return-Path: [% library.branchreturnpath | html %] -
  • - SMTP server: - [% smtp_server.name | html %] -
  • + [% IF ( library.smtp_server.id ) %] +
  • + SMTP server: + [% IF ( CAN_user_parameters_manage_smtp_servers ) %] + [% library.smtp_server.name | html %] + [% ELSE %] + [% library.smtp_server.name | html %] + [% END %] +
  • + [% END %]
  • URL: [% IF ( library.branchurl ) %] -- 2.39.5