{% extends "bingo/base.html" %}
{% load i18n %}
{% block headline %}{% trans "Old Games" %}{% endblock %}
{% block title %}{% trans "Old Games" %}{% endblock %}
{% block content %}
{% trans "Game archive:" %}
<table class="game_list">
    <tr style="text-align: left">
        <th>{% trans "game" %}</th>
        <th>{% trans "date" %}</th>
        <th>{% trans "players" %}</th>
        <th>{% trans "rating" %}</th>
        <th style="text-align: left">{% trans "description" %}</th>
    </tr>
{% for game in object_list %}
    <tr>
        <td><a href="{% url 'bingo.views.game' game_id=game.game_id %}">{% trans 'Game #' %}{{ game.game_id }}</a>
        </td>
        <td>{{ game.created }}</td>
        <td>{{ game.num_users }}</td>
        <td>{% include "bingo/game_rating.html" %}</td>
        <td style="text-align: left">{% if game.description %}{{ game.description }}{% else %}&mdash;{% endif %}</td>
    </tr>
{% endfor %}
</table>
<ul class="pagination cf">
    {% if page_obj.has_previous %}
        <li><a href="?page={{ page_obj.previous_page_number}}">{% trans "newer games" %}</a></li>
    {% else %}
        <li class="inactive">{% trans "newer games" %}</li>
    {% endif %}
    <li>{% trans "page" %} {{ page_obj.number }}</li>
    {% if page_obj.has_next %}
        <li><a href="?page={{ page_obj.next_page_number}}">{% trans "older games" %}</a></li>
    {% else %}
        <li class="inactive">{% trans "older games" %}</li>
    {% endif %}
</ul>
{% endblock %}
