<div class="modal-body">
  <div>
    <div id="revision-controls">
      {{d-button action="loadFirstVersion" icon="fast-backward" title="post.revisions.controls.first" disabled=loadFirstDisabled}}
      {{d-button action="loadPreviousVersion" icon="backward" title="post.revisions.controls.previous" disabled=loadPreviousDisabled}}
      <div id="revision-numbers" {{bind-attr class="displayRevisions::invisible"}}>
        {{#conditional-loading-spinner condition=loading size="small"}}
          {{boundI18n revisionsTextKey previousBinding="previousVersion" currentBinding="model.current_version" totalBinding="model.version_count"}}
        {{/conditional-loading-spinner}}
      </div>
      {{d-button action="loadNextVersion" icon="forward" title="post.revisions.controls.next" disabled=loadNextDisabled}}
      {{d-button action="loadLastVersion" icon="fast-forward" title="post.revisions.controls.last" disabled=loadLastDisabled}}
      {{#if displayHide}}
        {{d-button action="hideVersion" icon="trash-o" title="post.revisions.controls.hide" class="btn-danger" disabled=loading}}
      {{/if}}
      {{#if displayShow}}
        {{d-button action="showVersion" icon="undo" title="post.revisions.controls.show" disabled=loading}}
      {{/if}}
    </div>
    <div id="display-modes">
      {{d-button action="displayInline" label="post.revisions.displays.inline.button" title="post.revisions.displays.inline.title" class=inlineClass}}
      {{#unless site.mobileView}}
        {{d-button action="displaySideBySide" label="post.revisions.displays.side_by_side.button" title="post.revisions.displays.side_by_side.title" class=sideBySideClass}}
        {{d-button action="displaySideBySideMarkdown" label="post.revisions.displays.side_by_side_markdown.button" title="post.revisions.displays.side_by_side_markdown.title" class=sideBySideMarkdownClass}}
      {{/unless}}
    </div>
  </div>
  <div id="revision-details">
    {{fa-icon "pencil"}}
    {{#link-to 'user' model.username}}
      {{bound-avatar-template model.avatar_template "small"}} {{model.username}}
    {{/link-to}}
    <span class="date">{{bound-date model.created_at}}</span>
    {{#if model.edit_reason}}
      &mdash; <span class="edit-reason">{{model.edit_reason}}</span>
    {{/if}}
    {{#unless site.mobileView}}
      {{#if model.user_changes}}
        &mdash; {{bound-avatar-template model.user_changes.previous.avatar_template "small"}} {{model.user_changes.previous.username}}
        &rarr; {{bound-avatar-template model.user_changes.current.avatar_template "small"}} {{model.user_changes.current.username}}
      {{/if}}
      {{#if model.wiki_changes}}
        &mdash; {{disabled-icon icon="pencil-square-o" secondary=wikiDisabled}}
      {{/if}}
      {{#if model.post_type_changes}}
        &mdash; {{disabled-icon icon="shield" disabled=postTypeDisabled}}
      {{/if}}
      {{#if model.category_id_changes}}
        &mdash; {{{previousCategory}}} &rarr; {{{currentCategory}}}
      {{/if}}
    {{/unless}}
  </div>
  <div id="revisions" {{bind-attr class="hiddenClasses"}}>
    {{#if model.title_changes}}
      <div class="row">
        <h2>{{{titleDiff}}}</h2>
      </div>
    {{/if}}
    {{#if site.mobileView}}
      {{#if user_changes}}
        <div class="row">
          {{bound-avatar-template model.user_changes.previous.avatar_template "small"}} {{model.user_changes.previous.username}}
          &rarr; {{bound-avatar-template model.user_changes.current.avatar_template "small"}} {{model.user_changes.current.username}}
        </div>
      {{/if}}
      {{#if model.wiki_changes}}
        <div class="row">
          {{disabled-icon icon="pencil-square-o" secondary=wikiDisabled}}
        </div>
      {{/if}}
      {{#if model.post_type_changes}}
        <div class="row">
          {{disabled-icon icon="shield" disabled=postTypeDisabled}}
        </div>
      {{/if}}
      {{#if model.category_id_changes}}
        <div class="row">
          {{{previousCategory}}} &rarr; {{{currentCategory}}}
        </div>
      {{/if}}
    {{/if}}

    {{plugin-outlet "post-revisions"}}

    <div class="row">
      {{{bodyDiff}}}
    </div>
  </div>
</div>
