{% extends "base.html" %}

{% block title %} {{ _('Languages') }} — {{ service_name }}{% endblock %}

{% block content %}
  <h1>{{ _('Languages') }}</h1>
  <p class="text-muted">{{ _('Available Languages to choose for names, descriptions and other properties of instruments and other elements.') }} <a href="https://scientific-it-systems.iffgit.fz-juelich.de/SampleDB/user_guide/languages.html">{{ _('Read more.') }}</a></p>
  {% if current_user.is_admin and not current_user.is_readonly %}
    <p><a href="{{ url_for('.new_language') }}" class="btn btn-default"> {{ _('Add new language') }}</a></p>
  {% endif %}
  <ul>
  {% for language in languages %}
    <li>
      <a href="{{ url_for('.language', language_id=language.id) }}" title="{{ language.names | get_translated_text }}">{{ language.names | get_translated_text }}</a>
      {% if not language.enabled_for_input %}
        <span class="label label-default">{{ _('Disabled for input') }}</span>
      {% endif %}
    </li>
  {% endfor %}
  </ul>
{% endblock %}
