{% extends "base-timeview.html" %}
{% load bcfg2_tags %}
{% comment %}
This is needed for Django versions less than 1.5
{% endcomment %}
{% load url from future %}

{% block extra_header_info %}
{% endblock%}

{% block title %}Bcfg2 - Client Grid View{% endblock %}

{% block pagebanner %}Clients - Grid View{% endblock %}

{% block content %}
{% filter_navigator %}
{% if inter_list %}
  <table class='grid-view' align='center'>
  {% for inter in inter_list %}
    {% if forloop.first %}<tr>{% endif %}
      <td class='{{ inter|determine_client_state }}'>
          <a href="{% spaceless %}
              {% if not timestamp %}
                  {% url "reports_client_detail" inter.client.name %}
              {% else %}
                  {% url "reports_client_detail_pk" inter.client.name inter.id %}
              {% endif %}
              {% endspaceless %}">{{ inter.client.name }}</a>
      </td>
    {% if forloop.last %}
      </tr>
    {% else %}
      {% if forloop.counter|divisibleby:"4" %}</tr><tr>{% endif %}
    {% endif %}
  {% endfor %}
  </table>
{% else %}
  <div class='client_list_box'>
  <p>No client records are available.</p>
  </div>
{% endif %}
{% endblock %}
