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 @@ ...@@ -19,27 +19,13 @@
</p> </p>
{% if checks %} {% if checks %}
<div class="list-group">
<table class="sort table table-condensed table-striped">
<thead>
<tr>
<th>{% trans "Project" %}</th>
<th>{% trans "Failures" %}</th>
</tr>
<tbody>
{% for obj in checks %} {% for obj in checks %}
<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>
<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>
{% endfor %} {% endfor %}
</tbody> </div>
</table>
{% else %} {% else %}
<p>
{% show_message "warning" _("No matching checks found!") %} {% show_message "warning" _("No matching checks found!") %}
</p>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
...@@ -20,27 +20,13 @@ ...@@ -20,27 +20,13 @@
</p> </p>
{% if checks %} {% if checks %}
<table class="sort table table-condensed table-striped"> <div class="list-group">
<thead>
<tr>
<th>{% trans "Project" %}</th>
<th>{% trans "Failures" %}</th>
</tr>
<tbody>
{% for obj in checks %} {% for obj in checks %}
<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>
<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>
{% endfor %} {% endfor %}
</tbody> </div>
</table>
{% else %} {% else %}
<p>
{% show_message "warning" _("No matching checks found!") %} {% show_message "warning" _("No matching checks found!") %}
</p>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
...@@ -21,34 +21,16 @@ ...@@ -21,34 +21,16 @@
</p> </p>
{% if anychecks %} {% if anychecks %}
<table class="sort table table-condensed table-striped"> <div class="list-group">
<thead>
<tr>
<th>{% trans "Translation" %}</th>
<th>{% trans "Failures" %}</th>
</tr>
<tbody>
{% for obj in checks %} {% for obj in checks %}
<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>
<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>
{% endfor %} {% endfor %}
{% for count in source_checks %} {% for count in source_checks %}
<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>
<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>
{% endfor %} {% endfor %}
</tbody> </div>
</table>
{% else %} {% else %}
<p>
{% show_message "warning" _("No matching checks found!") %} {% show_message "warning" _("No matching checks found!") %}
</p>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
...@@ -9,20 +9,10 @@ ...@@ -9,20 +9,10 @@
{% block content %} {% block content %}
<table class="sort table table-condensed table-striped"> <div class="list-group">
<thead>
<tr>
<th>{% trans "Check" %}</th>
<th>{% trans "Failures" %}</th>
</tr>
<tbody>
{% for check in checks %} {% for check in checks %}
<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>
<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>
{% endfor %} {% endfor %}
</tbody> </div>
</table>
{% endblock %} {% 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