- post_p = present(post)

.forum-post.card.mb-3
  %div{ id: "post_#{post.id}" }

  .card-header
    .user
      = render 'users/listing', user: post.created_by

  .card-body
    .content.markdown.pb-3
      = post_p.content

    .footer.row.no-gutters.align-items-center.pt-2
      .created-at{ 'data-toggle': 'tooltip', title: post_p.created_at }
        Posted #{post_p.created_at_in_words} ago

      - if post.edits.size > 1
        .edited-at.text-muted.ml-1{ 'data-toggle': 'tooltip', title: post_p.last_edited }
          \- edited #{post_p.last_edited_in_words} ago

      .actions.ml-auto
        - if defined? user_can_edit_post? && user_can_edit_post?(post)
          - if post.edits.size > 1
            = link_to 'History', edits_for_forums_post_path(post), class: 'action p-1'
            %span ·

          = link_to 'Edit', post_p.edit_path, class: 'action p-1'
          %span ·

        - if quote_id
          %a{ class: 'action p-1', data: { quote: { id: quote_id, text: post_p.quote } } }
            Quote
          %span ·

        = link_to 'Link', "#post_#{post.id}", class: 'action p-1'

- post_p = present(post)

.forum-post.card.mb-3
  %div{ id: "post_#{post.id}" }

  .card-header
    .user
      = render 'users/listing', user: post.created_by

  .card-body
    .content.markdown.pb-3
      = post_p.content

    .footer.row.no-gutters.align-items-center.pt-2
      .created-at{ 'data-toggle': 'tooltip', title: post_p.created_at }
        Posted #{post_p.created_at_in_words} ago

      - if post.edits.size > 1
        .edited-at.text-muted.ml-1{ 'data-toggle': 'tooltip', title: post_p.last_edited }
          \- edited #{post_p.last_edited_in_words} ago

      .actions.ml-auto
        - if defined?(user_can_edit_post?) && user_can_edit_post?(post)
          - if post.edits.size > 1
            = link_to 'History', edits_for_forums_post_path(post), class: 'action p-1'
            %span ·

          = link_to 'Edit', post_p.edit_path, class: 'action p-1'
          %span ·

        - if quote_id && user_signed_in?
          %a{ class: 'action p-1', data: { quote: { id: quote_id, text: post_p.quote } } }
            Quote
          %span ·

        = link_to 'Link', "#post_#{post.id}", class: 'action p-1'

Fix edit post link showing for all users
Fix edit post link showing for all users
