Commit 553f0dd1 authored by Michal Čihař's avatar Michal Čihař

Use group item for listing checks

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 6e993ff0
......@@ -19,27 +19,13 @@
</p>
{% if checks %}
<table class="sort table table-condensed table-striped">
<thead>
<tr>
<th>{% trans "Project" %}</th>
<th>{% trans "Failures" %}</th>
</tr>
<tbody>
<div class="list-group">
{% for obj in checks %}
<tr>
<th><a href="{% url 'project' project=obj.project__slug %}">{% project_name obj.project__slug %}</a></th>
<td><a href="{% url 'show_check_project' name=check.check_id project=obj.project__slug %}{{ ignore_string }}">{{ obj.count }}</a></td>
</tr>
<a class="list-group-item" href="{% url 'show_check_project' name=check.check_id project=obj.project__slug %}{{ ignore_string }}"><span class="badge">{{ obj.count }}</span>{% project_name obj.project__slug %}</a>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p>
{% show_message "warning" _("No matching checks found!") %}
</p>
{% endif %}
{% endblock %}
......@@ -20,27 +20,13 @@
</p>
{% if checks %}
<table class="sort table table-condensed table-striped">
<thead>
<tr>
<th>{% trans "Project" %}</th>
<th>{% trans "Failures" %}</th>
</tr>
<tbody>
<div class="list-group">
{% for obj in checks %}
<tr>
<th><a href="{% url 'subproject' project=obj.translation__subproject__project__slug subproject=obj.translation__subproject__slug %}">{% subproject_name obj.translation__subproject__project__slug obj.translation__subproject__slug %}</a></th>
<td><a href="{% url 'show_check_subproject' name=check.check_id project=obj.translation__subproject__project__slug subproject=obj.translation__subproject__slug %}{{ ignore_string }}">{{ obj.count }}</a></td>
</tr>
<a class="list-group-item" href="{% url 'show_check_subproject' name=check.check_id project=obj.translation__subproject__project__slug subproject=obj.translation__subproject__slug %}{{ ignore_string }}"><span class="badge">{{ obj.count }}</span>{% subproject_name obj.translation__subproject__project__slug obj.translation__subproject__slug %}</a>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p>
{% show_message "warning" _("No matching checks found!") %}
</p>
{% endif %}
{% endblock %}
......@@ -21,34 +21,16 @@
</p>
{% if anychecks %}
<table class="sort table table-condensed table-striped">
<thead>
<tr>
<th>{% trans "Translation" %}</th>
<th>{% trans "Failures" %}</th>
</tr>
<tbody>
<div class="list-group">
{% for obj in checks %}
<tr>
<th><a href="{% url 'translation' project=subproject.project.slug subproject=subproject.slug lang=obj.translation__language__code %}">{% language_name obj.translation__language__code %}</a></th>
<td><a href="{% url 'translate' project=subproject.project.slug subproject=subproject.slug lang=obj.translation__language__code %}{{ ignore_string }}{% if ignore_string %}&amp;{% else %}?{% endif %}type={{ check.check_id }}">{{ obj.count }}</a></td>
</tr>
<a class="list-group-item" href="{% url 'translate' project=subproject.project.slug subproject=subproject.slug lang=obj.translation__language__code %}{{ ignore_string }}{% if ignore_string %}&amp;{% else %}?{% endif %}type={{ check.check_id }}"><span class="badge">{{ obj.count }}</span>{% language_name obj.translation__language__code %}</a>
{% endfor %}
{% for count in source_checks %}
<tr>
<th><a href="{% url 'show_source' project=subproject.project.slug subproject=subproject.slug %}">{% trans "Source" %}</a></th>
<td><a href="{% url 'review_source' project=subproject.project.slug subproject=subproject.slug %}{{ ignore_string }}{% if ignore_string %}&amp;{% else %}?{% endif %}type={{ check.check_id }}">{{ count }}</a></td>
</tr>
<a class="list-group-item" href="{% url 'review_source' project=subproject.project.slug subproject=subproject.slug %}{{ ignore_string }}{% if ignore_string %}&amp;{% else %}?{% endif %}type={{ check.check_id }}"><span class="badge">{{ count }}</span>{% trans "Source" %}</a>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p>
{% show_message "warning" _("No matching checks found!") %}
</p>
{% endif %}
{% endblock %}
......@@ -9,20 +9,10 @@
{% block content %}
<table class="sort table table-condensed table-striped">
<thead>
<tr>
<th>{% trans "Check" %}</th>
<th>{% trans "Failures" %}</th>
</tr>
<tbody>
<div class="list-group">
{% for check in checks %}
<tr>
<th><abbr title="{% check_description check.check %}">{% check_name check.check %}</abbr></th>
<td><a href="{% url 'show_check' name=check.check %}{{ ignore_string }}">{{ check.count }}</a></td>
</tr>
<a class="list-group-item" href="{% url 'show_check' name=check.check %}{{ ignore_string }}"><span class="badge">{{ check.count }}</span><abbr title="{% check_description check.check %}">{% check_name check.check %}</abbr></a>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment