From 72fb3cfe7c01eb9156cfbb6f2d435c99d8dc9b96 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 2 Feb 2021 12:54:39 +0000 Subject: [PATCH] Bug 27592: Link audio alerts to corresponding preference and back This patch adds links from the audio alerts page to system preferences and back. To test, apply the patch and disable the "AudioAlerts" system preference. - Log in to the staff interface as a user with permission to access audio alerts and system preferences. - Go to Administration -> Audio alerts. - You should see an alert, "Audio alerts are disabled." - Test the link to system preferences. It should take you a preferences search which returns only "AudioAlerts." - On the system preference page, test that the link to audio alerts works correctly. - Disable audio alerts again. - Log in to the staf interface as a user with permission to access audio alerts but WITHOUT permission to access system preferences. - Go to Administration -> Audio alerts. - You should see an alert, "Audio alerts are disabled." - There should be no link to system preferences. Signed-off-by: David Nind Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt | 8 ++++++-- .../prog/en/modules/admin/preferences/staff_interface.pref | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt index 4587214c0e..34a6446c13 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt @@ -75,8 +75,12 @@

Audio alerts

[%IF !( Koha.Preference('AudioAlerts') ) %]
-

Note:

-

Please enable system preference 'AudioAlerts' to activate sounds.

+

Audio alerts are disabled

+ [% IF ( CAN_user_parameters_manage_sysprefs ) %] +

Please enable system preference AudioAlerts to activate sounds.

+ [% ELSE %] +

The system preference AudioAlerts must be enabled to activate sounds.

+ [% END %]
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref index 30132b35fc..12fc8cdfa5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref @@ -174,7 +174,7 @@ Staff interface: choices: yes: "Enable" no: "Don't enable" - - audio alerts for events defined in the audio alerts section of administration. + - audio alerts for events defined in the audio alerts section of administration. - - pref: IntranetCatalogSearchPulldown choices: -- 2.11.0