aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-28 22:19:50 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-28 22:19:50 +0000
commit7e0f6a31321a93cd65b5ce9186400244464526ce (patch)
tree6f67a5dfaf8c96f889a179c8b677b0b8b5bdfe7b
parentee21c9e47aa5d9ed6079c4e2ca89808a9f9eb93a (diff)
downloadsemanticscuttle-7e0f6a31321a93cd65b5ce9186400244464526ce.tar.gz
semanticscuttle-7e0f6a31321a93cd65b5ce9186400244464526ce.tar.bz2
show own voting as background color
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@452 b3834d28-1941-0410-a4f8-b48e95affb8f
-rw-r--r--data/templates/bookmarks-vote.inc.tpl.php6
-rw-r--r--www/scuttle.css10
2 files changed, 14 insertions, 2 deletions
diff --git a/data/templates/bookmarks-vote.inc.tpl.php b/data/templates/bookmarks-vote.inc.tpl.php
index d59feb4..e80c894 100644
--- a/data/templates/bookmarks-vote.inc.tpl.php
+++ b/data/templates/bookmarks-vote.inc.tpl.php
@@ -10,6 +10,12 @@ if (!$GLOBALS['enableVoting']) {
}
if (isset($row['hasVoted']) && !$row['hasVoted']) {
$classes = 'vote-badge vote-badge-inactive';
+} else if (isset($row['vote'])) {
+ $classes = 'vote-badge '
+ . ($row['vote'] == 1
+ ? 'vote-badge-for'
+ : 'vote-badge-against'
+ );
} else {
$classes = 'vote-badge';
}
diff --git a/www/scuttle.css b/www/scuttle.css
index d224dcf..e8051bc 100644
--- a/www/scuttle.css
+++ b/www/scuttle.css
@@ -280,11 +280,17 @@ a.vote-for:hover {
background-color: #ccffbb;
}
a.vote-against:hover {
- background-color: #ffbbbb;
+ background-color: #ffcccc;
}
.vote-badge .vote-for-inactive, .vote-badge .vote-against-inactive {
font-size: 3px;
- color: white;
+ color: transparent;
+}
+.vote-badge-for {
+ background-color: #ccffbb;
+}
+.vote-badge-against {
+ background-color: #ffcccc;
}
/* SIDEBAR */