<commit_before><div class="header">
  <div class="title">
    <div class="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>
      <!-- List of speakers -->
      <a ui-sref="agenda.item.detail({id: motion.agenda_item_id})"
          os-perms="agenda.can_see" class="btn btn-sm btn-default">
        <i class="fa fa-microphone fa-lg"></i>
        <translate>List of speakers</translate>
      </a>
      <!-- project -->
      <projector-button model="motion" default-projector-id="defaultProjectorId">
      </projector-button>
      <!-- edit -->
      <a ng-if="motion.isAllowed('update')" ng-click="openDialog(motion)"
          class="btn btn-default btn-sm"
          title="{{ 'Edit' | translate}}">
        <i class="fa fa-pencil"></i>
      </a>
      <!-- pdf -->
      <a ng-click="pdfExport.createMotion()" class="btn btn-default btn-sm">
        <i class="fa fa-file-pdf-o fa-lg"></i>
        <translate>PDF</translate>
      </a>
    </div>
    <h1>{{ motion.agenda_item.getTitle() || motion.getTitle() }}</h1>
    <h2>
        <translate>Motion</translate> {{ motion.identifier }}
        <span ng-if="parent">
          (<translate>Amendment of motion</translate>
          <a ui-sref="motions.motion.detail({id: parent.id})">{{ parent.identifier || parent.getTitle() }}</a>)
        </span>
        <span ng-if="motion.versions.length > 1" >| Version {{ motion.getVersion(version).version_number }}</span>
        <span ng-if="motion.active_version != version" class="label label-warning">
          <i class="fa fa-exclamation-triangle"></i>
          <translate>This version is not permitted.</translate>
        </span>
    </h2>
  </div>
</div>

