{% extends "passerelle/base.html" %}
{% load i18n %}

{% block appbar %}
  <h2>{% trans 'Web Services' %}</h2>
  <span class="actions">
    <a class="extra-actions-menu-opener"></a>
    <a href="{% url 'apiuser-list' %}">{% trans 'Access Management' %}</a>
    <a href="{% url 'add-connector' %}">{% trans 'Add Connector' %}</a>
  </span>
  <ul class="extra-actions-menu">
    <li><a href="{% url 'import-site' %}" rel="popup">{% trans 'Import' %}</a></li>
    <li><a download href="{% url 'export-site' %}">{% trans 'Export' %}</a></li>
  </ul>
{% endblock %}

{% block content %}

  <div>
    <ul class="objects-list single-links connectors">
      {% for a in apps %}
        {% with a.has_open_access_right as is_open %}
          <li class="connector {{ a.get_css_class_name }} status-{{ a.get_availability_status.status }} {% if is_open %}is-open{% endif %}">
            <a href="{{ a.get_absolute_url }}">
              <span class="connector-name">{{ a.title }}</span>
              <span class="connector-details">({{ a.get_verbose_name }}{% if is_open %},
                <span class="connector-open">{% trans "open access" %}</span>{% endif %})</span>
            </a>
          </li>
        {% endwith %}
      {% endfor %}
    </ul>
  </div>

{% endblock %}

