Browse Source
Merge pull request #8993 from nextcloud/theming-allow-ui-with-theme
Show UI when using a custom theme
pull/9006/head
Roeland Jago Douma
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
5 additions and
6 deletions
-
apps/theming/lib/Settings/Admin.php
-
apps/theming/templates/settings-admin.php
-
apps/theming/tests/Settings/AdminTest.php
|
|
|
@ -67,7 +67,7 @@ class Admin implements ISettings { |
|
|
|
$theme = $this->config->getSystemValue('theme', ''); |
|
|
|
if ($theme !== '') { |
|
|
|
$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 = [ |
|
|
|
|
|
|
|
@ -37,7 +37,7 @@ style('theming', 'settings-admin'); |
|
|
|
<p> |
|
|
|
<?php p($_['errorMessage']) ?>
|
|
|
|
</p> |
|
|
|
<?php } else { ?>
|
|
|
|
<?php } ?>
|
|
|
|
<div> |
|
|
|
<label> |
|
|
|
<span><?php p($l->t('Name')) ?></span>
|
|
|
|
@ -99,5 +99,4 @@ style('theming', 'settings-admin'); |
|
|
|
</p> |
|
|
|
<?php } ?>
|
|
|
|
</div> |
|
|
|
<?php } ?>
|
|
|
|
</div> |
|
|
|
@ -118,8 +118,8 @@ class AdminTest extends TestCase { |
|
|
|
$this->l10n |
|
|
|
->expects($this->once()) |
|
|
|
->method('t') |
|
|
|
->with('You are already using a custom theme') |
|
|
|
->willReturn('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. Theming app settings might be overwritten by that.'); |
|
|
|
$this->themingDefaults |
|
|
|
->expects($this->once()) |
|
|
|
->method('getEntity') |
|
|
|
@ -143,7 +143,7 @@ class AdminTest extends TestCase { |
|
|
|
->willReturn('/my/route'); |
|
|
|
$params = [ |
|
|
|
'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', |
|
|
|
'url' => 'https://example.com', |
|
|
|
'slogan' => 'MySlogan', |
|
|
|
|