summaryrefslogtreecommitdiff
path: root/data/templates/bookmarks-vote.inc.tpl.php
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/bookmarks-vote.inc.tpl.php')
-rw-r--r--data/templates/bookmarks-vote.inc.tpl.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/data/templates/bookmarks-vote.inc.tpl.php b/data/templates/bookmarks-vote.inc.tpl.php
index 37a58c1..5884284 100644
--- a/data/templates/bookmarks-vote.inc.tpl.php
+++ b/data/templates/bookmarks-vote.inc.tpl.php
@@ -8,20 +8,23 @@
if (!$GLOBALS['enableVoting']) {
return;
}
-if ($row['hasVoted']) {
+if (isset($row['hasVoted']) && !$row['hasVoted']) {
$classes = 'vote-badge vote-badge-inactive';
} else {
$classes = 'vote-badge';
}
echo '<span class="' . $classes . '">';
-if (!$row['hasVoted']) {
+
+if (isset($row['hasVoted']) && !$row['hasVoted']) {
echo '<a class="vote-for" href="'
. createVoteURL(true, $row['bId']) . '">+</a>';
} else {
echo '<span class="vote-for-inactive">+</span>';
}
+
echo '<span class="voting">' . $row['bVoting'] . '</span>';
-if (!$row['hasVoted']) {
+
+if (isset($row['hasVoted']) && !$row['hasVoted']) {
echo '<a class="vote-against" href="'
. createVoteURL(false, $row['bId']) . '">-</a>';
} else {