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 16c061818e
commit 0847c98aaf
No known key found for this signature in database
GPG key ID: 7424F1874854DF23
3 changed files with 16 additions and 3 deletions

View file

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

View file

@ -142,11 +142,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() {
@ -287,6 +287,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

@ -654,7 +654,8 @@ class ThemingDefaultsTest extends TestCase {
'theming-logoheader-mime' => '\'jpeg\'',
'theming-favicon-mime' => '\'jpeg\'',
'image-logoheader' => '\'custom-logoheader?v=0\'',
'image-favicon' => '\'custom-favicon?v=0\''
'image-favicon' => '\'custom-favicon?v=0\'',
'has-legal-links' => 'false'
];
$this->assertEquals($expected, $this->template->getScssVariables());
}