diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-11-09 12:16:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-09 12:16:55 +0100 |
commit | c7e5bc0f9ab6f58bf9a47dd0c3795e1183419652 (patch) | |
tree | be16390ec9f1b598708e16807608d3a61c876b36 /apps/theming | |
parent | 7dc9f6f40c6592b0ad554d2776da086a611ba9f7 (diff) | |
parent | 479966dce81593f8f2a49211566c4e71a4cbbbf7 (diff) | |
download | nextcloud-server-c7e5bc0f9ab6f58bf9a47dd0c3795e1183419652.tar.gz nextcloud-server-c7e5bc0f9ab6f58bf9a47dd0c3795e1183419652.zip |
Merge pull request #7112 from nextcloud/theming-imagemagick-hint
Theming: add hint about favicon generation
Diffstat (limited to 'apps/theming')
-rw-r--r-- | apps/theming/css/settings-admin.css | 4 | ||||
-rw-r--r-- | apps/theming/lib/Settings/Admin.php | 2 | ||||
-rw-r--r-- | apps/theming/templates/settings-admin.php | 11 | ||||
-rw-r--r-- | apps/theming/tests/Settings/AdminTest.php | 4 |
4 files changed, 21 insertions, 0 deletions
diff --git a/apps/theming/css/settings-admin.css b/apps/theming/css/settings-admin.css index 7270ec59b83..b0fdb79b291 100644 --- a/apps/theming/css/settings-admin.css +++ b/apps/theming/css/settings-admin.css @@ -101,3 +101,7 @@ form.uploadButton { max-height: 20%; margin-top: 20px; } + +.theming-hints { + margin-top: 20px; +}
\ No newline at end of file diff --git a/apps/theming/lib/Settings/Admin.php b/apps/theming/lib/Settings/Admin.php index 12f5dd2b8fa..708bf1914ea 100644 --- a/apps/theming/lib/Settings/Admin.php +++ b/apps/theming/lib/Settings/Admin.php @@ -82,6 +82,8 @@ class Admin implements ISettings { 'background' => $this->themingDefaults->getBackground(), 'backgroundMime' => $this->config->getAppValue('theming', 'backgroundMime', ''), 'uploadLogoRoute' => $path, + 'canThemeIcons' => $this->themingDefaults->shouldReplaceIcons(), + 'iconDocs' => $this->urlGenerator->linkToDocs('admin-theming-icons') ]; return new TemplateResponse('theming', 'settings-admin', $parameters, ''); diff --git a/apps/theming/templates/settings-admin.php b/apps/theming/templates/settings-admin.php index 717e2bdb83c..c7451e595d7 100644 --- a/apps/theming/templates/settings-admin.php +++ b/apps/theming/templates/settings-admin.php @@ -88,5 +88,16 @@ style('theming', 'settings-admin'); <div id="theming-preview"> <img src="<?php p($_['logo']); ?>" id="theming-preview-logo" /> </div> + <div class="theming-hints"> + <?php if (!$_['canThemeIcons']) { ?> + <p class="info"> + <a href="<?php p($_['iconDocs']); ?>"> + <em> + <?php p($l->t('Install the Imagemagick PHP extension with support for SVG images to automatically generate favicons based on the uploaded logo and color.')); ?> ↗ + </em> + </a> + </p> + <?php } ?> + </div> <?php } ?> </div> diff --git a/apps/theming/tests/Settings/AdminTest.php b/apps/theming/tests/Settings/AdminTest.php index 4f3c9a9faaa..bb68651d143 100644 --- a/apps/theming/tests/Settings/AdminTest.php +++ b/apps/theming/tests/Settings/AdminTest.php @@ -101,6 +101,8 @@ class AdminTest extends TestCase { 'logoMime' => null, 'background' => null, 'backgroundMime' => null, + 'canThemeIcons' => null, + 'iconDocs' => null, ]; $expected = new TemplateResponse('theming', 'settings-admin', $params, ''); @@ -151,6 +153,8 @@ class AdminTest extends TestCase { 'logoMime' => null, 'background' => null, 'backgroundMime' => null, + 'canThemeIcons' => null, + 'iconDocs' => null, ]; $expected = new TemplateResponse('theming', 'settings-admin', $params, ''); |