{% extends "dashboard/base.html" %}
{% load static %}
{% load i18n %}
{% load render_table from django_tables2 %}

{% block title-page %}{% trans "Requests" %}{% endblock %}

{% block content %}

<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        <div class="pull-right">
            <a class="btn btn-xs btn-primary"href="{% url "request.views.type-list" %}">
              {% trans "Request types" %}
            </a>
            <a class="btn btn-xs btn-success" href="{% url "request.views.field-list" %}">
              {% trans "Request fields" %}
            </a>
          </div>
        <h3 class="no-margin"><i class="fa fa-phone"></i> {% trans "Requests" %}</h3>
      </div>
      <div class="panel-body">
        <div class="panel-body">
          {% trans "Filter by status" %}:
          <a href="{{ request.path }}">{% trans "ALL" %}</a>
          {% for s in statuses %}
            <a href="?status={{ s.0 }}">{{ s.1|upper }}</a>
          {% endfor %}
          <div class="table-responsive">
            {% render_table table %}
          </div>
        </div>
      </div><!-- .panel-body -->
    </div>
  </div>
</div>
{% endblock %}
