<!-- A summary of all changes -->
<section class="change-recommendation-overview">
    <strong>
        <translate>Summary of change recommendations</translate>:
    </strong>

    <button os-perms="motions.can_manage" class="btn btn-sm btn-default pull-right"
        uib-tooltip="{{ 'Note: You have to reject all change recommendations if the plenum does not follow the recommendation.' | translate }}"
        ng-click="viewChangeRecommendations.rejectAll(motion)">
      <i class="fa fa-thumbs-down"></i>
      <translate>Reject all change recommendations</translate>
    </button>

    <ul ng-if="change_recommendations.length > 0">
        <li ng-repeat="change in (changes = (change_recommendations | filter:{motion_version_id:version}:true | orderBy: 'line_from')) ">
          <a href='' ng-click="viewChangeRecommendations.scrollToDiffBox(change.id)">
            <span ng-if="change.line_from >= change.line_to - 1" class="line-number">
                <translate>Line</translate> {{ change.line_from }}:
            </span>
            <span ng-if="change.line_from < change.line_to - 1" class="line-number">
                <translate>Line</translate> {{ change.line_from }} - {{ change.line_to - 1 }}:
            </span>
            <span class="operation">
                <translate ng-if="change.getType(motion.getVersion(version).text) == 0">Replacement</translate>
                <translate ng-if="change.getType(motion.getVersion(version).text) == 1">Insertion</translate>
                <translate ng-if="change.getType(motion.getVersion(version).text) == 2">Deletion</translate>
            </span>
            <span class="status">
                <translate ng-if="change.rejected">Rejected</translate>
            </span>
          </a>
        </li>
    </ul>

    <div ng-if="change_recommendations.length == 0" class="no-changes">
        <translate>No change recommendations yet</translate>
    </div>
</section>
