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>2018-11-25 23:39:09 +0300
committerdartcafe <github@dartcafe.de>2018-11-25 23:39:09 +0300
commit08c6e0d67cc1909e77b2b5a79ad6055d4157b4f0 (patch)
tree20ee020b66099f8b653af821b3fd55cc146ee998 /templates
parentbf59ea31a94167f2011bb9d91f72541687689c6f (diff)
Fixes icon handling and NC15 compatibility
Diffstat (limited to 'templates')
-rw-r--r--templates/goto.tmpl.php16
-rw-r--r--templates/main.tmpl.php12
2 files changed, 14 insertions, 14 deletions
diff --git a/templates/goto.tmpl.php b/templates/goto.tmpl.php
index 9e146dec..50fcff66 100644
--- a/templates/goto.tmpl.php
+++ b/templates/goto.tmpl.php
@@ -130,9 +130,9 @@
<a id="switchDetails" class="button has-tooltip-bottom details" title="Details" href="#">
<span class="symbol icon-settings"></span>
<?php if (count($comments)) : ?>
- <div id="comment-counter" class="badge"><?php p(count($comments)) ?></div>
+ <div id="comment-counter" class="badge icon-comment-yes"><?php p(count($comments)) ?></div>
<?php else: ?>
- <div id="comment-counter" class="badge no-comments"><?php p(count($comments)) ?></div>
+ <div id="comment-counter" class="badge no-comments icon-comment-no"><?php p(count($comments)) ?></div>
<?php endif; ?>
</a>
</div>
@@ -164,11 +164,11 @@
}
print_unescaped('<div class="counter flex-row">');
print_unescaped(' <div class="yes flex-row">');
- print_unescaped(' <div class="svg"></div>');
+ print_unescaped(' <div class="icon-yes"></div>');
print_unescaped(' <div id="counter_yes_voteid_' . $optionElement->getId() . '" class ="result-cell yes" data-voteId="' . $optionElement->getId() . '">0</div>');
print_unescaped(' </div>');
print_unescaped(' <div class="no flex-row">');
- print_unescaped(' <div class="svg"></div>');
+ print_unescaped(' <div class="icon-no"></div>');
print_unescaped(' <div id="counter_no_voteid_' . $optionElement->getId() . '" class ="result-cell no" data-voteId="' . $optionElement->getId() . '">0</div>');
print_unescaped(' </div>');
print_unescaped('</div>');
@@ -234,10 +234,10 @@
// look what user voted for this dts
foreach ($others[$usr] as $vote) {
if ($optionElement->getPollOptionText() === $vote->getVoteOptionText()) {
- $class = $vote->getVoteAnswer();
+ $class = $vote->getVoteAnswer() . ' icon-'.$vote->getVoteAnswer();
break;
}
- $class = 'no';
+ $class = 'no icon-no';
}
print_unescaped('<li id="voteid_' . $optionElement->getId() . '" class="flex-column poll-cell ' . $class . '"></li>');
$i_tot++;
@@ -275,12 +275,12 @@
$i_tot = 0;
foreach ($options as $optionElement) {
// see if user already has data for this event
- $class = 'no';
+ $class = 'no icon-no';
$dataUnvoted = '';
if (isset($userVoted)) {
foreach ($userVoted as $vote) {
if ($optionElement->getPollOptionText() === $vote->getVoteOptionText()) {
- $class = $vote->getVoteAnswer();
+ $class = $vote->getVoteAnswer() . ' icon-'.$vote->getVoteAnswer();
break;
} else {
$class = 'unvoted';
diff --git a/templates/main.tmpl.php b/templates/main.tmpl.php
index ec4cd18a..c4809d94 100644
--- a/templates/main.tmpl.php
+++ b/templates/main.tmpl.php
@@ -103,12 +103,12 @@
$expiry_style = '';
$participated = $_['votes'];
- $participated_class = 'partic_no';
+ $participated_class = 'no';
$participated_title = 'You did not vote';
$participated_count = count($participated);
$comments = $_['comments'];
- $commented_class = 'commented_no';
+ $commented_class = 'no';
$commented_title = 'You did not comment';
$commented_count = count($comments);
@@ -131,7 +131,7 @@
for ($i = 0; $i < count($participated); $i++) {
if ($poll->getId() === $participated[$i]->getPollId()) {
- $participated_class = 'partic_yes';
+ $participated_class = 'yes';
$participated_title = 'You voted in this poll';
array_splice($participated, $i, 1);
break;
@@ -140,7 +140,7 @@
for ($i = 0; $i < count($comments); $i++) {
if ($poll->getId() === $comments[$i]->getPollId()) {
- $commented_class = 'commented_yes';
+ $commented_class = 'yes';
$commented_title = 'You commented this poll';
array_splice($comments, $i, 1);
break;
@@ -150,7 +150,7 @@
<div class="table-row table-body">
<div class="wrapper group-master">
<div class="wrapper group-1">
- <div class="thumbnail <?php p($expiry_style . ' ' . $commented_class . ' ' . $participated_class); ?>"></div><!-- Image to display the status or type of poll -->
+ <div class="thumbnail <?php p($expiry_style . ' commented_' . $commented_class . ' partic_' . $participated_class); ?>"></div><!-- Image to display the status or type of poll -->
<a href="<?php p($pollUrl); ?>" class="wrapper group-1-1">
<div class="flex-column name"> <?php p($poll->getTitle()); ?></div>
<div class="flex-column description"> <?php p($poll->getDescription()); ?></div>
@@ -211,7 +211,7 @@
<div class="flex-column has-tooltip expiry<?php p($expiry_style . $timestamp_style); ?>" data-timestamp="<?php p(strtotime($poll->getExpire()) * 1000); ?>" data-value="<?php p($poll->getExpire()); ?>"> <?php p($expiry_date); ?></div>
<div class="flex-column participants">
<div class="symbol alt-tooltip partic_voted icon-<?php p($participated_class); ?>" title="<?php p($participated_title); ?>"></div>
- <div class="symbol alt-tooltip partic_commented icon-<?php p($commented_class); ?>" title="<?php p($commented_title); ?>"></div>
+ <div class="symbol alt-tooltip partic_commented icon-comment-<?php p($commented_class); ?>" title="<?php p($commented_title); ?>"></div>
</div>
</div>
</div>