Add footer to public page template

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-04-05 12:22:01 +02:00
parent bbeb3402b6
commit 30e76f9f14
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 20 additions and 0 deletions

View File

@ -76,6 +76,11 @@
<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
<?php print_unescaped($_['content']); ?>
</div>
<?php if($template->getFooterVisible()) { ?>
<footer>
<p class="info"><?php print_unescaped($theme->getLongFooter()); ?></p>
</footer>
<?php } ?>
</div>
</body>

View File

@ -37,6 +37,7 @@ class PublicTemplateResponse extends TemplateResponse {
private $headerTitle = '';
private $headerDetails = '';
private $headerActions = [];
private $footerVisible = true;
/**
* PublicTemplateResponse constructor.
@ -128,6 +129,20 @@ class PublicTemplateResponse extends TemplateResponse {
return array_slice($this->headerActions, 1);
}
/**
* @since 14.0.0
*/
public function setFooterVisible(bool $visible = false) {
$this->footerVisible = $visible;
}
/**
* @since 14.0.0
*/
public function getFooterVisible(): bool {
return $this->footerVisible;
}
/**
* @return string
* @since 14.0.0