{% 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 %}

{% 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 %}

Hide paginator if there are no events.
Hide paginator if there are no events.
