Fix and simplify likes_container
This commit is contained in:
parent
5967f01dab
commit
67123a277c
2 changed files with 4 additions and 10 deletions
|
|
@ -5,16 +5,10 @@
|
|||
.likes_container
|
||||
- if likes_count > 0
|
||||
= image_tag('icons/heart.svg')
|
||||
- if defined?(likes_index_link) && likes_index_link
|
||||
- if target_type == "Comment"
|
||||
= link_to t('likes.likes.people_like_this_comment', :count => likes_count), post_likes_path(target_id), :class => "expand_likes"
|
||||
- else
|
||||
= link_to t('likes.likes.people_like_this', :count => likes_count), post_likes_path(target_id), :class => "expand_likes"
|
||||
- if target_type == "Comment"
|
||||
= t('likes.likes.people_like_this_comment', :count => likes_count)
|
||||
- else
|
||||
- if target_type == "Comment"
|
||||
= t('likes.likes.people_like_this_comment', :count => likes_count)
|
||||
- else
|
||||
= t('likes.likes.people_like_this', :count => likes_count)
|
||||
= link_to t('likes.likes.people_like_this', :count => likes_count), post_likes_path(target_id), :class => "expand_likes"
|
||||
%span.hidden.likes_list
|
||||
/= render 'likes/likes', :likes => likes
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,6 @@
|
|||
= link_to t('comments.new_comment.comment'), '#', :class => 'focus_comment_textarea'
|
||||
|
||||
.likes.on_post
|
||||
= render "likes/likes_container", :target_id => post.id, :likes_count => post.likes_count, :current_user => current_user, :likes_index_link => true, :target_type => "Post"
|
||||
= render "likes/likes_container", :target_id => post.id, :likes_count => post.likes_count, :current_user => current_user, :target_type => "Post"
|
||||
|
||||
= render "comments/comments", :post => post, :current_user => current_user, :commenting_disabled => (defined?(@commenting_disabled) && @commenting_disabled)
|
||||
|
|
|
|||
Loading…
Reference in a new issue