diff options
author | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-10-26 21:55:43 +0000 |
---|---|---|
committer | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-10-26 21:55:43 +0000 |
commit | af157c6bb72518f8ee3096f6370c920ef9b965a3 (patch) | |
tree | 74c2ef2e92825ac5b8bae214fb93680774733724 /data/templates/bookmarks-vote.inc.tpl.php | |
parent | 44fd0e29f4d856058f3bac3a3581d00919420169 (diff) | |
download | semanticscuttle-af157c6bb72518f8ee3096f6370c920ef9b965a3.tar.gz semanticscuttle-af157c6bb72518f8ee3096f6370c920ef9b965a3.tar.bz2 |
basic voting system works; but layout is missing
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@432 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'data/templates/bookmarks-vote.inc.tpl.php')
-rw-r--r-- | data/templates/bookmarks-vote.inc.tpl.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/data/templates/bookmarks-vote.inc.tpl.php b/data/templates/bookmarks-vote.inc.tpl.php new file mode 100644 index 0000000..89818f8 --- /dev/null +++ b/data/templates/bookmarks-vote.inc.tpl.php @@ -0,0 +1,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>'; +?>
\ No newline at end of file |