Commit fb2c3a74 authored by Michal Čihař's avatar Michal Čihař

Show count of nearby strings

Fixes #1058
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent d47b8e70
......@@ -35,7 +35,7 @@
{% include "show-lock.html" %}
{% endwith %}
{% with unit.get_comments as comments %}
{% with unit.get_comments as comments and unit.nearby as nearby %}
<ul class="pagination">
<li><a id="button-first" href="{{ first_unit_url }}" title="{% trans "First" %}"><i class="fa fa-step-backward"></i></a></li>
......@@ -148,7 +148,7 @@
</form>
<ul class="nav nav-pills translation-tabs">
<li class="active"><a href="#nearby" data-toggle="tab" title="{% trans "Messages placed around this one" %}">{% trans "Nearby messages" %}</a></li>
<li class="active"><a href="#nearby" data-toggle="tab" title="{% trans "Messages placed around this one" %}">{% trans "Nearby messages" %} <span class="badge">{{ nearby.count }}</span></a></li>
{% if unit.suggestions %}
<li><a href="#suggestions" data-toggle="tab">{% trans "Suggestions" %} <span class="badge">{{ unit.suggestions.count }}</span></a></li>
{% endif %}
......@@ -173,7 +173,7 @@
<tr><th></th><th>{% trans "Source" %}</th><th>{% trans "Translation" %}</th><th>{% trans "State" %}</th></tr>
</thead>
<tbody>
{% for item in unit.nearby %}
{% for item in nearby %}
<tr {% if unit.position == item.position %}class="current_translation"{% endif %}>
<td class="number"><a href="{{ item.get_absolute_url }}">{{ item.position }}</a></td>
<td><a href="{{ item.get_absolute_url }}">{% format_translation item.source unit.translation.subproject.project.source_language %}</a></td>
......
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