{% extends 'intranet/index-2.html' %}
{% load i18n intranet_extra intranet_list_view_extra %}
{% load url from future %}



{% block title_content %}
{{ verbose_name_plural|capfirst }}
{% endblock %}


{% block actions_content %}
{% has_perm prefix='add' as add_perm %}
{% if add_perm %}
<a class="btn btn-primary" href="{% url urls.add %}">{% trans "Add" %}</a>
{% endif %}
{% endblock %}


{% block sidebar %}
{% if search_fields %}
<li class="nav-header">{% trans "Lookup" %}</li>
<form class="form-search" method="get" action="">
  <input type="text" name="q" class="input-medium search-query" {% if request.GET.q %}value="{{ request.GET.q }}"{% endif %}>
  {% if request.GET.o %}<input type="hidden" name="o" value="{{ request.GET.o }}"/>{% endif %}
  {% for filter, value in active_filters %}
  <input type="hidden" name="{{ filter }}" value="{{ value }}"/>
  {% endfor %}
  <button type="submit" class="btn"><i class="icon-search"></i></button>
</form>
{% endif %}
{% if list_filter %}
<li class="divider"></li>
<li class="nav-header">{% trans "Filters" %}</li>
{% for filter in list_filter %}
<li class="divider"></li>
<li class="nav-header">{{ filter.verbose_name }}</li>
<li {% if filter.value == None %}class="active"{% endif %}><a href="{{ filter.url.none }}">{% trans "All" %}</a></li>
<li {% if filter.value == '1' %}class="active"{% endif %}><a href="{{ filter.url.yes }}">{% trans "Yes" %}</a></li>
<li {% if filter.value == '0' %}class="active"{% endif %}><a href="{{ filter.url.no }}">{% trans "No" %}</a></li>
{% endfor %}
{% endif %}
{% endblock %}


{% block content %}

{% block object_list %}
<table class="{% default_table_class %}">
  {% list_header %}
  {% for object in object_list %}
    {% url urls.detail object.pk as url_object_detail %}
    {% list_item %}
  {% endfor %}
</table>
{% endblock object_list %}
{% endblock %}
