Permalink
Browse files

don't show stamp if private

  • Loading branch information...
1 parent 39cfd26 commit 26f0f6abce3cb4a4a89ac9311bb94c8948eb10df @ryanb committed Sep 12, 2009
Showing with 14 additions and 12 deletions.
  1. +14 −12 app/views/favorites/index.html.erb
View
26 app/views/favorites/index.html.erb
@@ -8,18 +8,20 @@
</p>
<% else %>
<% for favorite in @favorites %>
- <div class="stamp">
- <div class="score">
- <%= render :partial => "stamps/score", :locals => { :stamp => favorite.stamp } %>
+ <% unless favorite.stamp.private? %>
+ <div class="stamp">
+ <div class="score">
+ <%= render :partial => "stamps/score", :locals => { :stamp => favorite.stamp } %>
+ </div>
+ <div class="stamper"><%= link_to image_tag("stamper/#{h(favorite.stamp.color)}/small.png", :size => "40x52", :alt => h(favorite.stamp.name)), favorite.stamp %></div>
+ <h2><%=h favorite.stamp.name %></h2>
+ <p>
+ Stamp by <%=h favorite.stamp.user.display_name if favorite.stamp.user %> |
+ <%= link_to "View Details", favorite.stamp %> |
+ <%= link_to "Stop Watching", favorite, :method => :delete, :confirm => "Are you sure you want to stop watching this stamp?" %>
+ </p>
+ <div class="clear"></div>
</div>
- <div class="stamper"><%= link_to image_tag("stamper/#{h(favorite.stamp.color)}/small.png", :size => "40x52", :alt => h(favorite.stamp.name)), favorite.stamp %></div>
- <h2><%=h favorite.stamp.name %></h2>
- <p>
- Stamp by <%=h favorite.stamp.user.display_name if favorite.stamp.user %> |
- <%= link_to "View Details", favorite.stamp %> |
- <%= link_to "Stop Watching", favorite, :method => :delete, :confirm => "Are you sure you want to stop watching this stamp?" %>
- </p>
- <div class="clear"></div>
- </div>
+ <% end %>
<% end %>
<% end %>

0 comments on commit 26f0f6a

Please sign in to comment.