Hide up/down if not present

This commit is contained in:
Tyler Renelle
2012-02-01 12:26:23 -05:00
parent c2c534777d
commit 6268c0fd6d

View File

@@ -15,8 +15,8 @@
<% if habit.habit_type==Habit::ALWAYS %> <% if habit.habit_type==Habit::ALWAYS %>
<%= link_to "√", { :action => "vote", :id => habit.id, :vote => 'up' }, :remote=>true %> <%= link_to("√", { :action => "vote", :id => habit.id, :vote => 'up' }, :remote=>true) if habit.up %>
<%= link_to "X", { :action => "vote", :id => habit.id, :vote => 'down' }, :remote=>true %> <%= link_to("X", { :action => "vote", :id => habit.id, :vote => 'down' }, :remote=>true) if habit.down %>
<%= raw name %> (<%= habit.score %>) <%= raw name %> (<%= habit.score %>)
<% elsif habit.habit_type==Habit::DAILY %> <% elsif habit.habit_type==Habit::DAILY %>
<% if habit.done %> <% if habit.done %>