[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Remove admin page layout option when using Unified Admin backend
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68dde012f18a_2cdeee074247@gitlab-sidekiq-low-urgency-cpu-bound-v2-697dcf96d-bcl74.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
5778ae3a by Moïse Nturubika at 2025-10-02T02:06:33+00:00
[FIX] Remove admin page layout option when using Unified Admin backend
---
* [FIX] Remove admin page layout option when using Unified Admin backend
See merge request tikiwiki/tiki!7551
- - - - -
2 changed files:
- lib/prefs/site.php
- templates/admin/include_look.tpl
Changes:
=====================================
lib/prefs/site.php
=====================================
@@ -17,7 +17,7 @@ function prefs_site_list()
}
unset($groups['Anonymous']);
- return [
+ $preferences = [
'site_closed' => [
'name' => tra('Close site'),
'description' => tra("Use this setting to \"close\" the Tiki site (such as for maintenance). Users attempting to access the site will see only a log-in form. Only users with specific permission will be allowed to log in. Use the Message to display to specify the message that visitors will see when attempting to access your site."),
@@ -239,19 +239,6 @@ function prefs_site_list()
'tags' => ['advanced'],
'options' => $available_layouts,
],
- 'site_layout_admin' => [
- 'name' => tr('Admin layout'),
- 'description' => tr('Specify which layout template to use for admin pages.'),
- 'type' => 'list',
- 'default' => SMARTY_DEFAULT_LAYOUT,
- 'help' => 'Site-Layout',
- 'hint' => tra('Note: this does not affect the Unified Admin Backend. Only the legacy admin pages when UAB is disabled. An admin theme must be selected first.'),
- 'tags' => ['advanced'],
- 'options' => $available_admin_layouts,
- 'mandatory_dependencies' => [
- 'theme_admin',
- ],
- ],
'site_layout_per_object' => [
'name' => tr('Enable layout per page, etc.'),
'description' => tr('Specify an alternate layout for a particular wiki page, etc.'),
@@ -346,4 +333,23 @@ function prefs_site_list()
],
],
];
+
+ // Only include the admin layout preference if UAB is disabled
+ if (isset($prefs['theme_unified_admin_backend']) && $prefs['theme_unified_admin_backend'] !== 'y') {
+ $preferences['site_layout_admin'] = [
+ 'name' => tr('Admin layout'),
+ 'description' => tr('Specify which layout template to use for admin pages.'),
+ 'type' => 'list',
+ 'default' => SMARTY_DEFAULT_LAYOUT,
+ 'help' => 'Site-Layout',
+ 'hint' => tra('Note: this does not affect the Unified Admin Backend. Only the legacy admin pages when UAB is disabled. An admin theme must be selected first.'),
+ 'tags' => ['advanced'],
+ 'options' => $available_admin_layouts,
+ 'mandatory_dependencies' => [
+ 'theme_admin',
+ ],
+ ];
+ }
+
+ return $preferences;
}
=====================================
templates/admin/include_look.tpl
=====================================
@@ -133,8 +133,10 @@
{preference name=theme_header_and_address_bar_color}
{preference name=theme_default_color_mode}
- <legend class="h3">{tr}Admin pages layout{/tr}</legend>
- {preference name=site_layout_admin}
+ {if $prefs.theme_unified_admin_backend neq 'y'}
+ <legend class="h3">{tr}Admin pages layout{/tr}</legend>
+ {preference name=site_layout_admin}
+ {/if}
<hr>
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/5778ae3af572a342a424945ee9e201de36456081
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/5778ae3af572a342a424945ee9e201de36456081
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs