Merge pull request #1621 from jenkr55/SecondCommentButton

Show second comment button when many comments on a post
This commit is contained in:
pozorvlak
2018-04-20 10:51:18 +01:00
committed by GitHub
2 changed files with 9 additions and 2 deletions

View File

@@ -199,6 +199,9 @@ li.crop-hierarchy
.navbar-bottom
margin: 40px 0px 0px 0px !important
.post-actions
margin-bottom: 1rem
// footer
footer
#footer1, #footer2, #footer3

View File

@@ -36,8 +36,12 @@
= link_to 'Edit Post', edit_post_path(@post), class: 'btn btn-default btn-xs'
- if can? :destroy, @post
= link_to 'Delete Post', @post, method: :delete,
data: { confirm: 'Are you sure?' },
class: 'btn btn-default btn-xs'
data: { confirm: 'Are you sure?' },
class: 'btn btn-default btn-xs'
- if @post.comments.count > 10 && can?(:create, Comment)
.post-actions
= link_to 'Comment', new_comment_path(post_id: @post.id), class: 'btn btn-primary'
= render partial: "comments", locals: { post: @post }