Skip to content

Commit

Permalink
addjust footer height when legal links are present. fixes #9572
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed May 24, 2018
1 parent 16c0618 commit 0847c98
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 6 additions & 0 deletions apps/theming/css/theming.scss
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,9 @@ input.primary,
border: 1px solid #ebebeb;
}
}

@if ($has-legal-links == 'true') {
footer {
height: 92px;
}
}
10 changes: 8 additions & 2 deletions apps/theming/lib/ThemingDefaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ public function getSlogan() {
}

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() {
Expand Down Expand Up @@ -287,6 +287,12 @@ public function getScssVariables() {
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;
}
Expand Down
3 changes: 2 additions & 1 deletion apps/theming/tests/ThemingDefaultsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,8 @@ public function testGetScssVariables() {
'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());
}
Expand Down

0 comments on commit 0847c98

Please sign in to comment.