<commit_before>{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% load crispy_forms_tags %}
{% load urlencode %}


{% block head_javascript %}
  <script
    src="https://code.jquery.com/jquery-2.2.4.min.js"
    integrity="<KEY>
    crossorigin="anonymous"></script>
{% endblock head_javascript %}

{% block content %}
  <div class="row">
    <div class="col-xs-12">
      <strong aria-label="button_group">
        {% comment %} Translators: On the page which shows a list of applications, coordinators must select which applications they wish to view. This string is found next to the selection buttons, and leads on to options such as "Under review", "Approved", or "Sent.{% endcomment %}
        {% trans "View applications which are..." %}
      </strong>
      <div class="btn-group" role="nav" aria-labelledby="button_group">
        <a href="{{ pending_url }}{% if filters %}?page=1{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" type="button" class="btn btn-default {{ pending_class }}">
          {% comment %} Translators: This describes the status of a group of applications. {% endcomment %}
          {% trans "Pending review" %}
        </a>
        <a href="{{ approved_url }}{% if filters %}?page=1{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" type="button" class="btn btn-default {{ approved_class }}">
          {% comment %} Translators: This describes the status of a group of applications. {% endcomment %}
          {% trans "Approved" %}
        </a>
        <a href="{{ rejected_url }}{% if filters %}?page=1{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" type="button" class="btn btn-default {{ rejected_class }}">
          {% comment %} Translators: This describes the status of a group of applications. {% endcomment %}
          {% trans "Rejected" %}
        </a>
        <a href="{{ sent_url }}{% if filters %}?page=1{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" type="button" class="btn btn-default {{ sent_class }}">
          {% comment %} Translators: This describes the status of a group of applications. {% endcomment %}
          {% trans "Sent" %}
        </a>
        <a href="{{ renewal_url }}{% if filters %}?page=1{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" type="button" class="btn btn-default {{ renewal_class }}">
          {% comment %} Translators: This describes the status of a group of applications. {% endcomment %}
          {% trans "Up for renewal" %}
        </a>
      </div>
    </div>
  </div>

  <h1>{{ title }}</h1>

  <!-- begin filtering options/info -->
  <div class="row">

    <div class=" col-xs-12 col-sm-6">
      <div class="panel panel-default">
        <div class="panel-heading">
          {% comment %}Translators: Coordinators can filter the page which shows a list of applications. This is the heading for the box where filters are selected.{% endcomment %}
          {% trans "Filter by..." %}
        </div>
        <div class="panel-body">
          {% crispy autocomplete_form %}
        </div>
      </div>
    </div>

    <div class=" col-xs-12 col-sm-6">
      <div class="panel panel-default">
        <div class="panel-heading">
          {% comment %}Translators: Coordinators can filter the page which shows a list of applications. This is the heading for the box showing a list of active filters.{% endcomment %}
          {% trans "Current filters" %}
        </div>
        <div class="panel-body">
          {% if filters %}
            {% for filter in filters %}
              {% if filter.object %}
                <strong>{{ filter.label }}</strong> &mdash; {{ filter.object }}<br />
              {% endif %}
            {% endfor %}
          {% else %}
            {% comment %}Translators: Coordinators can filter the page which shows a list of applications. If no filters are selected, this text is shown under the 'Current filters' heading.{% endcomment %}
            {% trans "None" %}
          {% endif %}
        </div>
      </div>
    </div>
  </div>
  <!-- end filtering options/info -->

  {% include include_template %}

  {% if object_list.paginator.num_pages > 1 %}
    {% comment %}Translators: On the page which shows a list of applications, this text shows next to the page navigation buttons. {% endcomment %}
    <nav aria-label="{% trans "Page navigation" %}">
      <ul class="pagination">
        {% if object_list.has_previous %}
          <li>
            <a href="?page={{ object_list.previous_page_number }}{% if filters %}{% for filter in filters %}{% if filter.label and filter.object.pk %}&{{ filter.label|urlencode|safe }}={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" aria-label="{% trans "Previous page" %}">
              {% comment %}Translators: This is the label for a button which goes to the previous page of applications.{% endcomment %}
              <span aria-hidden="true">{% trans "Previous page" %}</span>
            </a>
          </li>
        {% else %}
          <li class="disabled">
            <a href="#" aria-label="{% trans "Previous page" %}">
              <span aria-hidden="true">{% trans "Previous page" %}</span>
            </a>
          </li>
        {% endif %}

        {% comment %}
          Magic allowing us to loop a specific number of times.
          See https://stackoverflow.com/questions/1107737/numeric-for-loop-in-django-templates.
        {% endcomment %}
        {% with ''|center:object_list.paginator.num_pages as range %}
		  {% if object_list.paginator.num_pages <= 10 %}
		    {% for _ in range %}
				<li {% ifequal forloop.counter object_list.number %}
                  class="active"
                {% endifequal %}>
					<a href="?page={{ forloop.counter }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
						{{ forloop.counter }}
					</a>
				</li>
			{% endfor %}
		  {% elif object_list.number >= 10 %}		
			{% for _ in range|slice:"3" %}
				<li>
					<a href="?page={{ forloop.counter }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
						{{ forloop.counter }}
					</a>
				</li>
            {% endfor %}
			<li>
				<a>
					...
				</a>
			</li>
			<li>
              <a href="?page={{ object_list.previous_page_number}}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
				{{ object_list.previous_page_number }}
              </a>
            </li>
            <li class="active">
              <a href="?page={{ object_list.number }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
				{{ object_list.number }}
              </a>
            </li>
			{% if object_list.has_next %}
				<li>
					<a href="?page={{ object_list.next_page_number }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
						{{ object_list.next_page_number }}
					</a>
				</li>		
			{% endif %}
		  {% else %}
			{% for _ in range|slice:":10" %}
			  <li {% ifequal forloop.counter object_list.number %}
					class="active"
			  {% endifequal %}>
				<a href="?page={{ forloop.counter }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
					{{ forloop.counter }}
				</a>
			  </li>
			{% endfor %}<commit_msg>add interface to skip 10 or so pages<commit_after>{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% load crispy_forms_tags %}
{% load urlencode %}


