{% extends "base.html" %}
{% load i18n %}
{% load translations %}
{% load humanize %}

{% block breadcrumbs %}
<li><a href="{% url 'checks' %}">{% trans "Checks" %}</a></li>
<li><a href="{% url 'show_check' name=check.check_id %}">{{ check.name }}</a></li>
{% endblock %}

{% block content %}

<div class="row">
<div class="col-lg-6">

<table class="sort table progress-table table-listing">
    <thead>
        <tr>
            <th>{% trans "Project" %}</th>
            <th class="number">{% trans "Total" %}</th>
            <th class="number">{% trans "Dismissed" %}</th>
            <th class="number">{% trans "Active" %}</th>
            <th class="number">{% trans "Translated" %}</th>
        </tr>
    </thead>
    <tbody>
    {% for obj in projects %}
        <tr data-href="{% url 'show_check_project' name=check.check_id project=obj.slug %}{{ url_params }}" class="clickable-row">
            <th><a href="{% url 'show_check_project' name=check.check_id project=obj.slug %}{{ url_params }}">{{ obj }}</a></th>
            <td class="number" data-value="{{ obj.check_count }}">{{ obj.check_count |intcomma}}</td>
            <td class="number" data-value="{{ obj.dismissed_check_count }}">{{ obj.dismissed_check_count |intcomma}}</td>
            <td class="number" data-value="{{ obj.active_check_count }}">{{ obj.active_check_count |intcomma}}</td>
            <td class="number" data-value="{{ obj.translated_check_count }}">{{ obj.translated_check_count |intcomma}}</td>
        </tr>
    {% endfor %}
    </tbody>
</table>

</div>

<div class="col-lg-6">
<div class="panel panel-default">
  <div class="panel-heading"><h4 class="panel-title">{% trans "Check details" %}</h4></div>
  <div class="panel-body">
    <p>
    {{ check.description }}
    </p>
  </div>
  <div class="panel-footer">
  <a class="btn btn-primary" href="{{ check.get_doc_url  }}">{% trans "Documentation" %}</a>
  </div>
</div>
</div>
</div>

</div>
{% endblock %}
