Merge pull request #7112 from nextcloud/theming-imagemagick-hint

Theming: add hint about favicon generation
This commit is contained in:
Morris Jobke 2017-11-09 12:16:55 +01:00 committed by GitHub
commit c7e5bc0f9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 0 deletions

View File

@ -101,3 +101,7 @@ form.uploadButton {
max-height: 20%;
margin-top: 20px;
}
.theming-hints {
margin-top: 20px;
}

View File

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

View File

@ -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>

View File

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