<commit_before><div data-object-id="{{instance.id}}"
    data-object-type="{{instance.class.table_singular}}" {{#instance}}{{data 'model'}}{{/instance}}>
  {{#if_equals instance.status 'Final'}}
    <i class="grcicon-review-color"></i>
    <span class="object-approved">
      {{#last_approved instance}}
        Reviewed on {{instance.updated_at}} <br />
        and approved by
        {{#using person=instance.modified_by}}
          {{{> '/static/mustache/people/popover.mustache'}}}
        {{/using}}
      </span>
      {{/last_approved}}
  {{else}}
    {{#with_mapping 'approval_tasks' instance}}
      {{#with_review_task}}
        {{#with_is_reviewer review_task}}
          {{#if_helpers '\
            #owned_by_current_user' instance '\
            or #current_user_is_admin'}}
            {{^if is_reviewer}}
              {{#if_equals review_task.status 'Declined'}}
                {{#with_most_recent_declining_task_entry review_task}}
                  <div>Review was declined on {{#date most_recent_declining_task_entry.instance.created_at}}{{/date}}.</div>
                {{/with_most_recent_declining_task_entry}}
              {{/if_equals}}
            {{/if}}
          {{/if_helpers}}
          {{#if is_reviewer}}
            {{#if_equals review_task.status 'Declined'}}
              {{#with_most_recent_declining_task_entry review_task}}
                <div>Review was declined on {{#date most_recent_declining_task_entry.instance.created_at}}{{/date}}.</div>
              {{/with_most_recent_declining_task_entry}}
            {{/if_equals}}
            <div {{#review_task}}{{data 'model'}}{{/review_task}} {{ (el) -> el.ggrc_controllers_quick_form({instance : el.data("model") }) }}>
              <button class="btn btn-mini btn-success change-task-status {{instance._disabled}}" data-name="status" data-value="Verified">Approve</button>
              <a href="javascript://"
                class="undoable btn btn-mini btn-danger change-task-status {{instance._disabled}}"
                data-toggle="modal-ajax-form"
                data-object-singular="CycleTaskEntry"
                data-object-params='{\
                  "cycle" : {{review_task.cycle.id}}, \
                  "cycle_task_group_object_task" : {{review_task.id}}, \
                  "is_declining_review" : 1, \
                  "context": {{firstexist review_task.context.id "null"}} }'
                data-object-plural="cycle_task_entries"
                data-object-id=""
                data-placement="right"
                data-modal-reset="reset"
                data-modal-class="modal-wide"
                data-modal-title-override="Decline Review"
                data-original-title="Decline Review"
                data-name="status"
                data-value="Declined"
                data-also-undo="description">
                Decline
              </a>
              <small><em>Approval applies only to this object and not to mapped objects.</em></small>
            </div>
          {{else}}
            {{#if_helpers '\
              #owned_by_current_user' instance '\
              or #current_user_is_admin'}}
              {{#with_mapping_count instance 'current_approval_cycles'}}
                {{#if_equals count 0}}
                  <a href="javascript://" class="non-transparent" data-toggle="modal-ajax-approvalform" data-object-singular="{{instance.class.model_singular}}" data-object-id="{{instance.id}}">
                    <i class="grcicon-review"></i>
                    Submit For Review
                  </a>
                {{else}}
                  <i class="grcicon-review"></i>
                  <span class="setup-link">Review in progress</span>
                {{/if_equals}}
              {{/with_mapping_count}}
            {{/if_helpers}}
          {{/if}}
        {{/with_is_reviewer}}<commit_msg>Fixes approval visibility (thanks Anze).<commit_after><div data-object-id="{{instance.id}}"
    data-object-type="{{instance.class.table_singular}}" {{#instance}}{{data 'model'}}{{/instance}}>
  {{#if_equals instance.status 'Final'}}
    <i class="grcicon-review-color"></i>
    <span class="object-approved">
      {{#last_approved instance}}
        Reviewed on {{instance.updated_at}} <br />
        and approved by
        {{#using person=instance.modified_by}}
          {{{> '/static/mustache/people/popover.mustache'}}}
        {{/using}}
      </span>
      {{/last_approved}}
  {{else}}
    {{#with_mapping 'approval_tasks' instance}}
      {{#with_review_task}}
        {{#with_is_reviewer review_task}}
          {{#if_helpers '\
            #owned_by_current_user' instance '\
            or #current_user_is_admin'}}
            {{^if is_reviewer}}
              {{#if_equals review_task.status 'Declined'}}
                {{#with_most_recent_declining_task_entry review_task}}
                  <div>Review was declined on {{#date most_recent_declining_task_entry.instance.created_at}}{{/date}}.</div>
                {{/with_most_recent_declining_task_entry}}
              {{/if_equals}}
            {{/if}}
          {{/if_helpers}}
          {{#if is_reviewer}}
            {{#if_equals review_task.status 'Declined'}}
              {{#with_most_recent_declining_task_entry review_task}}
                <div>Review was declined on {{#date most_recent_declining_task_entry.instance.created_at}}{{/date}}.</div>
              {{/with_most_recent_declining_task_entry}}
            {{/if_equals}}
            <div {{#review_task}}{{data 'model'}}{{/review_task}} {{ (el) -> el.ggrc_controllers_quick_form({instance : el.data("model") }) }}>
              <button class="btn btn-mini btn-success change-task-status {{instance._disabled}}" data-name="status" data-value="Verified">Approve</button>
              <a href="javascript://"
                class="undoable btn btn-mini btn-danger change-task-status {{instance._disabled}}"
                data-toggle="modal-ajax-form"
                data-object-singular="CycleTaskEntry"
                data-object-params='{\
                  "cycle" : {{review_task.cycle.id}}, \
                  "cycle_task_group_object_task" : {{review_task.id}}, \
                  "is_declining_review" : 1, \
                  "context": {{firstexist review_task.context.id "null"}} }'
                data-object-plural="cycle_task_entries"
                data-object-id=""
                data-placement="right"
                data-modal-reset="reset"
                data-modal-class="modal-wide"
                data-modal-title-override="Decline Review"
                data-original-title="Decline Review"
                data-name="status"
                data-value="Declined"
                data-also-undo="description">
                Decline
              </a>
              <small><em>Approval applies only to this object and not to mapped objects.</em></small>
            </div>
          {{else}}
            {{#is_allowed "read" "Workflow" context="any"}}
              {{#with_mapping_count instance 'current_approval_cycles'}}
                {{#if_equals count 0}}
                  {{#is_allowed "create" "Workflow" context="any"}}
                    <a href="javascript://" class="non-transparent" data-toggle="modal-ajax-approvalform" data-object-singular="{{instance.class.model_singular}}" data-object-id="{{instance.id}}">
                      <i class="grcicon-review"></i>
                      Submit For Review
                    </a>
                  {{/is_allowed}}
                {{else}}
                  <i class="grcicon-review"></i>
                  <span class="setup-link">Review in progress</span>
                {{/if_equals}}
              {{/with_mapping_count}}
            {{/is_allowed}}
          {{/if}}
        {{/with_is_reviewer}}
{'fraction_non_alphanumeric': 0.15074798619102417, 'fraction_numerical': 0.000511443549418233, 'mean_word_length': 1.9980835569183595, 'pattern_counts': {'":': 2, '<': 59, '<?xml version=': 0, '>': 63, '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': '6441305', 'n_tokens_mistral': 2292, 'n_tokens_neox': 2190, 'n_words': 343}