Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2017-11-01 10:19:04 +0300
committerdartcafe <github@dartcafe.de>2017-11-01 10:19:04 +0300
commit05d57c2750c8aea2d0a9a93220ee7553e2bd6598 (patch)
tree3efc69d3b872d2f63e48393164449a55fcaf1b91 /templates
parent2427c9cbb25865c98a260499ff914b2800d78897 (diff)
Hide header elements on public pages
Diffstat (limited to 'templates')
-rw-r--r--templates/goto.tmpl.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/goto.tmpl.php b/templates/goto.tmpl.php
index 227f252e..c96630b4 100644
--- a/templates/goto.tmpl.php
+++ b/templates/goto.tmpl.php
@@ -25,6 +25,10 @@
\OCP\Util::addStyle('polls', 'main');
\OCP\Util::addStyle('polls', 'vote');
+ if (!User::isLoggedIn()) {
+ \OCP\Util::addStyle('polls', 'public');
+ }
+
\OCP\Util::addStyle('polls', 'app-navigation-simulation');
\OCP\Util::addScript('polls', 'app');
\OCP\Util::addScript('polls', 'vote');
@@ -65,6 +69,7 @@
$pollTypeClass = 'option-poll';
}
+
if ( $poll->getDescription() != null
&& $poll->getDescription() != ''
) {
@@ -79,7 +84,6 @@
$total['yes'][$i] = 0;
$total['no'][$i] = 0;
}
-
$userVoted = array();
$pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', ['hash' => $poll->getHash()]);
?>