Sha256: 2dcabebfbda4f5596f113818e1b1a250b945b13d6a4e1242604f4299fea72d14

Contents?: true

Size: 885 Bytes

Versions: 2

Compression:

Stored size: 885 Bytes

Contents

.comment id="comment#{comment.id}"
  - if comment.author.try(:avatar_url).present?
    = image_tag comment.author.avatar_url, class: "avatar"
  - else
    = image_tag "dorsale/avatar.png", class: "avatar"

  p.actions
    - if policy(comment).update?
      = icon_link_to :pencil, t("actions.edit"), dorsale.edit_comment_path(comment), class: "edit"

    - if policy(comment).delete?
      = icon_link_to :trash, t("actions.delete"), dorsale.comment_path(comment), method: :delete, remote: true, data: {confirm: t("actions.confirm")}

  p.infos
    span.commentable-container
      span.commentable
        = link_to_object(comment.commentable)

      span.separator
        = " - "

    span.date
      = date(comment.created_at)

    = " "
    = ::Dorsale::Comment.t(:written_by)
    = " "
    span.author
      = comment.author.to_s

  p.text = text2html(comment.text)

  .clearfix

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dorsale-3.5.0 app/views/dorsale/comments/_comment.html.slim
dorsale-3.4.0 app/views/dorsale/comments/_comment.html.slim