diff options
-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, ''); |