Files
growstuff/app/views/comments/_single.html.haml
2017-06-02 22:50:48 +12:00

31 lines
986 B
Plaintext

.well
.comment
.row
.col-md-1
= render partial: "members/avatar", locals: { member: comment.author }
.col-md-11
.comment-meta
Posted by
- if comment.author
= link_to comment.author.login_name, member_path(comment.author)
- else
Member Deleted
on
= comment.created_at
- if comment.updated_at > comment.created_at
and edited at
= comment.updated_at
.comment-body
:growstuff_markdown
#{ strip_tags comment.body }
- if can?(:edit, comment) || can?(:destroy, comment)
.comment-actions
- if can? :edit, comment
= link_to 'Edit', edit_comment_path(comment), class: 'btn btn-default btn-xs'
- if can? :destroy, comment
= link_to 'Delete', comment, method: :delete,
data: { confirm: 'Are you sure?' }, class: 'btn btn-default btn-xs'