fix dup comment showing with comments with more than three, also fixed veribage
This commit is contained in:
parent
93da0ddd25
commit
7f5dc14726
2 changed files with 4 additions and 2 deletions
|
|
@ -5,7 +5,9 @@
|
|||
module StreamHelper
|
||||
|
||||
def comment_toggle(count)
|
||||
if count < 3
|
||||
if count == 0
|
||||
link_to "#{t('comments.new_comment.comment').downcase}", '#', :class => "show_post_comments"
|
||||
elsif count < 3
|
||||
link_to "#{t('stream_helper.hide_comments')} (#{count})", '#', :class => "show_post_comments"
|
||||
else
|
||||
link_to "#{t('stream_helper.show_comments')} (#{count})", '#', :class => "show_post_comments"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
%ul.comments{:id => post_id, :class => ("hidden" if comment_hashes.size == 0)}
|
||||
-if comment_hashes.size > 3
|
||||
.older_comments.hidden.inactive
|
||||
= render :partial => 'comments/comment', :collection => comment_hashes[0..-3], :as => :hash
|
||||
= render :partial => 'comments/comment', :collection => comment_hashes[0..-4], :as => :hash
|
||||
= render :partial => 'comments/comment', :collection => comment_hashes[-3, 3], :as => :hash
|
||||
-else
|
||||
= render :partial => 'comments/comment', :collection => comment_hashes, :as => :hash
|
||||
|
|
|
|||
Loading…
Reference in a new issue