summaryrefslogtreecommitdiff
path: root/data/templates/bookmarks-vote.inc.tpl.php
blob: 89818f8aec5fe68f5ed187505f1957d8ef048719 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/**
 * Bookmark voting badge.
 * Shows the number of votes and buttons to vote for or
 * against a bookmark.
 * Expects a $row variable with bookmark data
 */
if (!$GLOBALS['enableVoting']) {
    return;
}
echo '<span class="vote-badge">';
if (!$row['hasVoted']) {
    echo '<a class="vote-for" href="'
        . createVoteURL(true, $row['bId']) . '">+</a>';
} else {
    echo '<span class="vote-against-i">+</span>';
}
echo '<span class="voting">' . $row['bVoting'] . '</span>';
if (!$row['hasVoted']) {
    echo '<a class="vote-against" href="'
        . createVoteURL(false, $row['bId']) . '">-</a>';
} else {
    echo '<span class="vote-against-i">-</span>';
}
echo '</span>';
?>