<h1>
  {{ motion.getTitle() }}
  <small>
    <translate>Motion</translate> {{ motion.identifier }}
    <span ng-if="motion.versions.length > 1" >| Version {{ (motion.versions | filter: {id: motion.active_version})[0].version_number }}</span>
  </small>
</h1>

<div id="submenu">
  <a ui-sref="motions.motion.list" class="btn btn-sm btn-default">
    <i class="fa fa-angle-double-left fa-lg"></i>
    <translate>Back to overview</translate>
  </a>
  <a ui-sref="motions_single_pdf({pk: motion.id})" target="_blank" class="btn btn-default btn-sm">
    <i class="fa fa-file-pdf-o fa-lg"></i>
    <translate>PDF</translate>
  </a>
  <!-- project -->
  <a os-perms="core.can_manage_projector" class="btn btn-default btn-sm" 
      ng-class="{ 'btn-primary': motion.isProjected() }"
      ng-click="motion.project()"
      title="{{ 'Project motion' | translate }}">
    <i class="fa fa-video-camera"></i>
  </a>
  <!-- edit -->
  <a ui-sref="motions.motion.detail.update({id: motion.id })" os-perms="motions.can_manage"
      class="btn btn-default btn-sm"
      title="{{ 'Edit' | translate}}">
    <i class="fa fa-pencil"></i>
  </a>
</div>

<div class="row">
  <div class="col-sm-8">
    <h3 translate>Text</h3>
    <div class="white-space-pre-line">{{ motion.getText() }}</div>

    <h3 translate>Reason</h3>
    <div class="white-space-pre-line">{{ motion.getReason() }}</div>
  </div>

  <div class="col-sm-4">
    <div class="well">
      <h3 translate>Submitters</h3>
      <div ng-repeat="submitter in motion.submitters">
        {{ (users | filter: {id: submitter})[0].get_full_name() }}<br>
      </div>

      <h3 translate>Category</h3>
      {{ (categories | filter: {id: motion.category})[0].name }}</a>

      <h3 translate>Voting result</h3>
      -
    </div>
  </div>
</div>
