{% extends "base.html" %}
{% load i18n %}
{% load url from future %}

{% block breadcrumbs %}
<li><a href="{{ object.get_absolute_url }}">{{ object }}</a></li>
{% endblock %}

{% block content %}

<h2>{% trans "Project Information" %}</h2>

{% include "project_info.html" %}

<h2>{% trans "Subprojects" %}</h2>

<table class="sort">
<thead>
<tr>
<th>{% trans "Subproject" %}</th>
<th colspan="2">{% trans "Translated" %}</th>
</tr>
<tbody>
{% for prj in object.subproject_set.all %}
{% with prj.get_translated_percent as percent %}
<tr>
<th><a href="{{ prj.get_absolute_url }}">{{ prj.name }}</a></th>
<td class="progress"><div class="progress" value="{{ percent|floatformat:0 }}"></div></td>
<td class="percent">{{ percent }}%</td>
</tr>
{% endwith %}
{% endfor %}
</tbody>
</table>

<h2>{% trans "Tools" %}</h2>

<div class="tabs" id="project-tabs">
<ul>
<li><a href="#changes">{% trans "Recent changes" %}</a></li>
<li><a href="#dicts">{% trans "Glossaries" %}</a></li>
{% if perms.trans.commit_translation or perms.trans.update_translation %}
<li><a href="{% url 'weblate.trans.views.git_status_project' project=object.slug %}">{% trans "Git maintenance" %}</a></li>
{% endif %}
<li><a href="#share">{% trans "Share" %}</a></li>
</ul>

<div id="dicts">
<ul>
{% for dict in dicts %}
<li><a href="{% url 'weblate.trans.views.show_dictionary' project=object.slug lang=dict.code %}">{{ dict }}</a></li>
{% endfor %}
<li><a href="{% url 'weblate.trans.views.show_dictionaries' project=object.slug %}">{% trans "Manage all glossaries" %}</a></li>
</ul>
</div>

<div id="changes">
{% include "last-changes.html" %}
</div>

<div id="share">
{% url 'weblate.trans.widgets.widgets' project=object.slug as widgets_url %}
{% url 'weblate.trans.views.data_project' project=object.slug as data_url %}
{% include 'share.html' %}
</div>

</div>

{% endblock %}
