Bugzilla – Attachment 191792 Details for
Bug 41674
Add template plugin for linking to system preferences based on user permission
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41674: (follow-up) Proof of concept: branches.pl
Bug-41674-follow-up-Proof-of-concept-branchespl.patch (text/plain), 5.61 KB, created by
Owen Leonard
on 2026-01-21 15:26:29 UTC
(
hide
)
Description:
Bug 41674: (follow-up) Proof of concept: branches.pl
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2026-01-21 15:26:29 UTC
Size:
5.61 KB
patch
obsolete
>From b40be2a97854abb4249a03916a6f220a5a9c8220 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 21 Jan 2026 10:15:13 -0500 >Subject: [PATCH] Bug 41674: (follow-up) Proof of concept: branches.pl > >This patch implements the new template plugin on Administration -> >Libraries. > >- When viewed as a user with permission to manage system preferences, > the system preference names under "Reply-To", "Return-Path", and "MARC > organization code" should be linked to system preferences, and the > link should take you to the correct preference search. >- When viewed as a user without permission the system preference names > should not be linked. > >Sponsored-by: Athens County Public Libraries >--- > .../prog/en/modules/admin/branches.tt | 36 +++---------------- > 1 file changed, 5 insertions(+), 31 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 37468a6b222..0de8d9349a9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt >@@ -4,6 +4,7 @@ > [% USE TablesSettings %] > [%- USE KohaSpan -%] > [% USE KohaTimes %] >+[% USE LinkPref %] > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -265,14 +266,7 @@ > <div class="fg-input"> > <input type="text" name="branchillemail" id="branchillemail" class="email" size="80" value="[% library.branchillemail | html %]" /> > </div> >- <div class="hint"> >- [% IF ( CAN_user_parameters_manage_sysprefs ) %] >- [% pref_ILLDefaultStaffEmail_link = BLOCK %]<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILLDefaultStaffEmail">ILLDefaultStaffEmail</a>[% END %] >- Default: [% pref_ILLDefaultStaffEmail_link | $raw | $KohaSpan %] system preference >- [% ELSE %] >- Default: ILLDefaultStaffEmail system preference >- [% END %] >- </div> >+ <div class="hint"> Default: [% "ILLDefaultStaffEmail" | html | $LinkPref %] system preference. </div> > </div> > [% END %] > <div class="fg-row"> >@@ -282,14 +276,7 @@ > <div class="fg-input"> > <input type="text" name="branchreplyto" id="branchreplyto" class="email" size="80" value="[% library.branchreplyto | html %]" /> > </div> >- <div class="hint"> >- [% IF ( CAN_user_parameters_manage_sysprefs ) %] >- [% pref_ReplyToDefault_link = BLOCK %]<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplyToDefault">ReplyToDefault</a>[% END %] >- Default: [% pref_ReplyToDefault_link | $raw | $KohaSpan %] system preference >- [% ELSE %] >- Default: ReplyToDefault system preference >- [% END %] >- </div> >+ <div class="hint"> Default: [% "ReplyToDefault" | html | $LinkPref %] system preference. </div> > </div> > <div class="fg-row"> > <div class="fg-label"> >@@ -298,14 +285,7 @@ > <div class="fg-input"> > <input type="text" name="branchreturnpath" id="branchreturnpath" class="email" size="80" value="[% library.branchreturnpath | html %]" /> > </div> >- <div class="hint"> >- [% IF ( CAN_user_parameters_manage_sysprefs ) %] >- [% pref_ReturnpathDefault_link = BLOCK %]<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReturnpathDefault">ReturnpathDefault</a>[% END %] >- Default: [% pref_ReturnpathDefault_link | $raw | $KohaSpan %] system preference >- [% ELSE %] >- Default: ReturnpathDefault system preference >- [% END %] >- </div> >+ <div class="hint"> Default: [% "ReturnpathDefault" | html | $LinkPref %] system preference. </div> > </div> > <div class="fg-row"> > <div class="fg-label"> >@@ -377,13 +357,7 @@ > <input type="text" name="marcorgcode" id="marcorgcode" size="16" maxlength="16" value="[% library.marcorgcode | html %]" /> > </div> > <div class="hint"> >- [% IF ( CAN_user_parameters_manage_sysprefs ) %] >- [% pref_MARCOrgCode_link = BLOCK %]<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=MARCOrgCode">MARCOrgCode</a>[% END %] >- Default: [% pref_MARCOrgCode_link | $raw | $KohaSpan %] system preference. >- [% ELSE %] >- Default: MARCOrgCode system preference. >- [% END %] >- Obtain a library code from the <a href="https://www.loc.gov/marc/organizations/orgshome.html" target="_blank">Library of Congress</a>. >+ Default: [% "MARCOrgCode" | html | $LinkPref %] system preference. Obtain a library code from the <a href="https://www.loc.gov/marc/organizations/orgshome.html" target="_blank">Library of Congress</a>. > </div> > </div> > <div class="fg-row"> >-- >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 41674
:
191791
| 191792