diff --git vud.theme.inc vud.theme.inc index db53654..b273852 100644 --- vud.theme.inc +++ vud.theme.inc @@ -230,6 +230,8 @@ function vud_widget_proxy($content_id, $type, $tag, $widget_theme, $readonly=NUL $link_down = url("vote/$type/$content_id/-1/$tag/$widget_theme/$token_down"); $message_on_deny = variable_get('vud_message_on_deny', FALSE); $variables['show_links'] = !$readonly || $message_on_deny; + $variables['show_up_as_link'] = $variables['show_links'] && ($user_vote <= 0); + $variables['show_down_as_link'] = $variables['show_links'] && ($user_vote >= 0); if ($readonly) { $variables['link_class_up'] .= ' denied'; $variables['link_class_down'] .= ' denied'; diff --git widgets/alternate/widget.tpl.php widgets/alternate/widget.tpl.php index 768b47d..a8aceeb 100644 --- widgets/alternate/widget.tpl.php +++ widgets/alternate/widget.tpl.php @@ -11,10 +11,14 @@
- -
-
-
+ + + +
+
+ +
+ diff --git widgets/plain/widget.tpl.php widgets/plain/widget.tpl.php index b0a9624..e4b7e43 100644 --- widgets/plain/widget.tpl.php +++ widgets/plain/widget.tpl.php @@ -9,13 +9,21 @@ ?>
- - -
-
- - -
-
+ + + + +
+ +
+ + + + + +
+ +
+
diff --git widgets/upanddown/widget.tpl.php widgets/upanddown/widget.tpl.php index 761c86b..97cc5e5 100644 --- widgets/upanddown/widget.tpl.php +++ widgets/upanddown/widget.tpl.php @@ -6,6 +6,7 @@ * widget.tpl.php * * UpAndDown widget theme for Vote Up/Down + * TODO use $show_up_as_link and $show_down_as_link */ ?>
diff --git widgets/updown/updown.css widgets/updown/updown.css index 30744ea..0314e36 100644 --- widgets/updown/updown.css +++ widgets/updown/updown.css @@ -43,12 +43,12 @@ font-size: 20px; } -.vud-widget-updown .vud-link-up div { +.vud-widget-updown div.updown-up { float: left; margin-right: 3px; } -.vud-widget-updown .vud-link-down div { +.vud-widget-updown div.updown-down { float: left; margin-left: 3px; } diff --git widgets/updown/widget.tpl.php widgets/updown/widget.tpl.php index d721d85..67714db 100644 --- widgets/updown/widget.tpl.php +++ widgets/updown/widget.tpl.php @@ -14,13 +14,21 @@
- -
+
-
-
- -
-
-
-
+ + + +
+
+
+ +
+ + + + +
-
+
+ +
+