add favorite/unfavorite links to mobile page

This commit is contained in:
r888888888
2014-09-05 16:46:22 -07:00
parent 719343cea5
commit 0e203c5cda
4 changed files with 30 additions and 1 deletions

View File

@@ -5,6 +5,15 @@
<%= @post.presenter.image_html(self) %>
<div id="options">
<% if @post.favorited_by?(CurrentUser.user.id) %>
<%= link_to "Unfavorite", favorite_path(@post), :method => :delete %> |
<% else %>
<%= link_to "Favorite", favorites_path(:post_id => @post.id), :method => :post %> |
<% end %>
<%= link_to "Non-mobile Version", post_path(@post.id) %>
</div>
<div id="tags">
<%= @post.presenter.tag_list_html(self, :name_only => true, :path_prefix => "/m/posts") %>
</div>