Fixes #27: The favorite function does not work

This commit is contained in:
albert
2011-09-13 14:44:23 -04:00
parent f63de376b7
commit 6da2bbde0d

View File

@@ -1,7 +1,9 @@
<ul>
<%= resize_image_links(post, CurrentUser.user) %>
<li><%= link_to "Favorite", favorite_path(:post_id => post.id), :remote => true, :method => :post, :id => "add-to-favorites" %></li>
<li><%= link_to "Unfavorite", favorite_path(post), :remote => true, :method => :delete, :id => "remove-from-favorites" %></li>
<% if CurrentUser.is_member? %>
<li><%= link_to "Favorite", favorites_path(:post_id => post.id), :remote => true, :method => :post, :id => "add-to-favorites" %></li>
<li><%= link_to "Unfavorite", favorite_path(post), :remote => true, :method => :delete, :id => "remove-from-favorites" %></li>
<% end %>
<li><%= link_to "Translate", "#", :id => "translate", :title => "Shortcut is CTRL+N" %></li>
<li><%= link_to "Flag", new_post_flag_path(:post_id => post.id), :id => "flag" %></li>
<li><%= link_to "Appeal", new_post_appeal_path(:post_id => post.id), :id => "appeal" %></li>