{% load i18n %}
{% load translations %}

<table class="table table-condensed">
<thead>
<tr>
    <th>{{ unit.translation.component.context_label }}</th>
    {% if not unit.is_source %}
    <th>{{ unit.translation.component.source_language }}</th>
    {% endif %}
    <th>{{ unit.translation.language }}</th>
    <th>{% trans "State" %}</th>
</tr>
</thead>
<tbody>
{% for unit in units %}
<tr {% if current_unit.id == unit.id %}class="current_translation"{% endif %}>
<td>{% if unit.context %}<a href="{{ unit.get_absolute_url }}">{% format_translation unit.context unit.translation.component.source_language simple=True %}</a>{% endif %}</td>
{% if not unit.is_source %}
<td><a href="{{ unit.get_absolute_url }}">{% format_translation unit.source unit.translation.component.source_language simple=True %}</a></td>
{% endif %}
<td><a href="{{ unit.get_absolute_url }}">{% format_translation unit.target unit.translation.language unit.translation.plural simple=True %}</a></td>
<td>{% get_state_flags unit True %}</td>
</tr>
{% endfor %}
</tbody>
</table>
