From 7e0f6a31321a93cd65b5ce9186400244464526ce Mon Sep 17 00:00:00 2001 From: cweiske Date: Wed, 28 Oct 2009 22:19:50 +0000 Subject: show own voting as background color git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@452 b3834d28-1941-0410-a4f8-b48e95affb8f --- data/templates/bookmarks-vote.inc.tpl.php | 6 ++++++ www/scuttle.css | 10 ++++++++-- 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 */ -- cgit v1.2.3