Bugzilla – Attachment 179185 Details for
Bug 31642
Control locations for HTML customizations from new table or Authorised values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31642: Use the AV categories to control locations for HTML customizations
Bug-31642-Use-the-AV-categories-to-control-locatio.patch (text/plain), 4.61 KB, created by
David Nind
on 2025-03-11 20:03:34 UTC
(
hide
)
Description:
Bug 31642: Use the AV categories to control locations for HTML customizations
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-03-11 20:03:34 UTC
Size:
4.61 KB
patch
obsolete
>From c93041e375e61c0063cf8c059279d5417836b357 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 20 Feb 2025 15:26:01 +0000 >Subject: [PATCH] Bug 31642: Use the AV categories to control locations for > HTML customizations > >Test plan: >Go to HTML customizations. Add new. >Check that you see the expected display locations. >Add a new location under AV category ADD_CONT_HTML_CUSTOM. >Add another HTML customization with that new location. Edit it. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: David Nind <david@davidnind.com> >--- > .../en/modules/tools/additional-contents.tt | 33 +++++++++++++------ > 1 file changed, 23 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >index 75e1a5215b..916d93e8a2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >@@ -2,6 +2,7 @@ > [% USE Asset %] > [% USE Koha %] > [% USE KohaDates %] >+[% USE AuthorisedValues %] > [% USE Branches %] > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] >@@ -532,23 +533,35 @@ > [% END %] > [% END %] > [% ELSE %] >- [% SET opac_available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'OpacMaintenanceNotice', 'OPACResultsSidebar', 'OpacSuppressionMessage', 'SCOMainUserBlock', 'SelfCheckInMainUserBlock', 'SelfCheckHelpMessage', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'PatronSelfRegistrationAdditionalInstructions', 'ILLModuleCopyrightClearance' ] %] >+ [%# NOTE: Since bug 31642 you can add new options (i.e. block locations) via Authorised Values %} >+ [%# Use the three AV categories: ADD_CONT_HTML_OPAC_SYSTEM, ADD_CONT_HTML_STAFF_SYSTEM or ADD_CONT_HTML_CUSTOM %] >+ [% SET opac_available_options = AuthorisedValues.Get('ADD_CONT_HTML_OPAC_SYSTEM') %] > <optgroup label="OPAC"> >- [% FOREACH l IN opac_available_options.sort %] >- [% IF l == location %] >- <option value="[% l | html %]" selected="selected">[% l | html %]</option> >+ [% FOREACH l IN opac_available_options %] >+ [% IF l.authorised_value == location %] >+ <option value="[% l.authorised_value | html %]" selected="selected">[% l.authorised_value | html %]</option> > [% ELSE %] >- <option value="[% l | html %]">[% l | html %]</option> >+ <option value="[% l.authorised_value | html %]">[% l.authorised_value | html %]</option> > [% END %] > [% END %] > </optgroup> >- [% SET staff_available_options = [ 'IntranetmainUserblock', 'RoutingListNote', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffLoginInstructions', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %] >+ [% SET staff_available_options = AuthorisedValues.Get('ADD_CONT_HTML_STAFF_SYSTEM') %] > <optgroup label="Staff interface"> >- [% FOREACH l IN staff_available_options.sort %] >- [% IF l == location %] >- <option value="[% l | html %]" selected="selected">[% l | html %]</option> >+ [% FOREACH l IN staff_available_options %] >+ [% IF l.authorised_value == location %] >+ <option value="[% l.authorised_value | html %]" selected="selected">[% l.authorised_value | html %]</option> > [% ELSE %] >- <option value="[% l | html %]">[% l | html %]</option> >+ <option value="[% l.authorised_value | html %]">[% l.authorised_value | html %]</option> >+ [% END %] >+ [% END %] >+ </optgroup> >+ [% SET custom_available_options = AuthorisedValues.Get('ADD_CONT_HTML_CUSTOM') %] >+ <optgroup label="Custom"> >+ [% FOREACH l IN custom_available_options %] >+ [% IF l.authorised_value == location %] >+ <option value="[% l.authorised_value | html %]" selected="selected">[% l.authorised_value | html %]</option> >+ [% ELSE %] >+ <option value="[% l.authorised_value | html %]">[% l.authorised_value | html %]</option> > [% END %] > [% END %] > </optgroup> >-- >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 31642
:
178424
|
178425
|
178426
|
179183
|
179184
| 179185 |
179205
|
182904