addjust footer height when legal links are present. fixes #9572

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2018-05-24 15:21:35 +02:00
parent 323b665e88
commit ac22c28045
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
3 changed files with 16 additions and 3 deletions

View File

@ -155,3 +155,9 @@ input.primary,
border: 1px solid #ebebeb;
}
}
@if ($has-legal-links == 'true') {
footer {
height: 92px;
}
}

View File

@ -143,11 +143,11 @@ class ThemingDefaults extends \OC_Defaults {
}
public function getImprintUrl() {
return $this->config->getAppValue('theming', 'imprintUrl', '');
return (string)$this->config->getAppValue('theming', 'imprintUrl', '');
}
public function getPrivacyUrl() {
return $this->config->getAppValue('theming', 'privacyUrl', '');
return (string)$this->config->getAppValue('theming', 'privacyUrl', '');
}
public function getShortFooter() {
@ -290,6 +290,12 @@ class ThemingDefaults extends \OC_Defaults {
if ($this->config->getAppValue('theming', 'backgroundMime', null) === 'backgroundColor') {
$variables['image-login-plain'] = 'true';
}
$variables['has-legal-links'] = 'false';
if($this->getImprintUrl() !== '' || $this->getPrivacyUrl() !== '') {
$variables['has-legal-links'] = 'true';
}
$cache->set('getScssVariables', $variables);
return $variables;
}

View File

@ -670,7 +670,8 @@ class ThemingDefaultsTest extends TestCase {
'color-primary' => $this->defaults->getColorPrimary(),
'color-primary-text' => '#ffffff',
'image-login-plain' => 'false',
'color-primary-element' => '#aaaaaa'
'color-primary-element' => '#aaaaaa',
'has-legal-links' => 'false'
];
$this->assertEquals($expected, $this->template->getScssVariables());