{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% load crispy_forms_tags %}

{% block extra_meta %}
<link rel="canonical" href="{{ unit.get_absolute_url }}" />
{% endblock %}

{% block breadcrumbs %}
<li><a href="{{ object.subproject.project.get_absolute_url }}">{{ object.subproject.project }}</a></li>
<li><a href="{{ object.subproject.get_absolute_url }}">{{ object.subproject.name }}</a></li>
<li><a href="{{ object.get_absolute_url }}">{{ object.language }}</a></li>
<li><a href="{{ object.get_translate_url }}">{% trans "zen" %}</a></li>
{% endblock %}

{% block content %}

{% include "show-lock.html" %}

<a href="{% url 'translate' project=object.subproject.project.slug subproject=object.subproject.slug lang=object.language.code %}?sid={{ search_id }}" title="{% trans "Edit in single unit mode" %}" class="btn btn-default pull-right flip"><i class="fa fa-edit"></i> {% trans "Exit Zen" %}</a>

<div class="btn-group">
<ul class="pagination unit-navi">
<li>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
{% blocktrans %}{{ filter_name }} ({{ filter_count }}){% endblocktrans %}
<span class="caret"></span>
</a>
  <div class="dropdown-menu">

<div class="panel-group">
<form action="" method="GET">
{{ search_form|crispy }}
<input type="submit" value="{% trans "Search" %}" class="btn btn-default" />
</form>
</div>

</div>
</li>
</ul>
</div>

<table class="zen table table-condensed">
{% include 'zen-units.html' %}
<tfoot>
<tr><td colspan="3" class="loading-icon">
<i id="loading-next" class="fa fa-spinner fa-spin" style="display: none"></i>
<a href="{% url 'load_zen' project=object.subproject.project.slug subproject=object.subproject.slug lang=object.language.code %}?sid={{ search_id }}" class="hidden" id="zen-load" data-offset="{{ offset }}"></a>
<a href="{% url 'js-lock' project=object.subproject.project.slug subproject=object.subproject.slug lang=object.language.code %}" class="hidden" id="js-lock" {% if update_lock %}data-autostart="1"{% endif %}></a>
</td></tr>
</tfoot>
</table>

{% endblock %}
