<commit_before>{% extends "base.jinja" %}

{% block head %}
  <title>Mozilla Moderator - Events archive</title>
{% endblock %}

{% block content %}

<hgroup id="main-feature" class="center">
  <h2>Events Archive</h2>
</hgroup>
{% for event in events %}
  <a href="{{ url('event', e_slug=event.slug) }}">
    <div class="billboard event-listing">
      <h1>{{ event.name }}</h1>
      <span class="questions-counter">
        {{ event.questions.count() }} questions asked
      </span>
    </div>
  </a>
{% endfor %}

<div class="pagination">
  <span class="step-links">
    {% if events.has_previous() %}
      <a href="?page={{ events.previous_page_number()  }}">&laquo;</a>
    {% endif %}
    <select id="page-select">
      {% for i in range(1, events.paginator.num_pages + 1) %}
        <option {% if i == events.number %} selected {% endif %}
                value="?page={{ i }}">
          {{ i }}
        </option>
      {% endfor %}
    </select>
    {% if events.has_next() %}
      <a href="?page={{ events.next_page_number() }}">&raquo;</a>
    {% endif %}
  </span>
</div>
{% endblock %}<commit_msg>Hide paginator if there are no events.<commit_after>{% extends "base.jinja" %}

{% block head %}
  <title>Mozilla Moderator - Events archive</title>
{% endblock %}

{% block content %}

<hgroup id="main-feature" class="center">
  <h2>Events Archive</h2>
</hgroup>
{% for event in events %}
  <a href="{{ url('event', e_slug=event.slug) }}">
    <div class="billboard event-listing">
      <h1>{{ event.name }}</h1>
      <span class="questions-counter">
        {{ event.questions.count() }} questions asked
      </span>
    </div>
  </a>
{% endfor %}

{% if events %}
  <div class="pagination">
    <span class="step-links">
      {% if events.has_previous() %}
        <a href="?page={{ events.previous_page_number()  }}">&laquo;</a>
      {% endif %}
      <select id="page-select">
        {% for i in range(1, events.paginator.num_pages + 1) %}
          <option {% if i == events.number %} selected {% endif %}
                  value="?page={{ i }}">
            {{ i }}
          </option>
        {% endfor %}
      </select>
      {% if events.has_next() %}
        <a href="?page={{ events.next_page_number() }}">&raquo;</a>
      {% endif %}
    </span>
  </div>
{% endif %}
{% endblock %}
{'fraction_non_alphanumeric': 0.2120950323974082, 'fraction_numerical': 0.005183585313174946, 'mean_word_length': 2.6587677725118484, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, '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': '2546674', 'n_tokens_mistral': 852, 'n_tokens_neox': 770, 'n_words': 173}