{% extends "base.html" %}
{% load i18n %}
{% load translations %}

{% block breadcrumbs %}
<li><a href="{% url 'search' %}">{% trans "Search" %}</a></li>
{% endblock %}

{% block content %}

{% if page_obj.object_list %}
<table class="table table-bordered">
<tbody>
{% for unit in page_obj.object_list %}
<tr><th colspan="2">
<a href="{{ unit.translation.get_absolute_url }}">{{ unit.translation }}</a>
{% get_state_flags unit %}
</th></tr>
<tr>
<th class="source">{% trans "Source" %}</th>
<td><a href="{{ unit.get_absolute_url }}">{% format_translation unit.source unit.translation.subproject.project.source_language search_match=search_query %}</a></td>
</tr>
<tr>
<th class="source">{{ unit.translation.language }}</th>
<td><a href="{{ unit.get_absolute_url }}">{% format_translation unit.target unit.translation.language search_match=search_query %}</a></td>
</tr>
{% endfor %}
</tbody>
</table>

{% include "paginator.html" %}
{% else %}
{% show_message "info" _("No matching strings found!") %}
{% endif %}

{% include "search-form.html" %}

{% endblock %}
