diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-05-24 15:21:35 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-05-24 23:39:50 +0200 |
commit | 0847c98aaf659a9e9ce966952820d096d3ec1f0c (patch) | |
tree | e0f764ae31ec9c5a034cb080f614e1c1610ee3f4 /apps | |
parent | 16c061818eceb2d5356030cfa620d256e7a8b284 (diff) | |
download | nextcloud-server-0847c98aaf659a9e9ce966952820d096d3ec1f0c.tar.gz nextcloud-server-0847c98aaf659a9e9ce966952820d096d3ec1f0c.zip |
addjust footer height when legal links are present. fixes #9572
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/theming/css/theming.scss | 6 | ||||
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 10 | ||||
-rw-r--r-- | apps/theming/tests/ThemingDefaultsTest.php | 3 |
3 files changed, 16 insertions, 3 deletions
diff --git a/apps/theming/css/theming.scss b/apps/theming/css/theming.scss index f65e20fa9b7..6b0566039d2 100644 --- a/apps/theming/css/theming.scss +++ b/apps/theming/css/theming.scss @@ -192,3 +192,9 @@ input.primary, border: 1px solid #ebebeb; } } + +@if ($has-legal-links == 'true') { + footer { + height: 92px; + } +} diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index b61179b681e..00c47676bc8 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -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; } diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index 2cd415d98df..6894b002eb9 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -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()); } |