h1
  ' Viewing last 25 versions of post by
  = render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @post, conn: @conn
  ' in topic
  a href=(~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}?#{[post_id: @post.id]}" <> "#post_#{@post.id}")
    = @post.topic.title

= for version <- @versions do
  article.block.communication
    .block__content.flex.flex--no-wrap
      .flex__fixed.spacing--right
        = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @post, conn: @conn

      .flex__grow.communication__body
        span.communication__body__sender-name = render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @post, awards: true, conn: @conn
        br

        = render PhilomenaWeb.UserAttributionView, "_anon_user_title.html", object: @post, conn: @conn

        .communication__body__text
          = for edit <- version.difference do
            = case edit do
              - {:eq, value} ->
                = escape_nl2br(value)

              - {:ins, value} ->
                ins.differ = escape_nl2br(value)

              - {:del, value} ->
                del.differ = escape_nl2br(value)

    .block__content.communication__options
      .flex.flex--wrap.flex--spaced-out
        div
          = if version.edit_reason not in [nil, ""] do
            ' Reason:
            = version.edit_reason
          - else
            ' No reason given

        .flex__right
          ' Edited
          => pretty_time(version.created_at)
          ' by
          => render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: version, conn: @conn
