@@ -, +, @@
preference
- You should see an icon next to each module for which logging is
disabled. Hovering over the icon should give a tooltip: "Log not
enabled."
- If you are logged in as a user with "manage_sysprefs" permission,
clicking the icon should take you directly to the system preference
for enabling or disabling that module's logs.
- If your user does not have "manage_sysprefs" permission the icon
should not be a link.
---
.../prog/en/modules/tools/viewlog.tt | 35 ++++++++++---------
koha-tmpl/intranet-tmpl/prog/js/viewlog.js | 8 +++++
2 files changed, 26 insertions(+), 17 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
@@ -69,39 +69,39 @@
[% BLOCK translate_log_module %]
[% SWITCH module %]
-[% CASE 'AUTH' %]Authentication[% UNLESS Koha.Preference('AuthFailureLog') || Koha.Preference('AuthScuccessLog') %] [% END %]
-[% CASE 'CATALOGUING' %]Catalog[% UNLESS Koha.Preference('CataloguingLog') %] [% END %]
+[% CASE 'AUTH' %]Authentication[% UNLESS Koha.Preference('AuthFailureLog') || Koha.Preference('AuthScuccessLog') %] [% END %]
+[% CASE 'CATALOGUING' %]Cataloging[% UNLESS Koha.Preference('CataloguingLog') %] [% END %]
-[% CASE 'AUTHORITIES' %]Authorities[% UNLESS Koha.Preference('AuthoritiesLog') %] [% END %]
+[% CASE 'AUTHORITIES' %]Authorities[% UNLESS Koha.Preference('AuthoritiesLog') %] [% END %]
-[% CASE 'MEMBERS' %]Patrons[% UNLESS Koha.Preference('BorrowersLog') %] [% END %]
+[% CASE 'MEMBERS' %]Patrons[% UNLESS Koha.Preference('BorrowersLog') %] [% END %]
-[% CASE 'ACQUISITIONS' %]Acquisitions[% UNLESS Koha.Preference('AcquisitionLog') %][% END %]
+[% CASE 'ACQUISITIONS' %]Acquisitions[% UNLESS Koha.Preference('AcquisitionLog') %][% END %]
-[% CASE 'SERIAL' %]Serials[% UNLESS Koha.Preference('SubscriptionLog') %] [% END %]
+[% CASE 'SERIAL' %]Serials[% UNLESS Koha.Preference('SubscriptionLog') %] [% END %]
-[% CASE 'HOLDS' %]Holds[% UNLESS Koha.Preference('HoldsLog') %] [% END %]
+[% CASE 'HOLDS' %]Holds[% UNLESS Koha.Preference('HoldsLog') %] [% END %]
-[% CASE 'ILL' %]Interlibrary loans[% UNLESS Koha.Preference('IllLog') %] [% END %]
+[% CASE 'ILL' %]Interlibrary loans[% UNLESS Koha.Preference('IllLog') %] [% END %]
-[% CASE 'CIRCULATION' %]Circulation[% UNLESS Koha.Preference('IssueLog') %] [% END %]
+[% CASE 'CIRCULATION' %]Circulation[% UNLESS Koha.Preference('IssueLog') %] [% END %]
-[% CASE 'CLAIMS' %]Claims[% UNLESS Koha.Preference('ClaimsLog') %] [% END %]
+[% CASE 'CLAIMS' %]Claims[% UNLESS Koha.Preference('ClaimsLog') %] [% END %]
-[% CASE 'FINES' %]Fines[% UNLESS Koha.Preference('FinesLog') %] [% END %]
+[% CASE 'FINES' %]Fines[% UNLESS Koha.Preference('FinesLog') %] [% END %]
[% CASE 'SYSTEMPREFERENCE' %]System preferences
-[% CASE 'CRONJOBS' %]Cron jobs[% UNLESS Koha.Preference('CronjobLog') %] [% END %]
+[% CASE 'CRONJOBS' %]Cron jobs[% UNLESS Koha.Preference('CronjobLog') %] [% END %]
-[% CASE 'REPORTS' %]Reports[% UNLESS Koha.Preference('ReportsLog') %] [% END %]
+[% CASE 'REPORTS' %]Reports[% UNLESS Koha.Preference('ReportsLog') %] [% END %]
[% CASE 'SEARCHENGINE' %]Search engine
-[% CASE 'NOTICES' %]Notices[% UNLESS Koha.Preference('NoticesLog') %] [% END %]
-[% CASE 'NEWS' %]News[% UNLESS Koha.Preference('NewsLog') %] [% END %]
-[% CASE 'RECALLS' %]Recalls[% UNLESS Koha.Preference('RecallsLog') %] [% END %]
-[% CASE 'SUGGESTION' %]Suggestions[% UNLESS Koha.Preference('SuggestionsLog') %] [% END %]
+[% CASE 'NOTICES' %]Notices[% UNLESS Koha.Preference('NoticesLog') %] [% END %]
+[% CASE 'NEWS' %]News[% UNLESS Koha.Preference('NewsLog') %] [% END %]
+[% CASE 'RECALLS' %]Recalls[% UNLESS Koha.Preference('RecallsLog') %] [% END %]
+[% CASE 'SUGGESTION' %]Suggestions[% UNLESS Koha.Preference('SuggestionsLog') %] [% END %]
[% CASE %][% module | html %]
[% END %]
@@ -491,6 +491,7 @@
[% Asset.js("lib/jsdiff/jsdiff.min.js") | $raw %]
[% Asset.js("js/viewlog.js") | $raw %]
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js
@@ -149,4 +149,12 @@ $(document).ready(function(){
return false;
}
});
+
+ $(".log-disabled").each(function(){
+ if( CAN_user_parameters_manage_sysprefs ){
+ let pref = $(this).data("log")
+ url = "/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=";
+ $(this).wrap("")
+ }
+ }).tooltip();
});
--