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

{% block description %}
<p>
{% trans 'Pastell URL:' %} {{ object.url }}
</p>

<p>
{% trans 'Document type:' %}
{% if object.document_type %}
{{ object.document_type }}
(<a rel="popup"  href="{% url 'pastell-type' slug=object.slug %}">{% trans 'change' %}</a>)
{% else %}
<a rel="popup" href="{% url 'pastell-type' slug=object.slug %}">{% trans 'select' %}</a>
{% endif %}
</p>

{% if object.document_type %}
<h3>{% trans 'Document template' %}</h3>
{% if fields %}
{% for field in fields %}
<p>{{ field.key }}: {{ field.value }}</p>
{% endfor %}
{% endif %}
(<a rel="popup"  href="{% url 'pastell-fields' slug=object.slug %}">{% trans 'edit' %}</a>)
{% endif %}
{% endblock %}


{% block security %}
<p>
{% trans 'Posting documents is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_post_document' %}
{% endblock %}
