Commit 3f21eec1 authored by Michal Čihař's avatar Michal Čihař

Better name for variable holding URL parameters

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent d47d8921
......@@ -30,7 +30,7 @@
{% 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>
<td><a href="{% url 'show_check_project' name=check.check_id project=obj.project__slug %}{{ url_params }}">{{ obj.count }}</a></td>
</tr>
{% endfor %}
</tbody>
......
......@@ -30,7 +30,7 @@
{% 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>
<td><a href="{% url 'show_check_subproject' name=check.check_id project=obj.translation__subproject__project__slug subproject=obj.translation__subproject__slug %}{{ url_params }}">{{ obj.count }}</a></td>
</tr>
{% endfor %}
</tbody>
......
......@@ -31,13 +31,13 @@
{% 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>
<td><a href="{% url 'translate' project=subproject.project.slug subproject=subproject.slug lang=obj.translation__language__code %}{{ url_params }}{% if url_params %}&amp;{% else %}?{% endif %}type={{ check.check_id }}">{{ obj.count }}</a></td>
</tr>
{% 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>
<td><a href="{% url 'review_source' project=subproject.project.slug subproject=subproject.slug %}{{ url_params }}{% if url_params %}&amp;{% else %}?{% endif %}type={{ check.check_id }}">{{ count }}</a></td>
</tr>
{% endfor %}
</tbody>
......
......@@ -19,7 +19,7 @@
{% 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>
<td><a href="{% url 'show_check' name=check.check %}{{ url_params }}">{{ check.count }}</a></td>
</tr>
{% endfor %}
</tbody>
......
......@@ -33,9 +33,9 @@ def show_checks(request):
List of failing checks.
'''
ignore = ('ignored' in request.GET)
ignore_string = ''
url_params = ''
if ignore:
ignore_string = '?ignored=true'
url_params = '?ignored=true'
allchecks = Check.objects.filter(
ignore=ignore,
......@@ -46,7 +46,7 @@ def show_checks(request):
{
'checks': allchecks,
'title': _('Failing checks'),
'ignore_string': ignore_string,
'url_params': url_params,
}
)
......@@ -61,9 +61,9 @@ def show_check(request, name):
raise Http404('No check matches the given query.')
ignore = ('ignored' in request.GET)
ignore_string = ''
url_params = ''
if ignore:
ignore_string = '?ignored=true'
url_params = '?ignored=true'
checks = Check.objects.filter(
check=name,
......@@ -77,7 +77,7 @@ def show_check(request, name):
'checks': checks,
'title': check.name,
'check': check,
'ignore_string': ignore_string,
'url_params': url_params,
}
)
......@@ -93,9 +93,9 @@ def show_check_project(request, name, project):
raise Http404('No check matches the given query.')
ignore = ('ignored' in request.GET)
ignore_string = ''
url_params = ''
if ignore:
ignore_string = '?ignored=true'
url_params = '?ignored=true'
units = Unit.objects.none()
if check.target:
......@@ -169,7 +169,7 @@ def show_check_project(request, name, project):
'title': '%s/%s' % (prj.__unicode__(), check.name),
'check': check,
'project': prj,
'ignore_string': ignore_string,
'url_params': url_params,
}
)
......@@ -185,9 +185,9 @@ def show_check_subproject(request, name, project, subproject):
raise Http404('No check matches the given query.')
ignore = ('ignored' in request.GET)
ignore_string = ''
url_params = ''
if ignore:
ignore_string = '?ignored=true'
url_params = '?ignored=true'
units = Unit.objects.none()
if check.target:
......@@ -256,6 +256,6 @@ def show_check_subproject(request, name, project, subproject):
'title': '%s/%s' % (subprj.__unicode__(), check.name),
'check': check,
'subproject': subprj,
'ignore_string': ignore_string,
'url_params': url_params,
}
)
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