{% block head_javascript %}
  <script
    src="https://code.jquery.com/jquery-2.2.4.min.js"
    integrity="<KEY>
    crossorigin="anonymous"></script>
{% endblock head_javascript %}

{% block content %}
  <div class="row">
    <div class="col-xs-12">
      <strong aria-label="button_group">
        {% comment %} Translators: On the page which shows a list of applications, coordinators must select which applications they wish to view. This string is found next to the selection buttons, and leads on to options such as "Under review", "Approved", or "Sent.{% endcomment %}
        {% trans "View applications which are..." %}
      </strong>
      <div class="btn-group" role="nav" aria-labelledby="button_group">
        <a href="{{ pending_url }}{% if filters %}?page=1{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" type="button" class="btn btn-default {{ pending_class }}">
          {% comment %} Translators: This describes the status of a group of applications. {% endcomment %}
          {% trans "Pending review" %}
        </a>
        <a href="{{ approved_url }}{% if filters %}?page=1{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" type="button" class="btn btn-default {{ approved_class }}">
          {% comment %} Translators: This describes the status of a group of applications. {% endcomment %}
          {% trans "Approved" %}
        </a>
        <a href="{{ rejected_url }}{% if filters %}?page=1{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" type="button" class="btn btn-default {{ rejected_class }}">
          {% comment %} Translators: This describes the status of a group of applications. {% endcomment %}
          {% trans "Rejected" %}
        </a>
        <a href="{{ sent_url }}{% if filters %}?page=1{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" type="button" class="btn btn-default {{ sent_class }}">
          {% comment %} Translators: This describes the status of a group of applications. {% endcomment %}
          {% trans "Sent" %}
        </a>
        <a href="{{ renewal_url }}{% if filters %}?page=1{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" type="button" class="btn btn-default {{ renewal_class }}">
          {% comment %} Translators: This describes the status of a group of applications. {% endcomment %}
          {% trans "Up for renewal" %}
        </a>
      </div>
    </div>
  </div>

  <h1>{{ title }}</h1>

  <!-- begin filtering options/info -->
  <div class="row">

    <div class=" col-xs-12 col-sm-6">
      <div class="panel panel-default">
        <div class="panel-heading">
          {% comment %}Translators: Coordinators can filter the page which shows a list of applications. This is the heading for the box where filters are selected.{% endcomment %}
          {% trans "Filter by..." %}
        </div>
        <div class="panel-body">
          {% crispy autocomplete_form %}
        </div>
      </div>
    </div>

    <div class=" col-xs-12 col-sm-6">
      <div class="panel panel-default">
        <div class="panel-heading">
          {% comment %}Translators: Coordinators can filter the page which shows a list of applications. This is the heading for the box showing a list of active filters.{% endcomment %}
          {% trans "Current filters" %}
        </div>
        <div class="panel-body">
          {% if filters %}
            {% for filter in filters %}
              {% if filter.object %}
                <strong>{{ filter.label }}</strong> &mdash; {{ filter.object }}<br />
              {% endif %}
            {% endfor %}
          {% else %}
            {% comment %}Translators: Coordinators can filter the page which shows a list of applications. If no filters are selected, this text is shown under the 'Current filters' heading.{% endcomment %}
            {% trans "None" %}
          {% endif %}
        </div>
      </div>
    </div>
  </div>
  <!-- end filtering options/info -->

  {% include include_template %}

  {% if object_list.paginator.num_pages > 1 %}
    {% comment %}Translators: On the page which shows a list of applications, this text shows next to the page navigation buttons. {% endcomment %}
    <nav aria-label="{% trans "Page navigation" %}">
      <ul class="pagination">
        {% if object_list.has_previous %}
          <li>
            <a href="?page={{ object_list.previous_page_number }}{% if filters %}{% for filter in filters %}{% if filter.label and filter.object.pk %}&{{ filter.label|urlencode|safe }}={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}" aria-label="{% trans "Previous page" %}">
              {% comment %}Translators: This is the label for a button which goes to the previous page of applications.{% endcomment %}
              <span aria-hidden="true">{% trans "Previous page" %}</span>
            </a>
          </li>
        {% else %}
          <li class="disabled">
            <a href="#" aria-label="{% trans "Previous page" %}">
              <span aria-hidden="true">{% trans "Previous page" %}</span>
            </a>
          </li>
        {% endif %}

        {% comment %}
          Magic allowing us to loop a specific number of times.
          See https://stackoverflow.com/questions/1107737/numeric-for-loop-in-django-templates.
        {% endcomment %}
        {% with ''|center:object_list.paginator.num_pages as range %}
		  {% if object_list.paginator.num_pages <= 10 %}
		    {% for _ in range %}
				<li {% ifequal forloop.counter object_list.number %}
                  class="active"
				{% endifequal %}>
					<a href="?page={{ forloop.counter }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
						{{ forloop.counter }}
					</a>
				</li>
			{% endfor %}
		  {% elif object_list.number >= 10 %}		
			{% for _ in range|slice:"3" %}
				<li>
					<a href="?page={{ forloop.counter }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
						{{ forloop.counter }}
					</a>
				</li>
            {% endfor %}
			<li>
				<a>
					...
				</a>
			</li>
			<li>
              <a href="?page={{ object_list.previous_page_number}}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
				{{ object_list.previous_page_number }}
              </a>
            </li>
            <li class="active">
              <a href="?page={{ object_list.number }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
				{{ object_list.number }}
              </a>
            </li>
			{% if object_list.has_next %}
				<li>
					<a href="?page={{ object_list.next_page_number }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
						{{ object_list.next_page_number }}
					</a>
				</li>		
			{% endif %}			
			{% with object_list.number as current_page %}
			{% if object_list.number|add:'10' < object_list.paginator.num_pages %}
				<li>
					<a>
						...
					</a>
				</li>
				{% if object_list.paginator.num_pages >= current_page|add:'9' %}
					<li>
						<a href="?page={{ current_page | add:"9" }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
							{{ current_page | add:"9" }}
						</a>
					</li>
				{% endif %}
				{% if object_list.paginator.num_pages >= current_page|add:'10' %}
				<li>
					<a href="?page={{ current_page | add:"10" }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
						{{ current_page | add:"10" }}
					</a>
				</li>
				{% endif %}
				{% if object_list.paginator.num_pages >= current_page|add:'11' %}
				<li>
					<a href="?page={{ current_page | add:"11" }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
						{{ current_page | add:"11" }}
					</a>
				</li>
				{% endif %}			
			{% endif %}	
			{% endwith %}
		  {% else %}
			{% for _ in range|slice:":10" %}
				<li {% ifequal forloop.counter object_list.number %}
					class="active"
                {% endifequal %}>
					<a href="?page={{ forloop.counter }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
						{{ forloop.counter }}
					</a>
				</li>
			{% endfor %}
{'fraction_non_alphanumeric': 0.1903698317057968, 'fraction_numerical': 0.009817161853313942, 'mean_word_length': 2.7773199921522465, 'pattern_counts': {'":': 2, '<': 198, '<?xml version=': 0, '>': 202, 'https://': 4, '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': '1218234', 'n_tokens_mistral': 6722, 'n_tokens_neox': 5878, 'n_words': 1659}