Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
only show change goal link if user owns stamp
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanb committed Sep 5, 2009
1 parent 88091bf commit 68050b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/stamps/_score.html.erb
@@ -1,7 +1,9 @@
<div id="score_bar" style="background-position: <%= -200 + (stamp.goal_progress*2) %>px 0">score <%=h stamp.score %></div>
<div id="score_goal">
<%= stamp.goal_score %>
<span id="change_goal">(<%= link_to "change goal", edit_goal_stamp_path(stamp) %>)</span>
<% if stamp.user == current_user %>
<span id="change_goal">(<%= link_to "change goal", edit_goal_stamp_path(stamp) %>)</span>
<% end %>
</div>
<% if stamp.goal_reached? && !stamp.goal_reward.blank? %>
<div id="goal_reward">
Expand Down

0 comments on commit 68050b4

Please sign in to comment.