{% extends "wagtailadmin/base.html" %}
{% load wagtailadmin_tags %}
{% load wagtailcore_tags %}
{% load i18n %}
{% load l10n %}
{% block titletag %}{% blocktrans with title=page.get_admin_display_title page_type=content_type.model_class.get_verbose_name %}Requests For {{ page_type }}: {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}page-editor {% if page.live %}page-is-live{% endif %} model-{{ content_type.model }} {% if page.locked %}page-locked{% endif %}{% endblock %}

{% block content %}
    {% page_permissions page as page_perms %}
    <header class="merged tab-merged">
        {% explorer_breadcrumb page %}

        <div class="row row-flush">
            <div class="left col9 header-title">
                <h1 class="icon icon-doc-empty-inverse">
                {% blocktrans with title=page.get_admin_display_title page_type=content_type.model_class.get_verbose_name %}Requests For {{ page_type }} <span>{{ title }}</span>{% endblocktrans %}</h1>
            </div>
            <div class="right col3">
                {% trans "Status" %}
                {% include "wagtailadmin/shared/page_status_tag.html" with page=page %}

                {% include "wagtailadmin/pages/_privacy_switch.html" with page=page page_perms=page_perms only %}
                {% include "wagtailadmin/pages/_lock_switch.html" %}
            </div>
        </div>
    </header>
    <table class="listing">
      <thead>
        <tr>
          <th class="title">Request Date</th>
          <th class="title">Variant</th>
          <th class="title">Email</th>
        </tr>
      </thead>
      <tbody>
        {% for request in requests %}
        <tr>
          <td>{{request.created_date|date}}</td>
          <td><a href="{% pageurl page %}">{{request.variant}}</a></td>
          <td>{% if request.email %}{{request.email}}{% else %}Not Given{% endif %}</td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
{% endblock %}
{% block extra_css %}
{{ block.super }}
{% include "wagtailadmin/pages/_editor_css.html" %}
{% endblock %}