Show UI when using a custom theme
Do not hide the theming app UI when using a custom theme besides it, but warn the users about some settings being overwritten by that. Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
e2b44d199b
commit
b6501ae966
|
@ -67,7 +67,7 @@ class Admin implements ISettings {
|
||||||
$theme = $this->config->getSystemValue('theme', '');
|
$theme = $this->config->getSystemValue('theme', '');
|
||||||
if ($theme !== '') {
|
if ($theme !== '') {
|
||||||
$themable = false;
|
$themable = false;
|
||||||
$errorMessage = $this->l->t('You are already using a custom theme');
|
$errorMessage = $this->l->t('You are already using a custom theme. Theming app settings might be overwritten by that.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$parameters = [
|
$parameters = [
|
||||||
|
|
|
@ -37,7 +37,7 @@ style('theming', 'settings-admin');
|
||||||
<p>
|
<p>
|
||||||
<?php p($_['errorMessage']) ?>
|
<?php p($_['errorMessage']) ?>
|
||||||
</p>
|
</p>
|
||||||
<?php } else { ?>
|
<?php } ?>
|
||||||
<div>
|
<div>
|
||||||
<label>
|
<label>
|
||||||
<span><?php p($l->t('Name')) ?></span>
|
<span><?php p($l->t('Name')) ?></span>
|
||||||
|
@ -99,5 +99,4 @@ style('theming', 'settings-admin');
|
||||||
</p>
|
</p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -118,8 +118,8 @@ class AdminTest extends TestCase {
|
||||||
$this->l10n
|
$this->l10n
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('t')
|
->method('t')
|
||||||
->with('You are already using a custom theme')
|
->with('You are already using a custom theme. Theming app settings might be overwritten by that.')
|
||||||
->willReturn('You are already using a custom theme');
|
->willReturn('You are already using a custom theme. Theming app settings might be overwritten by that.');
|
||||||
$this->themingDefaults
|
$this->themingDefaults
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('getEntity')
|
->method('getEntity')
|
||||||
|
@ -143,7 +143,7 @@ class AdminTest extends TestCase {
|
||||||
->willReturn('/my/route');
|
->willReturn('/my/route');
|
||||||
$params = [
|
$params = [
|
||||||
'themable' => false,
|
'themable' => false,
|
||||||
'errorMessage' => 'You are already using a custom theme',
|
'errorMessage' => 'You are already using a custom theme. Theming app settings might be overwritten by that.',
|
||||||
'name' => 'MyEntity',
|
'name' => 'MyEntity',
|
||||||
'url' => 'https://example.com',
|
'url' => 'https://example.com',
|
||||||
'slogan' => 'MySlogan',
|
'slogan' => 'MySlogan',
|
||||||
|
|
Loading…
Reference in New Issue