<div class="meta motion-detail">
  <div class="title" ng-click="isMeta = !isMeta">
    <div class="name">
      <i class="fa fa-info-circle"></i>
      <translate>Meta information</translate>
    </div>
    <div class="icon">
      <i class="fa fa-lg" ng-class="isMeta ? 'fa-angle-down' : 'fa-angle-up'"></i>
    </div>
  </div>
  <div class="detail" uib-collapse="isMeta">
    <div class="row">
      <div class="col-md-4">
          <!-- submitters -->
          <h3 translate>Submitters</h3>
          <div ng-repeat="submitter in motion.submitters">
            {{ submitter.get_full_name() }}
          </div>

          <!-- supporters -->
          <div ng-if="config('motions_min_supporters') > 0">
            <h3 translate>Supporters</h3>
            <ol>
              <li ng-repeat="supporters in motion.supporters">
                {{ supporters.get_full_name() }}
            </ol>
            <!-- support button -->
            <button ng-if="motion.isAllowed('support')" ng-click="support()" class="btn btn-default btn-sm">
              <i class="fa fa-heart"></i>
              <translate>Support motion</translate>
            </button>
            <!-- unsupport button -->
            <button ng-if="motion.isAllowed('unsupport')" ng-click="unsupport()" class="btn btn-default btn-sm">
              <i class="fa fa-heart-o"></i>
              <translate>Unsupport motion</translate>
            </button>
          </div>
          <!-- Amendments -->
          <div ng-if="config('motions_amendments_enabled')">
            <h3 translate>Amendments</h3>
            <div ng-repeat="amendment in amendments">
              <a ui-sref="motions.motion.detail({id: amendment.id})">
                <translate>Motion</translate> {{ amendment.identifier || amendment.getTitle() }}
              </a>
            </div>
            <button os-perms="motions.can_create" ng-click="newAmendment()" class="btn btn-default btn-sm">
              <i class="fa fa-plus"></i>
              <translate>New amendment</translate>
            </button>
          </div>
      </div>
      <div class="col-md-4">
          <!-- State -->
          <h3 ng-if="!motion.isAllowed('change_state')" class="heading" translate>State</h3>
          <div ng-if="motion.isAllowed('change_state')" class="heading">
            <span uib-dropdown>
              <a href id="state-dropdown" class="drop-down-name" uib-dropdown-toggle>
                <translate>State</translate>
                <i class="fa fa-cog"></i>
              </a>
              <ul uib-dropdown-menu class="dropdown-menu" aria-labelledby="state-dropdown">
                <li ng-repeat="state in motion.state.getNextStates()">
                  <a href ng-click="updateState(state.id)">{{ state.action_word | translate }}</a>
                <li class="divider" ng-if="motion.state.getNextStates().length && motion.isAllowed('reset_state')">
                <li ng-if="motion.isAllowed('reset_state')">
                  <a href ng-click="reset_state()">
                    <i class="fa fa-exclamation-triangle"></i>
                    <translate>Reset state</translate>
                  </a>
              </ul>
            </span>
          </div>
          <div class="label" ng-class="'label-'+motion.state.css_class">
            {{ motion.getStateName() }}
          </div>
          <div os-perms="motions.can_manage" class="input-group spacer"
              ng-show="motion.state.show_state_extension_field">
            <label class="sr-only" for="stateExtensionField">{{ commentFieldForState }}</label>
            <input type="text" ng-model="stateExtension"
                id="stateNameExtensionField" class="form-control input-sm"
                placeholder="{{ commentFieldForState }}">
            <span class="input-group-btn">
              <button ng-click="saveAdditionalStateField(stateExtension)" class="btn btn-default btn-sm">
                <i class="fa fa-check"></i>
              </button>
            </span>
          </div>

          <!-- Recommendation -->
          <div ng-if="config('motions_recommendations_by') != ''">
            <h3 ng-if="!motion.isAllowed('change_recommendation')" class="heading">
              {{ config('motions_recommendations_by') }}
            </h3>
            <div ng-if="motion.isAllowed('change_recommendation')" class="heading">
              <span uib-dropdown>
                <a href id="recommendation-dropdown" class="drop-down-name" uib-dropdown-toggle>
                  {{ config('motions_recommendations_by') }}
                  <i class="fa fa-cog"></i>
                </a>
                <ul uib-dropdown-menu class="dropdown-menu" aria-labelledby="recommendation-dropdown">
                  <li ng-repeat="recommendation in motion.state.getRecommendations()">
                    <a href ng-click="updateRecommendation(recommendation.id)">
                      {{ recommendation.recommendation_label | translate }}
                    </a>
                  <li class="divider" ng-if="motion.state.getRecommendations().length && motion.recommendation">
                  <li ng-if="motion.recommendation">
                    <a href ng-click="resetRecommendation()">
                      <i class="fa fa-exclamation-triangle"></i>
                      <translate>Reset recommendation</translate>
                    </a>
                </ul>
              </span>
            </div>
            <div class="label" ng-class="'label-'+motion.recommendation.css_class">
              {{ motion.getRecommendationName() }}
            </div>
            <div class="input-group spacer"
                ng-show="motion.recommendation.show_recommendation_extension_field">
              <label class="sr-only" for="recommendationExtensionField">{{ commentFieldForRecommendation }}</label>
              <input type="text" ng-model="recommendationExtension"
                  id="recommendationExtensionField" class="form-control input-sm"
                  placeholder="{{ commentFieldForRecommendation }}">
              <span class="input-group-btn">
                <button ng-click="saveAdditionalRecommendationField(recommendationExtension)" class="btn btn-default btn-sm">
                  <i class="fa fa-check"></i>
                </button>
              </span>
            </div>
          </div>

          <!-- Category -->
          <h3 ng-if="motion.category" translate>Category</h3>
          {{ motion.category.name }}

          <!-- Motion block -->
          <h3 ng-if="motion.motionBlock" translate>Motion block</h3>
          <a ui-sref="motions.motionBlock.detail({id: motion.motionBlock.id})"
              os-perms="motions.can_manage">{{ motion.motionBlock.title }}</a>
          <span os-perms="!motions.can_manage">{{ motion.motionBlock.title }}</span>

          <!-- Tags -->
          <h3 ng-if="motion.tags.length > 0" translate>Tags</h3><commit_msg>Added button to motion detail view to follow recommendation. Closed #2700.<commit_after><div class="header">
  <div class="title">
    <div class="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>
      <!-- List of speakers -->
      <a ui-sref="agenda.item.detail({id: motion.agenda_item_id})"
          os-perms="agenda.can_see" class="btn btn-sm btn-default">
        <i class="fa fa-microphone fa-lg"></i>
        <translate>List of speakers</translate>
      </a>
      <!-- project -->
      <projector-button model="motion" default-projector-id="defaultProjectorId">
      </projector-button>
      <!-- edit -->
      <a ng-if="motion.isAllowed('update')" ng-click="openDialog(motion)"
          class="btn btn-default btn-sm"
          title="{{ 'Edit' | translate}}">
        <i class="fa fa-pencil"></i>
      </a>
      <!-- pdf -->
      <a ng-click="pdfExport.createMotion()" class="btn btn-default btn-sm">
        <i class="fa fa-file-pdf-o fa-lg"></i>
        <translate>PDF</translate>
      </a>
    </div>
    <h1>{{ motion.agenda_item.getTitle() || motion.getTitle() }}</h1>
    <h2>
        <translate>Motion</translate> {{ motion.identifier }}
        <span ng-if="parent">
          (<translate>Amendment of motion</translate>
          <a ui-sref="motions.motion.detail({id: parent.id})">{{ parent.identifier || parent.getTitle() }}</a>)
        </span>
        <span ng-if="motion.versions.length > 1" >| Version {{ motion.getVersion(version).version_number }}</span>
        <span ng-if="motion.active_version != version" class="label label-warning">
          <i class="fa fa-exclamation-triangle"></i>
          <translate>This version is not permitted.</translate>
        </span>
    </h2>
  </div>
</div>

<div class="meta motion-detail">
  <div class="title" ng-click="isMeta = !isMeta">
    <div class="name">
      <i class="fa fa-info-circle"></i>
      <translate>Meta information</translate>
    </div>
    <div class="icon">
      <i class="fa fa-lg" ng-class="isMeta ? 'fa-angle-down' : 'fa-angle-up'"></i>
    </div>
  </div>
  <div class="detail" uib-collapse="isMeta">
    <div class="row">
      <div class="col-md-4">
          <!-- submitters -->
          <h3 translate>Submitters</h3>
          <div ng-repeat="submitter in motion.submitters">
            {{ submitter.get_full_name() }}
          </div>

          <!-- supporters -->
          <div ng-if="config('motions_min_supporters') > 0">
            <h3 translate>Supporters</h3>
            <ol>
              <li ng-repeat="supporters in motion.supporters">
                {{ supporters.get_full_name() }}
            </ol>
            <!-- support button -->
            <button ng-if="motion.isAllowed('support')" ng-click="support()" class="btn btn-default btn-sm">
              <i class="fa fa-heart"></i>
              <translate>Support motion</translate>
            </button>
            <!-- unsupport button -->
            <button ng-if="motion.isAllowed('unsupport')" ng-click="unsupport()" class="btn btn-default btn-sm">
              <i class="fa fa-heart-o"></i>
              <translate>Unsupport motion</translate>
            </button>
          </div>
          <!-- Amendments -->
          <div ng-if="config('motions_amendments_enabled')">
            <h3 translate>Amendments</h3>
            <div ng-repeat="amendment in amendments">
              <a ui-sref="motions.motion.detail({id: amendment.id})">
                <translate>Motion</translate> {{ amendment.identifier || amendment.getTitle() }}
              </a>
            </div>
            <button os-perms="motions.can_create" ng-click="newAmendment()" class="btn btn-default btn-sm">
              <i class="fa fa-plus"></i>
              <translate>New amendment</translate>
            </button>
          </div>
      </div>
      <div class="col-md-4">
          <!-- State -->
          <h3 ng-if="!motion.isAllowed('change_state')" class="heading" translate>State</h3>
          <div ng-if="motion.isAllowed('change_state')" class="heading">
            <span uib-dropdown>
              <a href id="state-dropdown" class="drop-down-name" uib-dropdown-toggle>
                <translate>State</translate>
                <i class="fa fa-cog"></i>
              </a>
              <ul uib-dropdown-menu class="dropdown-menu" aria-labelledby="state-dropdown">
                <li ng-repeat="state in motion.state.getNextStates()">
                  <a href ng-click="updateState(state.id)">{{ state.action_word | translate }}</a>
                <li class="divider" ng-if="motion.state.getNextStates().length && motion.isAllowed('reset_state')">
                <li ng-if="motion.isAllowed('reset_state')">
                  <a href ng-click="reset_state()">
                    <i class="fa fa-exclamation-triangle"></i>
                    <translate>Reset state</translate>
                  </a>
              </ul>
            </span>
          </div>
          <div class="label" ng-class="'label-'+motion.state.css_class">
            {{ motion.getStateName() }}
          </div>
          <div os-perms="motions.can_manage" class="input-group spacer"
              ng-show="motion.state.show_state_extension_field">
            <label class="sr-only" for="stateExtensionField">{{ commentFieldForState }}</label>
            <input type="text" ng-model="stateExtension"
                id="stateNameExtensionField" class="form-control input-sm"
                placeholder="{{ commentFieldForState }}">
            <span class="input-group-btn">
              <button ng-click="saveAdditionalStateField(stateExtension)" class="btn btn-default btn-sm">
                <i class="fa fa-check"></i>
              </button>
            </span>
          </div>

          <!-- Recommendation -->
          <div ng-if="config('motions_recommendations_by') != ''">
            <h3 ng-if="!motion.isAllowed('change_recommendation')" class="heading">
              {{ config('motions_recommendations_by') }}
            </h3>
            <div ng-if="motion.isAllowed('change_recommendation')" class="heading">
              <span uib-dropdown>
                <a href id="recommendation-dropdown" class="drop-down-name" uib-dropdown-toggle>
                  {{ config('motions_recommendations_by') }}
                  <i class="fa fa-cog"></i>
                </a>
                <ul uib-dropdown-menu class="dropdown-menu" aria-labelledby="recommendation-dropdown">
                  <li ng-repeat="recommendation in motion.state.getRecommendations()">
                    <a href ng-click="updateRecommendation(recommendation.id)">
                      {{ recommendation.recommendation_label | translate }}
                    </a>
                  <li class="divider" ng-if="motion.state.getRecommendations().length && motion.recommendation">
                  <li ng-if="motion.recommendation">
                    <a href ng-click="resetRecommendation()">
                      <i class="fa fa-exclamation-triangle"></i>
                      <translate>Reset recommendation</translate>
                    </a>
                </ul>
              </span>
            </div>
            <div class="label" ng-class="'label-'+motion.recommendation.css_class">
              {{ motion.getRecommendationName() }}
            </div>
            <div class="input-group spacer"
                ng-show="motion.recommendation.show_recommendation_extension_field">
              <label class="sr-only" for="recommendationExtensionField">{{ commentFieldForRecommendation }}</label>
              <input type="text" ng-model="recommendationExtension"
                  id="recommendationExtensionField" class="form-control input-sm"
                  placeholder="{{ commentFieldForRecommendation }}">
              <span class="input-group-btn">
                <button ng-click="saveAdditionalRecommendationField(recommendationExtension)" class="btn btn-default btn-sm">
                  <i class="fa fa-check"></i>
                </button>
              </span>
            </div>
            <button
                ng-if="motion.recommendation &&
                       motion.isAllowed('change_state') &&
                       motion.state.next_states_id.indexOf(motion.recommendation.id) !== -1"
                ng-click="updateState(motion.recommendation.id)"
                class="btn btn-default btn-sm">
              <i class="fa fa-magic"></i>
              <translate>Follow recommendation</translate>
            </button>
          </div>

          <!-- Category -->
          <h3 ng-if="motion.category" translate>Category</h3>
          {{ motion.category.name }}

          <!-- Motion block -->
          <h3 ng-if="motion.motionBlock" translate>Motion block</h3>
          <a ui-sref="motions.motionBlock.detail({id: motion.motionBlock.id})"
              os-perms="motions.can_manage">{{ motion.motionBlock.title }}</a>
          <span os-perms="!motions.can_manage">{{ motion.motionBlock.title }}</span>

          <!-- Tags -->
          <h3 ng-if="motion.tags.length > 0" translate>Tags</h3>
{'fraction_non_alphanumeric': 0.16369790799622663, 'fraction_numerical': 0.003051994894844903, 'mean_word_length': 2.0091835030889964, 'pattern_counts': {'":': 0, '<': 423, '<?xml version=': 0, '>': 429, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1563449', 'n_tokens_mistral': 5375, 'n_tokens_neox': 5089, 'n_words': 888}