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

{% block breadcrumb %}
{{ block.super }}
<a href="{{object.get_absolute_url}}">{{ object.title }}</a>
{% endblock %}

{% block appbar %}
<h2>{{ view.model.get_verbose_name }} - {{ object.title }}</h2>
{% if object|can_edit:request.user %}
<a rel="popup" href="{{ object.get_edit_url }}">{% trans 'edit' %}</a>
{% endif %}
{% if object|can_delete:request.user %}
<a rel="popup" href="{{ object.get_delete_url }}">{% trans 'delete' %}</a>
{% endif %}
{% endblock %}

{% block content %}

<div id="description">
{% block description %}
{% if object.description %}{{object.description|linebreaks}}{% endif %}

{% for field, value in object.get_description_fields %}
{% if value %}
<p>{{field.verbose_name}}{% trans ":" %} {{value}}</p>
{% endif %}
{% endfor %}
{% endblock %}
</div>

<div id="endpoints">
<h3>{% trans 'Endpoints' %}</h3>
  <div>
  {% block endpoints %}
  {% endblock %}
  </div>
</div>

<div id="security">
{% if perms.base.view_accessright %}
<h3>{% trans "Security" %}</h3>
  <div>
  {% block security %}
  {% endblock %}
  </div>
{% endif %}
</div>

{% endblock %}
