Bugzilla – Attachment 191838 Details for
Bug 41522
Make system preferences clickable for warnings in About Koha > System information
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[WIP] Bug 41522: Make sysprefs clickable in warnings
WIP-Bug-41522-Make-sysprefs-clickable-in-warnings.patch (text/plain), 3.78 KB, created by
Oli Williams
on 2026-01-21 21:22:10 UTC
(
hide
)
Description:
[WIP] Bug 41522: Make sysprefs clickable in warnings
Filename:
MIME Type:
Creator:
Oli Williams
Created:
2026-01-21 21:22:10 UTC
Size:
3.78 KB
patch
obsolete
>From eb7fb6e1a50252a836ef87740ccc66d0e2554c4d Mon Sep 17 00:00:00 2001 >From: Oli Williams <imhungryoliver@gmail.com> >Date: Wed, 21 Jan 2026 21:21:24 +0000 >Subject: [PATCH] [WIP] Bug 41522: Make sysprefs clickable in warnings > >--- > about.pl | 15 +++++++++++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 15 +++++++++------ > 2 files changed, 24 insertions(+), 6 deletions(-) > >diff --git a/about.pl b/about.pl >index 86080fa..9bc828c 100755 >--- a/about.pl >+++ b/about.pl >@@ -397,6 +397,7 @@ if ( $tab eq 'sysinfo' ) { > my $userid = C4::Context->preference('AutoSelfCheckID'); > my $all_permissions = C4::Auth::get_user_subpermissions($userid); > my ( $has_self_checkout_perm, $has_other_permissions ); >+ > while ( my ( $module, $permissions ) = each %$all_permissions ) { > if ( $module eq 'self_check' ) { > while ( my ( $permission, $flag ) = each %$permissions ) { >@@ -416,6 +417,20 @@ if ( $tab eq 'sysinfo' ) { > ); > } > >+ my $patron = Koha::Patrons->find( { borrowernumber => $loggedinuser } ); >+ >+ my ($has_sysprefs_perm); >+ >+ if ( C4::Auth::haspermission( $patron->userid, { superlibrarian => '1' } ) ) { >+ $has_sysprefs_perm = 1; >+ } elsif ( C4::Auth::haspermission( $patron->userid, { parameters => 'manage_sysprefs' } ) ) { >+ $has_sysprefs_perm = 1; >+ } >+ >+ $template->param( >+ UserHasSysPrefsPerm => $has_sysprefs_perm, >+ ); >+ > if ( C4::Context->preference('PatronSelfRegistration') ) { > $template->param( warnPrefPatronSelfRegistrationDefaultCategory => 1 ) > unless Koha::Patron::Categories->find( C4::Context->preference('PatronSelfRegistrationDefaultCategory') ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 8af7b25..18a9379 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -545,12 +545,15 @@ > [% IF (warnPrefRequireChoosingExistingAuthority) %] > <tr> > <th scope="row"><strong>Warning</strong> </th> >- <td >- >System preference '<a href="admin/preferences.pl?op=search&searchfield=RequireChoosingExistingAuthority&ok=Search">RequireChoosingExistingAuthority</a>' is disabled, but needs '<a >- href="admin/preferences.pl?op=search&searchfield=AutoCreateAuthorities&ok=Search" >- >AutoCreateAuthorities</a >- >' enabled. Otherwise catalogers can add headings that will not be linked to authorities.</td >- > >+ <td> >+ [% IF (UserHasSysPrefsPerm) %] >+ System preference ' >+ <a href="admin/preferences.pl?op=search&searchfield=RequireChoosingExistingAuthority&ok=Search">RequireChoosingExistingAuthority</a>' is disabled, but needs ' >+ <a href="admin/preferences.pl?op=search&searchfield=AutoCreateAuthorities&ok=Search">AutoCreateAuthorities</a>' enabled. Otherwise catalogers can add headings that will not be linked to authorities. >+ [% ELSE %] >+ System preference 'RequireChoosingExistingAuthority' is disabled, but needs 'AutoCreateAuthorities' enabled. Otherwise catalogers can add headings that will not be linked to authorities. >+ [% END %] >+ </td> > </tr> > [% END %] > [% IF (warnPrefEasyAnalyticalRecords) %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41522
:
191735
|
191776
|
191838
|
191894
|
192115
|
192280
|
192281
|
192682