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

{% block breadcrumbs %}
<li><a href="{% url 'languages' %}">{% trans "Languages" %}</a></li>
<li><a href="{{ object.get_absolute_url }}">{{ object }}</a></li>
{% endblock %}

{% block content %}

<ul class="nav nav-pills">
  <li class="active"><a href="#overview" data-toggle="tab">{% trans "Overview" %}</a></li>
  <li><a href="#history" data-toggle="tab">{% trans "History" %}</a></li>
  <li><a href="#activity" data-toggle="tab" data-href="{% url 'view_language_activity' lang=object.code %}">{% trans "Activity" %}</a></li>
  <li><a href="#dicts" data-toggle="tab">{% trans "Glossaries" %}</a></li>
  <li class="dropdown">
    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
      {% trans "Tools" %} <span class="caret"></span>
    </a>
    <ul class="dropdown-menu">
      <li><a href="{% url 'checks' %}?language={{ object.code }}">{% trans "Failing checks" %}</a></li>
      <li><a href="{% url 'checks' %}?language={{ object.code }}&amp;ignored=true">{% trans "Ignored checks" %}</a></li>
    </ul>
   </li>
</ul>

<div class="tab-content">
<div class="tab-pane active" id="overview">
<div class="panel panel-primary">
  <div class="panel-heading"><h4 class="panel-title">{% trans "Projects" %}</h4></div>
  <div class="panel-body">

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

  </div>
</div>
</div>

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

<div class="tab-pane" id="activity">
<div class="panel panel-primary">
<div class="panel-heading"><h4 class="panel-title">{% trans "Activity" %}</h4></div>
<div class="panel-body">
<p>{% trans "Loading…" %}</p>
</div>
</div>
</div>

<div class="tab-pane" id="dicts">
<div class="panel panel-primary">
<div class="panel-heading"><h4 class="panel-title">{% trans "Glossaries" %}</h4></div>
<div class="panel-body">
{% if dicts %}
<div class="list-group">
{% for dict in dicts %}
<a class="list-group-item" href="{% url 'show_dictionary' lang=object.code project=dict.slug %}">{{ dict }}</a>
{% endfor %}
</div>
{% else %}
{% show_message "info" _("There are no glossaries defined for this language.") %}
{% endif %}
</div>
</div>
</div>

</div>

{% endblock %}
