{% extends "passerelle/manage/service_view.html" %}
{% load i18n passerelle %}

{% block description %}
  {{ block.super }}

  {% if missing_phpserialize %}
    <div class="errors">
      <p>{% trans 'Missing runtime dependencies:' %}
        {% if missing_phpserialize %}phpserialize{% endif %}
      </p>
    </div>
  {% endif %}
{% endblock %}

{% block endpoints %}
  <ul class="endpoints">
    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Listing communes:' %}</span> <a class="example-url" href="{% url 'generic-endpoint' connector="gdc" slug=object.slug endpoint="communes" %}"
    >{{ site_base_uri }}{% url 'generic-endpoint' connector="gdc" slug=object.slug endpoint="communes" %}</a></div></li>
    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Listing streets:' %}</span> <a class="example-url" href="{% url 'gdc-voies' slug=object.slug insee=34022%}"
    >{{ site_base_uri }}{% url 'gdc-view' slug=object.slug %}/voies/<i>&lt;insee&gt;</i></a></div></li>
    <li class="get-method"><div class="description"><span class="description--label">{% trans 'Listing subjects:' %}</span> <a class="example-url" href="{% url 'generic-endpoint' connector="gdc" slug=object.slug endpoint="objets" %}"
    >{{ site_base_uri }}{% url 'generic-endpoint' connector="gdc" slug=object.slug endpoint="objets" %}</a></div></li>
    <li class="post-method"><div class="description"><span class="description--label">{% trans 'Posting a new request:' %}</span> <a class="example-url" href="{% url 'gdc-post' slug=object.slug %}"
    >{{ site_base_uri }}{% url 'gdc-post' slug=object.slug %}</a></div></li>
  </ul>
{% endblock %}

{% block security %}
  <p>
    {% trans 'Accessing the listings is open, but posting requests is limited to the following API users:' %}
  </p>
  {% access_rights_table resource=object permission='can_post_request' %}
{% endblock %}
