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

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

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

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

<a class="menu-float" href="{{ object.get_widgets_url }}">
<img src="{% url 'widget-image' project=object.project.slug widget='shields' color='badge' extension='svg' %}" />
</a>

<table class="info">
{% include "subproject_info.html" %}
</table>

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

{% include "list-translations.html" %}

{% url 'contact' as contact_url %}


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

<div class="tabs" id="subproject-tabs">
<ul>
<li><a href="#changes">{% trans "History" %}</a></li>
{% if object.can_add_language %}
<li><a href="#new-lang">{% trans "New translation" %}</a></li>
{% endif %}
{% if perms.trans.commit_translation or perms.trans.update_translation %}
<li><a href="{% url 'git_status_subproject' project=object.project.slug subproject=object.slug %}">{% trans "Git maintenance" %}</a></li>
{% endif %}
<li><a href="#share">{% trans "Share" %}</a></li>
<li><a href="#tools">{% trans "Tools" %}</a></li>
<li><a href="{% url 'view_activity_subproject' project=object.project.slug subproject=object.slug %}">{% trans "Activity" %}</a></li>
</ul>

{% if object.can_add_language %}
<div id="new-lang">
{% if object.project.new_lang == 'url' %}
<p>{% blocktrans with object.project.instructions as url %}Should your language be missing, please follow <a href="{{ url }}">translator instructions</a>.{% endblocktrans %}</li>
{% else %}
<p>{% trans "Please choose language into which you would like to translate." %}</p>
<form action="{% url 'new-language' project=object.project.slug subproject=object.slug %}" method="post">
{% csrf_token %}
<table>
{{ new_lang_form.as_table }}
<tr><td></td>
<td>
{% if object.project.new_lang == 'contact' or object.project.new_lang == 'add' %}
<input class="button" type="submit" value="{% trans "Start new translation" %}" />
{% endif %}
</td>
</tr>
</table>
</form>
<p>{% trans "Can not find your language in above list?" %}</p>
<p><a class="button" href="{{ contact_url }}?subject=New+language+request+for+{{ object }}">{% trans "Report missing language" %}</a></p>
{% endif %}
</div>
{% endif %}

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

<div id="share">
{% with object.project as project %}
{% include 'share.html' %}
{% endwith %}
</div>

<div id="tools">
<ul>
<li><a href="{% url 'show_source' project=object.project.slug subproject=object.slug %}">{% trans "Source strings review" %}</a></li>
<li><a href="{% url 'data_project' project=object.project.slug %}">{% trans "Machine redable data" %}</a></li>
</ul>
</div>

</div>

{% endblock %}

