misc: apply djhtml (#69422)

This commit is contained in:
Valentin Deniaud 2022-09-29 17:27:37 +02:00
parent 4a78e76c7f
commit 6da81964bd
62 changed files with 1612 additions and 1612 deletions

View File

@ -2,13 +2,13 @@
{% load i18n passerelle %}
{% block description %}
{{ block.super }}
{{ block.super }}
{% trans 'Accessible scopes list' %}:
<ul class="accessible-scopes">
{% for scope in apiparticulier.accessible_scopes %}
<li>{{ scope }}</li>
{% endfor %}
</ul>
{% trans 'Accessible scopes list' %}:
<ul class="accessible-scopes">
{% for scope in apiparticulier.accessible_scopes %}
<li>{{ scope }}</li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -2,21 +2,21 @@
{% load i18n passerelle %}
{% block description %}
{{ block.super }}
{% if object.get_zipcodes and not object.get_streets_queryset.exists %}
<div class="infonotice">
{% trans "Street data is not available yet, it should soon be downloaded." %}
</div>
{% endif %}
{% if object.api_geo_url and not object.cities_exist %}
<div class="infonotice">
{% trans "API Géo data is not available yet, it should soon be downloaded." %}
</div>
{% endif %}
{{ block.super }}
{% if object.get_zipcodes and not object.get_streets_queryset.exists %}
<div class="infonotice">
{% trans "Street data is not available yet, it should soon be downloaded." %}
</div>
{% endif %}
{% if object.api_geo_url and not object.cities_exist %}
<div class="infonotice">
{% trans "API Géo data is not available yet, it should soon be downloaded." %}
</div>
{% endif %}
{% endblock %}
{% block security %}
<p>
{% trans 'Accessing the listings is open.' %}
</p>
<p>
{% trans 'Accessing the listings is open.' %}
</p>
{% endblock %}

View File

@ -2,55 +2,55 @@
{% load i18n passerelle %}
{% block description %}
<p>
Service URL : {{ object.service_url }}
</p>
<p>
Service URL : {{ object.service_url }}
</p>
{% endblock %}
{% block endpoints %}
<ul class="endpoints">
{% url 'bdp-resources' slug=object.slug resources='resources' as resources_url%}
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Listing resources:' %}</span>
<a class="example-url" href="{{ resources_url }}">{{ resources_url }}</a></div>
</li>
{% url 'bdp-post-adherent' slug=object.slug as adherent_url%}
<li class="post-method">
<div class="description"><span class="description--label">{% trans 'Creating a new user:' %}</span>
<a class="example-url" href="adherent_url" >{{ adherent_url }}</a></div>
</li>
</ul>
<ul class="endpoints">
{% url 'bdp-resources' slug=object.slug resources='resources' as resources_url%}
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Listing resources:' %}</span>
<a class="example-url" href="{{ resources_url }}">{{ resources_url }}</a></div>
</li>
{% url 'bdp-post-adherent' slug=object.slug as adherent_url%}
<li class="post-method">
<div class="description"><span class="description--label">{% trans 'Creating a new user:' %}</span>
<a class="example-url" href="adherent_url" >{{ adherent_url }}</a></div>
</li>
</ul>
<h3>{% trans 'Examples' %}</h3>
<ul class="endpoints">
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Libraries:' %}</span>
<a class="example-url" href="{{ site_base_uri }}{% url 'bdp-resources' slug=object.slug resources='bibliotheques' %}"
>{{ site_base_uri }}{% url 'bdp-resources' slug=object.slug resources='bibliotheques' %}</a></div>
</li>
{% url 'bdp-resources' slug=object.slug resources='bibliotheques' as bibliotheques_url %}
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Libraries with a text label:' %}</span>
<a class="example-url" href="{{ bibliotheques_url }}?text_key=nom">{{ bibliotheques_url }}?text_key=nom</a></div>
</li>
{% url 'bdp-resources' slug=object.slug resources='adherents' as adherents_url %}
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Members:' %}</span>
<a class="example-url" href="{{ adherents_url }}">{{ adherents_url }}</a></div>
</li>
{% url 'bdp-resources' slug=object.slug resources='adherents' as adherents_filter_url %}
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Filtered Members:' %}</span>
<a class="example-url" href="{{ adherents_filter_url }}?filter[0][field]=email&filter[0][operator]=eq&filter[0][value]=login@example.net">{{ adherents_filter_url }}?filter[0][field]=email&filter[0][operator]=eq&filter[0][value]=login@example.net</a></div>
</li>
</ul>
<h3>{% trans 'Examples' %}</h3>
<ul class="endpoints">
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Libraries:' %}</span>
<a class="example-url" href="{{ site_base_uri }}{% url 'bdp-resources' slug=object.slug resources='bibliotheques' %}"
>{{ site_base_uri }}{% url 'bdp-resources' slug=object.slug resources='bibliotheques' %}</a></div>
</li>
{% url 'bdp-resources' slug=object.slug resources='bibliotheques' as bibliotheques_url %}
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Libraries with a text label:' %}</span>
<a class="example-url" href="{{ bibliotheques_url }}?text_key=nom">{{ bibliotheques_url }}?text_key=nom</a></div>
</li>
{% url 'bdp-resources' slug=object.slug resources='adherents' as adherents_url %}
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Members:' %}</span>
<a class="example-url" href="{{ adherents_url }}">{{ adherents_url }}</a></div>
</li>
{% url 'bdp-resources' slug=object.slug resources='adherents' as adherents_filter_url %}
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Filtered Members:' %}</span>
<a class="example-url" href="{{ adherents_filter_url }}?filter[0][field]=email&filter[0][operator]=eq&filter[0][value]=login@example.net">{{ adherents_filter_url }}?filter[0][field]=email&filter[0][operator]=eq&filter[0][value]=login@example.net</a></div>
</li>
</ul>
{% endblock %}
{% block security %}
<p>
{% trans 'Accessing is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_access' %}
<p>
{% trans 'Accessing is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_access' %}
{% endblock %}

View File

@ -2,52 +2,52 @@
{% load i18n passerelle %}
{% block description %}
<p>
Server: {{ object.server }}
</p>
<p>
Server: {{ object.server }}
</p>
{% endblock %}
{% block endpoints %}
<ul class="endpoints">
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Listing all sets:' %}</span>
{% url 'generic-endpoint' connector="clicrdv" slug=object.slug endpoint="interventionsets" slug=object.slug as interventionsets_url %}
<a class="example-url" href="{{ interventionsets_url }}">{{ site_base_uri }}{{ interventionsets_url }}</a></div>
</li>
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Listing interventions in a set:' %}</span>
<a class="example-url" href="{{ interventionsets_url }}">{{ site_base_uri }}{{ interventionsets_url }}/<i>&lt;set_id&gt;</i></a></div>
</li>
<li class="get-method">
{% url 'clicrdv-view' slug=object.slug as view_url %}
<div class="description"><span class="description--label">{% trans 'Listing of free dates and times for an intervention:' %}</span>
<a class="example-url">{{ site_base_uri }}{{ view_url }}interventions/<i>&lt;intervention_id&gt;</i>/datetimes</a></a></div>
<ul class="endpoints">
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Listing all sets:' %}</span>
{% url 'generic-endpoint' connector="clicrdv" slug=object.slug endpoint="interventionsets" slug=object.slug as interventionsets_url %}
<a class="example-url" href="{{ interventionsets_url }}">{{ site_base_uri }}{{ interventionsets_url }}</a></div>
</li>
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Listing interventions in a set:' %}</span>
<a class="example-url" href="{{ interventionsets_url }}">{{ site_base_uri }}{{ interventionsets_url }}/<i>&lt;set_id&gt;</i></a></div>
</li>
<li class="get-method">
{% url 'clicrdv-view' slug=object.slug as view_url %}
<div class="description"><span class="description--label">{% trans 'Listing of free dates and times for an intervention:' %}</span>
<a class="example-url">{{ site_base_uri }}{{ view_url }}interventions/<i>&lt;intervention_id&gt;</i>/datetimes</a></a></div>
</li>
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Listing of free dates for an intervention:' %}</span>
<a class="example-url">{{ site_base_uri }}{{ view_url }}interventions/<i>&lt;intervention_id&gt;</i>/dates</a></div>
<a class="example-url">{{ site_base_uri }}{{ view_url }}interventions/<i>&lt;intervention_id&gt;</i>/dates</a></div>
</li>
<li class="get-method">
<div class="description"><span class="description--label">{% trans 'Listing of free times a given date for an intervention:' %}</span>
<a class="example-url">{{ site_base_uri }}{{ view_url }}interventions/<i>&lt;intervention_id&gt;</i>/<i>&lt;date&gt;</i></a></div>
<a class="example-url">{{ site_base_uri }}{{ view_url }}interventions/<i>&lt;intervention_id&gt;</i>/<i>&lt;date&gt;</i></a></div>
</li>
<li class="post-method">
{% url 'clicrdv-create-appointment-qs' slug=object.slug as create_appointment_url %}
<div class="description"><span class="description--label">{% trans 'Creating a new appointment:' %}</span>
<a class="example-url" href="{{ create_appointment_url }}">{{ site_base_uri }}{{ create_appointment_url }}</a></div>
<a class="example-url" href="{{ create_appointment_url }}">{{ site_base_uri }}{{ create_appointment_url }}</a></div>
</li>
<li class="get-method">
{% url 'clicrdv-cancel-appointment' slug=object.slug appointment_id='000' as appointment_cancel_url %}
<div class="description"><span class="description--label">{% trans 'Cancelling an appointment:' %}</span>
<a class="example-url">{{ site_base_uri }}{{ view_url }}<i>&lt;appointment_id&gt;</i>/cancel</a></div>
<a class="example-url">{{ site_base_uri }}{{ view_url }}<i>&lt;appointment_id&gt;</i>/cancel</a></div>
</li>
</ul>
</ul>
{% endblock %}
{% block security %}
<p>
{% trans 'Accessing the listings is open, but creation and cancellation of appointments requests is limited to the following API users:' %}
</p>
<p>
{% trans 'Accessing the listings is open, but creation and cancellation of appointments requests is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_manage_appointment' %}
{% access_rights_table resource=object permission='can_manage_appointment' %}
{% endblock %}

View File

@ -2,48 +2,48 @@
{% load i18n passerelle %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url "cmis-type" object.slug %}">{% trans "CMIS Types" %}</a>
{{ block.super }}
<a href="{% url "cmis-type" object.slug %}">{% trans "CMIS Types" %}</a>
{% endblock %}
{% block content %}
{% if current_type %}
<a href={% url "cmis-type" object.slug %}>
{% trans "Back to base types list" %}
</a>
{% endif %}
{% if current_type %}
<a href={% url "cmis-type" object.slug %}>
{% trans "Back to base types list" %}
</a>
{% endif %}
<p>
{% if current_type %}
<h3>{% trans "Current type" %} :</h3>
<span class="cmis-id">{{ current_type.id }}</span> : {{ current_type.description }}</span>
</p>
<p>
{% if current_type %}
<h3>{% trans "Current type" %} :</h3>
<span class="cmis-id">{{ current_type.id }}</span> : {{ current_type.description }}</span>
</p>
<p>
<h4>Properties :</h4>
<ul>
{% for prop in current_properties %}
<li>
<span class="cmis-id">{{ prop.id }}</span>
({{ prop.propertyType }}{% if prop.required %}, {% trans "required" %}{% endif %}) :
{{ prop.description }}
</li>
{% endfor %}
</ul>
</p>
<p>
<h4>Properties :</h4>
<ul>
{% for prop in current_properties %}
<li>
<span class="cmis-id">{{ prop.id }}</span>
({{ prop.propertyType }}{% if prop.required %}, {% trans "required" %}{% endif %}) :
{{ prop.description }}
</li>
{% endfor %}
</ul>
</p>
<p>
<h3>{% trans "Children" %} :</h3>
{% endif %}
<p>
<h3>{% trans "Children" %} :</h3>
{% endif %}
{% if children_types %}
<ul>
{% for type in children_types %}
<li><a href={% url "cmis-type" object.slug %}?id={{ type.id }}>{{ type.id }}</a> : {{ type.description }}</li>
{% endfor %}
</ul>
{% else %}
{% trans "No more children." %}
{% endif %}
</p>
{% if children_types %}
<ul>
{% for type in children_types %}
<li><a href={% url "cmis-type" object.slug %}?id={{ type.id }}>{{ type.id }}</a> : {{ type.description }}</li>
{% endfor %}
</ul>
{% else %}
{% trans "No more children." %}
{% endif %}
</p>
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n passerelle %}
{% block description %}
{{ block.super }}
<p>
<a href="{% url "cmis-type" object.slug %}?type={{ object.root_type }}">{% trans 'Explore available object types' %}</a>
</p>
{{ block.super }}
<p>
<a href="{% url "cmis-type" object.slug %}?type={{ object.root_type }}">{% trans 'Explore available object types' %}</a>
</p>
{% endblock %}

View File

@ -2,42 +2,42 @@
{% load i18n passerelle %}
{% block description %}
{% if object.description %}{{object.description|linebreaks}}{% endif %}
{% if object.description %}{{object.description|linebreaks}}{% endif %}
<p>
{% trans "File:" %}
{% if object|can_edit:request.user %}<a href="{% url 'csv-download' connector_slug=object.slug %}">{{object.csv_file}}</a>
— {% trans "added on" %} {{object.csv_file_datetime}}
{% else %}{{object.csv_file}}{% endif %}
</p>
<p>
{% trans "File:" %}
{% if object|can_edit:request.user %}<a href="{% url 'csv-download' connector_slug=object.slug %}">{{object.csv_file}}</a>
— {% trans "added on" %} {{object.csv_file_datetime}}
{% else %}{{object.csv_file}}{% endif %}
</p>
{% endblock %}
{% block endpoints %}
<h4>{% trans "Access" %}</h4>
<ul class="endpoints">
{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='data' as csvdatasource_data_url %}
<li class="get-method">
<div class="description"><span class="description--label">{% trans "Returning all file lines:" %}</span>
<a class="example-url" href="{{ csvdatasource_data_url }}">{{ csvdatasource_data_url }}</a></div>
</li>
<li class="get-method">
<div class="description"><span class="description--label">{% trans "Returning lines containing 'abc' in 'text' column (case insensitive):" %}</span>
<a class="example-url" href="{{ csvdatasource_data_url }}?q=abc">{{ csvdatasource_data_url }}?q=abc</a></div>
</li>
{% for query in object.queries.all %}
<li class="get-method"><div class="description"><span class="description--label">{{ query.label }}:</span>
<a class="example-url" href="{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='query' rest=query.slug %}/">{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='query' rest=query.slug %}/</a></div>
{% if query.description %}&mdash; {{ query.description }}{% endif %}
</li>
{% endfor %}
</ul>
<h4>{% trans "Management" %}</h4>
<ul class="endpoints">
{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='update' as csvdatasource_update_url %}
<li class="put-method">
<div class="description">
<span class="description--label">{% trans "Modify spreadsheet file:" %}</span>
<a href="{{ csvdatasource_update_url }}" class="example-url">{{ csvdatasource_update_url }}</a></div>
</li>
</ul>
<h4>{% trans "Access" %}</h4>
<ul class="endpoints">
{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='data' as csvdatasource_data_url %}
<li class="get-method">
<div class="description"><span class="description--label">{% trans "Returning all file lines:" %}</span>
<a class="example-url" href="{{ csvdatasource_data_url }}">{{ csvdatasource_data_url }}</a></div>
</li>
<li class="get-method">
<div class="description"><span class="description--label">{% trans "Returning lines containing 'abc' in 'text' column (case insensitive):" %}</span>
<a class="example-url" href="{{ csvdatasource_data_url }}?q=abc">{{ csvdatasource_data_url }}?q=abc</a></div>
</li>
{% for query in object.queries.all %}
<li class="get-method"><div class="description"><span class="description--label">{{ query.label }}:</span>
<a class="example-url" href="{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='query' rest=query.slug %}/">{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='query' rest=query.slug %}/</a></div>
{% if query.description %}&mdash; {{ query.description }}{% endif %}
</li>
{% endfor %}
</ul>
<h4>{% trans "Management" %}</h4>
<ul class="endpoints">
{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='update' as csvdatasource_update_url %}
<li class="put-method">
<div class="description">
<span class="description--label">{% trans "Modify spreadsheet file:" %}</span>
<a href="{{ csvdatasource_update_url }}" class="example-url">{{ csvdatasource_update_url }}</a></div>
</li>
</ul>
{% endblock %}

View File

@ -2,24 +2,24 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{{ resource.get_absolute_url }}">{{ resource.title }}</a>
<a href="{{ object.id }}">{{ object.slug }}</a>
{{ block.super }}
<a href="{{ resource.get_absolute_url }}">{{ resource.title }}</a>
<a href="{{ object.id }}">{{ object.slug }}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'Query:' %} {{ object.slug }}</h2>
<h2>{% trans 'Query:' %} {{ object.slug }}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>{% blocktrans %}Are you sure you want to delete this query?{% endblocktrans %}</p>
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a href="{{ resource.get_absolute_url }}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<p>{% blocktrans %}Are you sure you want to delete this query?{% endblocktrans %}</p>
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a href="{{ resource.get_absolute_url }}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,32 +2,32 @@
{% load i18n gadjo %}
{% block breadcrumb %}
{{ block.super }}
<a href="{{ resource.get_absolute_url }}">{{ resource.title }}</a>
{% if object.id %}
<a href="{{ object.id }}">{{ object.slug }}</a>
{% else %}
<a href="#">{% trans 'Add Query' %}</a>
{% endif %}
{{ block.super }}
<a href="{{ resource.get_absolute_url }}">{{ resource.title }}</a>
{% if object.id %}
<a href="{{ object.id }}">{{ object.slug }}</a>
{% else %}
<a href="#">{% trans 'Add Query' %}</a>
{% endif %}
{% endblock %}
{% block appbar %}
<h2>{% if object.id %}{% trans 'Query:' %} {{ object.slug }}{% else %}{% trans 'New Query' %}{% endif %}</h2>
<h2>{% if object.id %}{% trans 'Query:' %} {{ object.slug }}{% else %}{% trans 'New Query' %}{% endif %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
<div id="form-content">
{% csrf_token %}
{{ form|with_template }}
</div>
{% block buttons %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{{ resource.get_absolute_url }}">{% trans 'Cancel' %}</a>
</div>
{% endblock %}
</form>
<form method="post" enctype="multipart/form-data">
<div id="form-content">
{% csrf_token %}
{{ form|with_template }}
</div>
{% block buttons %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{{ resource.get_absolute_url }}">{% trans 'Cancel' %}</a>
</div>
{% endblock %}
</form>
{% endblock %}

View File

@ -2,60 +2,60 @@
{% load i18n passerelle %}
{% block endpoints %}
<h4>{% trans "Family" %}</h4>
<ul class="endpoints">
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='family' rest='link/' as link_url %}
<div class="description"><span class="description--label">{% trans 'Link to a family:' %}</span>
<a class="example-url" href="{{ link_url }}">{{ site_base_uri }}{{ link_url }}?NameID=...&login=...&password=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='family' rest='unlink/' as unlink_url %}
<div class="description"><span class="description--label">{% trans 'Unlink from a family:' %}</span>
<a class="example-url" href="{{ unlink_url }}">{{ site_base_uri }}{{ unlink_url }}?NameID=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='family' as family_url %}
<div class="description"><span class="description--label">{% trans 'Get family informations:' %}</span>
<a class="example-url" href="{{ family_url }}">{{ site_base_uri }}{{ family_url }}?NameID=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='family' rest='adults/' as adults_url %}
<div class="description"><span class="description--label">{% trans 'Get family adults:' %}</span>
<a class="example-url" href="{{ adults_url }}">{{ site_base_uri }}{{ adults_url }}?NameID=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='family' rest='children/' as children_url %}
<div class="description"><span class="description--label">{% trans 'Get family children:' %}</span>
<a class="example-url" href="{{ children_url }}">{{ site_base_uri }}{{ children_url }}?NameID=...</a></div>
</li>
</ul>
<h4>{% trans "Invoices" %}</h4>
<ul class="endpoints">
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='regie' rest='invoices/' as invoices_url %}
<div class="description"><span class="description--label">{% trans 'Get payable invoices:' %}</span>
<a class="example-url" href="{{ invoices_url }}">{{ site_base_uri }}{{ invoices_url }}?NameID=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='regie' rest='invoices/history/' as invoices_history_url %}
<div class="description"><span class="description--label">{% trans 'Get invoices history:' %}</span>
<a class="example-url" href="{{ invoices_history_url }}">{{ site_base_uri }}{{ invoices_history_url }}?NameID=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='regie' rest='invoice/invoice_id/' as invoice_url %}
<div class="description"><span class="description--label">{% trans 'Get invoice details:' %}</span>
<a class="example-url" href="{{ invoice_url }}">{{ site_base_uri }}{{ invoice_url }}</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='regie' rest='invoice/invoice_id/pdf/' as invoice_pdf_url %}
<div class="description"><span class="description--label">{% trans 'Get invoice PDF:' %}</span>
<a href="{{ invoice_pdf_url }}">{{ site_base_uri }}{{ invoice_pdf_url }}</a></div>
</li>
<li class="post-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='regie' rest='invoice/invoice_id/pay/' as invoice_pay_url %}
<div class="description"><span class="description--label">{% trans 'Pay invoice:' %}</span>
<a class="example-url" href="{{ invoice_pay_url }}">{{ site_base_uri }}{{ invoice_pay_url }}</a></div>
</li>
</ul>
<h4>{% trans "Family" %}</h4>
<ul class="endpoints">
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='family' rest='link/' as link_url %}
<div class="description"><span class="description--label">{% trans 'Link to a family:' %}</span>
<a class="example-url" href="{{ link_url }}">{{ site_base_uri }}{{ link_url }}?NameID=...&login=...&password=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='family' rest='unlink/' as unlink_url %}
<div class="description"><span class="description--label">{% trans 'Unlink from a family:' %}</span>
<a class="example-url" href="{{ unlink_url }}">{{ site_base_uri }}{{ unlink_url }}?NameID=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='family' as family_url %}
<div class="description"><span class="description--label">{% trans 'Get family informations:' %}</span>
<a class="example-url" href="{{ family_url }}">{{ site_base_uri }}{{ family_url }}?NameID=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='family' rest='adults/' as adults_url %}
<div class="description"><span class="description--label">{% trans 'Get family adults:' %}</span>
<a class="example-url" href="{{ adults_url }}">{{ site_base_uri }}{{ adults_url }}?NameID=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='family' rest='children/' as children_url %}
<div class="description"><span class="description--label">{% trans 'Get family children:' %}</span>
<a class="example-url" href="{{ children_url }}">{{ site_base_uri }}{{ children_url }}?NameID=...</a></div>
</li>
</ul>
<h4>{% trans "Invoices" %}</h4>
<ul class="endpoints">
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='regie' rest='invoices/' as invoices_url %}
<div class="description"><span class="description--label">{% trans 'Get payable invoices:' %}</span>
<a class="example-url" href="{{ invoices_url }}">{{ site_base_uri }}{{ invoices_url }}?NameID=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='regie' rest='invoices/history/' as invoices_history_url %}
<div class="description"><span class="description--label">{% trans 'Get invoices history:' %}</span>
<a class="example-url" href="{{ invoices_history_url }}">{{ site_base_uri }}{{ invoices_history_url }}?NameID=...</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='regie' rest='invoice/invoice_id/' as invoice_url %}
<div class="description"><span class="description--label">{% trans 'Get invoice details:' %}</span>
<a class="example-url" href="{{ invoice_url }}">{{ site_base_uri }}{{ invoice_url }}</a></div>
</li>
<li class="get-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='regie' rest='invoice/invoice_id/pdf/' as invoice_pdf_url %}
<div class="description"><span class="description--label">{% trans 'Get invoice PDF:' %}</span>
<a href="{{ invoice_pdf_url }}">{{ site_base_uri }}{{ invoice_pdf_url }}</a></div>
</li>
<li class="post-method">
{% url 'generic-endpoint' connector='family' slug=object.slug endpoint='regie' rest='invoice/invoice_id/pay/' as invoice_pay_url %}
<div class="description"><span class="description--label">{% trans 'Pay invoice:' %}</span>
<a class="example-url" href="{{ invoice_pay_url }}">{{ site_base_uri }}{{ invoice_pay_url }}</a></div>
</li>
</ul>
{% endblock %}

View File

@ -1,45 +1,45 @@
<html>
<head>
<script id="data" type="application/json">{{ data_json|safe }}</script>
<script id="error" type="application/json">{{ error_json|safe }}</script>
<script id="error_data" type="application/json">{{ error_data_json|safe }}</script>
</head>
<body>
{% if test %}<button id="continue">Continue</button>
<p>redirect_uri: <pre>{{ redirect_uri|pprint }}</pre></p>
<p>correlation_id: <pre>{{ franceconnect.correlation_id }}</pre></p>
{% if error %}
<p>{{ error }}<p>
{% if error.data %}
<dl>
{% for key, value in error.data %}
<dt>{{ key }}</td>
<dd><pre>{{ value|pprint }}</pre></dd>
{% endfor %}
</dl>
{% endif %}
{% endif %}
<ul>
<head>
<script id="data" type="application/json">{{ data_json|safe }}</script>
<script id="error" type="application/json">{{ error_json|safe }}</script>
<script id="error_data" type="application/json">{{ error_data_json|safe }}</script>
</head>
<body>
{% if test %}<button id="continue">Continue</button>
<p>redirect_uri: <pre>{{ redirect_uri|pprint }}</pre></p>
<p>correlation_id: <pre>{{ franceconnect.correlation_id }}</pre></p>
{% if error %}
<p>{{ error }}<p>
{% if error.data %}
<dl>
{% for key, value in error.data %}
<dt>{{ key }}</td>
<dd><pre>{{ value|pprint }}</pre></dd>
{% endfor %}
</dl>
{% endif %}
{% endif %}
<ul>
{% for key, value in franceconnect.items reversed %}
<li>{{ key }}&nbsp;: <pre>{{ value|pprint }}</pre></li>
<li>{{ key }}&nbsp;: <pre>{{ value|pprint }}</pre></li>
{% endfor %}
</ul>
{% endif %}
<script>
(function () {
const data = JSON.parse(document.getElementById('data').textContent || '{}');
const error = JSON.parse(document.getElementById('error').textContent || '{}');
const error_data = JSON.parse(document.getElementById('error_data').textContent || '{}');
const post_message = function () {
{% if error %}window.opener.postMessage({"error": error, "data": error_data}, "{{ origin }}");
{% else %}window.opener.postMessage(data, "{{ origin }}");{% endif %}
}{% if test %}
const continue_button = document.getElementById('continue');
continue_button.addEventListener('click', function () { post_message(); });
{% else %}
post_message(){% endif %}
})();
</script>
</body>
</ul>
{% endif %}
<script>
(function () {
const data = JSON.parse(document.getElementById('data').textContent || '{}');
const error = JSON.parse(document.getElementById('error').textContent || '{}');
const error_data = JSON.parse(document.getElementById('error_data').textContent || '{}');
const post_message = function () {
{% if error %}window.opener.postMessage({"error": error, "data": error_data}, "{{ origin }}");
{% else %}window.opener.postMessage(data, "{{ origin }}");{% endif %}
}{% if test %}
const continue_button = document.getElementById('continue');
continue_button.addEventListener('click', function () { post_message(); });
{% else %}
post_message(){% endif %}
})();
</script>
</body>
</html>

View File

@ -2,61 +2,61 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{{ resource.get_absolute_url }}">{{ resource.title }}</a>
<a href="#">{% trans "Demo view" %}</a>
{{ block.super }}
<a href="{{ resource.get_absolute_url }}">{{ resource.title }}</a>
<a href="#">{% trans "Demo view" %}</a>
{% endblock %}
{% block appbar %}
{% endblock %}
{% block content %}
<h1>{% trans "Demo view" %}</h1>
<p>
<button id="start">{% trans "Get FranceConnect data" %}</button>
</p>
<p>
<label for="dgfip">{% trans "Get DGFIP data" %}</label>
<input type="checkbox" id="dgfip"/>
</p>
<script>
function popupwindow(url, title, w, h) {
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
return window.open(
url, title,
'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}
var popup = null;
<h1>{% trans "Demo view" %}</h1>
<p>
<button id="start">{% trans "Get FranceConnect data" %}</button>
</p>
<p>
<label for="dgfip">{% trans "Get DGFIP data" %}</label>
<input type="checkbox" id="dgfip"/>
</p>
<script>
function popupwindow(url, title, w, h) {
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
return window.open(
url, title,
'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}
var popup = null;
$('#start').on('click', function () {
$('#user-info').hide();
if (popup) { popup.close(); popup = null; };
var url = 'init_request?test=1&origin={{ origin }}';
var checkbox = document.getElementById('dgfip');
if (checkbox && checkbox.checked) {
url += '&mode=dgfip';
};
popup = popupwindow(url, 'FranceConnect', 1000, 670);
if (window.focus) {
popup.focus();
}
});
$(window).on('message', function(event) {
var data = event.originalEvent.data;
var origin = event.originalEvent.origin;
if (origin != window.location.origin) {
return;
}
$.getJSON("data_source?id=" + data.id, function(result) {
$('#user-info').show();
$('#user-info-preview').text(JSON.stringify(result, null, 2));
});
popup.close();
});
</script>
<div id="user-info" style="display: none; position: relative;">
<h3>{% trans "Data-source data" %}</h3>
<pre id="user-info-preview" style="background: white; border: 0.2ex solid black; color: black; padding: 1em; width: calc(100% - 5em);"></pre>
</div>
$('#start').on('click', function () {
$('#user-info').hide();
if (popup) { popup.close(); popup = null; };
var url = 'init_request?test=1&origin={{ origin }}';
var checkbox = document.getElementById('dgfip');
if (checkbox && checkbox.checked) {
url += '&mode=dgfip';
};
popup = popupwindow(url, 'FranceConnect', 1000, 670);
if (window.focus) {
popup.focus();
}
});
$(window).on('message', function(event) {
var data = event.originalEvent.data;
var origin = event.originalEvent.origin;
if (origin != window.location.origin) {
return;
}
$.getJSON("data_source?id=" + data.id, function(result) {
$('#user-info').show();
$('#user-info-preview').text(JSON.stringify(result, null, 2));
});
popup.close();
});
</script>
<div id="user-info" style="display: none; position: relative;">
<h3>{% trans "Data-source data" %}</h3>
<pre id="user-info-preview" style="background: white; border: 0.2ex solid black; color: black; padding: 1em; width: calc(100% - 5em);"></pre>
</div>
{% endblock %}

View File

@ -2,7 +2,7 @@
{% load i18n passerelle %}
{% block description %}
{{ block.super }}
{% url "generic-endpoint" connector="franceconnect-data" slug=object.slug endpoint="callback" as callback_url %}
<p>URL de callback pour FranceConnect: <a href="{{ request.scheme }}://{{ request.get_host }}{{ callback_url }}">{{ request.scheme }}://{{ request.get_host }}{{ callback_url }}</a></p>
{{ block.super }}
{% url "generic-endpoint" connector="franceconnect-data" slug=object.slug endpoint="callback" as callback_url %}
<p>URL de callback pour FranceConnect: <a href="{{ request.scheme }}://{{ request.get_host }}{{ callback_url }}">{{ request.scheme }}://{{ request.get_host }}{{ callback_url }}</a></p>
{% endblock %}

View File

@ -2,33 +2,33 @@
{% load i18n passerelle %}
{% block description %}
{{ block.super }}
{{ block.super }}
{% if missing_phpserialize %}
<div class="errors">
<p>{% trans 'Missing runtime dependencies:' %}
{% if missing_phpserialize %}phpserialize{% endif %}
</p>
</div>
{% endif %}
{% 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>
<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' %}
<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 %}

View File

@ -2,149 +2,149 @@
{% load i18n passerelle %}
{% block endpoints %}
<ul class="endpoints">
<ul class="endpoints">
<li class="post-method">
<div class="description"><span class="description--label">{%trans 'Create Demand'%}</span>
<div class="description"><span class="description--label">{%trans 'Create Demand'%}</span>
{% url "generic-endpoint" connector="mdel" slug=object.slug endpoint="create" as create %}
<a class="example-url" href="{{create}}">{{create}}</a></div>
<ul class="params">
<li>ILE-LA PAYLOAD
<div class="body-schemas">
<ul style="font-size:smaller; font-style:oblique">
<li>display_id *</li>
<li>Extra
<ul>
<li>demand_type (ile-la, rco-la, aec-la) *</li>
<li>code_insee *</li>
</ul>
</li>
<li>Fields
<ul>
<li>nom_famille *</li>
<li>nom_usage *</li>
<li>prenoms *</li>
<li>date_naissance *</li>
<li>lieunaiss_localite *</li>
<li>lieunaiss_division_territoriale *</li>
<li>lieunaiss_code_postal *</li>
<li>lieunaiss_pays (iso3a) *</li>
<li>sexe (H/F) *</li>
<li>nationalite (iso3a ie FRA) *</li>
<li>adresse_num_voie *</li>
<li>adresse_type_voie *</li>
<li>adresse_nom_voie </li>
<li>adresse_code_postal *</li>
<li>adresse_localite *</li>
<li>adresse_division_territoriale *</li>
<li>contact_telephone (0650643793)</li>
<li>contact_email (lucas@lucas.org)</li>
<li>inscription_liste_type (p, ce, cm)*</li>
<li>inscription_localite *</li>
<li>inscription_division_territoriale *</li>
<li>insription_code_insee *</li>
<li>inscription_date *</li>
<li>anterieur_situation (prem, cci)</li>
<li>anterieur_consulat (consulat/amabassade)</li>
<li>anterieur_consulat_pays</li>
<li>anterieur_localite</li>
<li>anterieur_division_territoriale</li>
<li>anterieur_ue_localite</li>
<li>anterieur_ue_division_territoriale</li>
<li>anterieur_ue_localite_pays</li>
<li>justificatif_identite</li>
<li>justificatif_domicile</li>
</ul>
</li>
</ul>
</div>
</li>
<li>RCO-LA PAYLOAD</li>
<li>AEC-LA PAYLOAD
<div class="body-schemas">
<ul style="font-size:smaller; font-style:oblique">
<li>display_id</li>
<li>Extra
<ul>
<li>demand_type (aec-la)</li>
<li>code_insee</li>
<li>code_postal</li>
<li>aec_type</li>
<li>aec_type_raw</li>
<li>ville</li>
</ul>
</li>
<li>Fields
<ul>
<li>aec_nature</li>
<li>aec_nature_raw</li>
<li>date_acte</li>
<li>demandeur_adresse_code_postal</li>
<li>demandeur_adresse_batiment</li>
<li>demandeur_adresse_ville</li>
<li>demandeur_adresse_num</li>
<li>demandeur_adresse_pays</li>
<li>demandeur_adresse_pays_raw</li>
<li>demandeur_adresse_voie</li>
<li>demandeur_civilite</li>
<li>demandeur_civilite_raw</li>
<li>demandeur_email</li>
<li>demandeur_nom</li>
<li>demandeur_prenom</li>
<li>demandeur_telephone</li>
<li>nombre_exemplaires</li>
<li>qualite_demandeur</li>
<li>qualite_demandeur_autre</li>
<li>qualite_demandeur_raw</li>
<li>titulaire_civilite *</li>
<li>titulaire_mere_nom</li>
<li>titulaire_mere_prenoms</li>
<li>titulaire_naiss_date</li>
<li>titulaire_naiss_departement</li>
<li>titulaire_naiss_departement_raw</li>
<li>titulaire_naiss_ville</li>
<li>titulaire_naiss_ville_raw</li>
<li>titulaire_nom</li>
<li>titulaire_pere_nom</li>
<li>titulaire_pere_prenoms</li>
<li>titulaire_prenoms</li>
</ul>
</li>
</ul>
</div>
</li>
</ul>
<ul class="params">
<li>ILE-LA PAYLOAD
<div class="body-schemas">
<ul style="font-size:smaller; font-style:oblique">
<li>display_id *</li>
<li>Extra
<ul>
<li>demand_type (ile-la, rco-la, aec-la) *</li>
<li>code_insee *</li>
</ul>
</li>
<li>Fields
<ul>
<li>nom_famille *</li>
<li>nom_usage *</li>
<li>prenoms *</li>
<li>date_naissance *</li>
<li>lieunaiss_localite *</li>
<li>lieunaiss_division_territoriale *</li>
<li>lieunaiss_code_postal *</li>
<li>lieunaiss_pays (iso3a) *</li>
<li>sexe (H/F) *</li>
<li>nationalite (iso3a ie FRA) *</li>
<li>adresse_num_voie *</li>
<li>adresse_type_voie *</li>
<li>adresse_nom_voie </li>
<li>adresse_code_postal *</li>
<li>adresse_localite *</li>
<li>adresse_division_territoriale *</li>
<li>contact_telephone (0650643793)</li>
<li>contact_email (lucas@lucas.org)</li>
<li>inscription_liste_type (p, ce, cm)*</li>
<li>inscription_localite *</li>
<li>inscription_division_territoriale *</li>
<li>insription_code_insee *</li>
<li>inscription_date *</li>
<li>anterieur_situation (prem, cci)</li>
<li>anterieur_consulat (consulat/amabassade)</li>
<li>anterieur_consulat_pays</li>
<li>anterieur_localite</li>
<li>anterieur_division_territoriale</li>
<li>anterieur_ue_localite</li>
<li>anterieur_ue_division_territoriale</li>
<li>anterieur_ue_localite_pays</li>
<li>justificatif_identite</li>
<li>justificatif_domicile</li>
</ul>
</li>
</ul>
</div>
</li>
<li>RCO-LA PAYLOAD</li>
<li>AEC-LA PAYLOAD
<div class="body-schemas">
<ul style="font-size:smaller; font-style:oblique">
<li>display_id</li>
<li>Extra
<ul>
<li>demand_type (aec-la)</li>
<li>code_insee</li>
<li>code_postal</li>
<li>aec_type</li>
<li>aec_type_raw</li>
<li>ville</li>
</ul>
</li>
<li>Fields
<ul>
<li>aec_nature</li>
<li>aec_nature_raw</li>
<li>date_acte</li>
<li>demandeur_adresse_code_postal</li>
<li>demandeur_adresse_batiment</li>
<li>demandeur_adresse_ville</li>
<li>demandeur_adresse_num</li>
<li>demandeur_adresse_pays</li>
<li>demandeur_adresse_pays_raw</li>
<li>demandeur_adresse_voie</li>
<li>demandeur_civilite</li>
<li>demandeur_civilite_raw</li>
<li>demandeur_email</li>
<li>demandeur_nom</li>
<li>demandeur_prenom</li>
<li>demandeur_telephone</li>
<li>nombre_exemplaires</li>
<li>qualite_demandeur</li>
<li>qualite_demandeur_autre</li>
<li>qualite_demandeur_raw</li>
<li>titulaire_civilite *</li>
<li>titulaire_mere_nom</li>
<li>titulaire_mere_prenoms</li>
<li>titulaire_naiss_date</li>
<li>titulaire_naiss_departement</li>
<li>titulaire_naiss_departement_raw</li>
<li>titulaire_naiss_ville</li>
<li>titulaire_naiss_ville_raw</li>
<li>titulaire_nom</li>
<li>titulaire_pere_nom</li>
<li>titulaire_pere_prenoms</li>
<li>titulaire_prenoms</li>
</ul>
</li>
</ul>
</div>
</li>
</ul>
</li>
<li class="get-method">
<div class="description"><span class="description--label">{%trans 'Get Demand Status'%}</span>
<div class="description"><span class="description--label">{%trans 'Get Demand Status'%}</span>
{% url "generic-endpoint" connector="mdel" slug=object.slug endpoint="status" as get_status %}
<a class="example-url" href="{{get_status}}?demand_id=1-14-ILE-LA">{{get_status}}?demand_id=1-14-ILE-LA</a></div>
<div>
<div>
<samp>
{
"data": {
"closed": True,
"status": "accepted",
"comment": "Dossier traité"
},
"err": 0
}
{
"data": {
"closed": True,
"status": "accepted",
"comment": "Dossier traité"
},
"err": 0
}
</samp>
</div>
</div>
</li>
</ul>
<h4>{%trans 'Data Sources'%}</h4>
<ul class="endpoints">
</ul>
<h4>{%trans 'Data Sources'%}</h4>
<ul class="endpoints">
<li class="get-method">
{% url "generic-endpoint" connector="mdel" slug=object.slug endpoint="applicants" as get_applicants %}
{% url "generic-endpoint" connector="mdel" slug=object.slug endpoint="applicants" as get_applicants %}
<a class="exaple-url" href="{{get_applicants}}?without=PersonneConcernee,Representant">{{get_applicants}}?without=PersonneConcernee,Representant</a>
</li>
<li class="get-method">
{% url "generic-endpoint" connector="mdel" slug=object.slug endpoint="certificates" as get_certificates %}
<a class="example-url" href="{{get_certificates}}">{{get_certificates}}</a>
{% url "generic-endpoint" connector="mdel" slug=object.slug endpoint="certificates" as get_certificates %}
<a class="example-url" href="{{get_certificates}}">{{get_certificates}}</a>
</li>
<li class="get-method">
{% url "generic-endpoint" connector="mdel" slug=object.slug endpoint="certificate-types" as get_certificates_type %}
<a class="example-url" href="{{get_certificates_type}}">{{get_certificates_type}}</a>
{% url "generic-endpoint" connector="mdel" slug=object.slug endpoint="certificate-types" as get_certificates_type %}
<a class="example-url" href="{{get_certificates_type}}">{{get_certificates_type}}</a>
</li>
</ul>
</ul>
{% endblock %}

View File

@ -2,99 +2,99 @@
{% load i18n passerelle %}
{% block description %}
<p>
{% blocktrans %}
This API provides an access to <a href="https://www.okina.fr/">Okina</a> API.
{% endblocktrans %}
<ul>
<li>{% trans "Service URL:" %} {{ object.service_url }}</li>
</ul>
</p>
<p>
{% blocktrans %}
This API provides an access to <a href="https://www.okina.fr/">Okina</a> API.
{% endblocktrans %}
<ul>
<li>{% trans "Service URL:" %} {{ object.service_url }}</li>
</ul>
</p>
{% endblock %}
{% block endpoints %}
<h4>{% trans 'General' %}</h4>
<ul class="endpoints">
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Cities:' %}</span> <a class="example-url" href="cities/"
>{{ site_base_uri }}{{ object.get_absolute_url }}cities</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Classes:' %}</span><a class="example-url" href="classes/"
>{{ site_base_uri }}{{ object.get_absolute_url }}classes</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Institutions:' %}</span>
<a class="example-url" href="institutions/"
>{{ site_base_uri }}{{ object.get_absolute_url }}institutions</a></div></li>
</ul>
<h4>{% trans 'General' %}</h4>
<ul class="endpoints">
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Cities:' %}</span> <a class="example-url" href="cities/"
>{{ site_base_uri }}{{ object.get_absolute_url }}cities</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Classes:' %}</span><a class="example-url" href="classes/"
>{{ site_base_uri }}{{ object.get_absolute_url }}classes</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Institutions:' %}</span>
<a class="example-url" href="institutions/"
>{{ site_base_uri }}{{ object.get_absolute_url }}institutions</a></div></li>
</ul>
<h4>{% trans 'Journeys' %}</h4>
<ul class="endpoints">
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Get stop points based on a starting position and an arrival institution (API 2020)' %}</span>
<a class="example-url" href="search?lat=46.828652&lon=1.701463&institution=277"
>{{ site_base_uri }}{{ object.get_absolute_url }}search?lat=...&lon=...&institution=<i>institution_id</i></a></div></li>
<h4>{% trans 'Journeys' %}</h4>
<ul class="endpoints">
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Get stop points based on a starting position and an arrival institution (API 2020)' %}</span>
<a class="example-url" href="search?lat=46.828652&lon=1.701463&institution=277"
>{{ site_base_uri }}{{ object.get_absolute_url }}search?lat=...&lon=...&institution=<i>institution_id</i></a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Institutions in a city (API 2020)' %}</span>
<a class="example-url" href="institutions?insee=36005"
>{{ site_base_uri }}{{ object.get_absolute_url }}institutions?insee=<i>city-insee-code</i></a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Institutions in a city (API 2020)' %}</span>
<a class="example-url" href="institutions?insee=36005"
>{{ site_base_uri }}{{ object.get_absolute_url }}institutions?insee=<i>city-insee-code</i></a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Institutions accessible from a city:' %}</span>
<a class="example-url" href="institutions/from-city/36005/"
>{{ site_base_uri }}{{ object.get_absolute_url }}institutions/from-city/<i>city-insee-code</i>/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Institutions accessible from a city:' %}</span>
<a class="example-url" href="institutions/from-city/36005/"
>{{ site_base_uri }}{{ object.get_absolute_url }}institutions/from-city/<i>city-insee-code</i>/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Stop areas from a city to an institution:' %}</span>
<a class="example-url" href="stop-areas/from-city/36005/to-institution/276/"
>{{ site_base_uri }}{{ object.get_absolute_url }}stop-areas/from-city/<i>city-insee-code</i>/to-institution/<i>institution_id</i>/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Stop areas from a city to an institution:' %}</span>
<a class="example-url" href="stop-areas/from-city/36005/to-institution/276/"
>{{ site_base_uri }}{{ object.get_absolute_url }}stop-areas/from-city/<i>city-insee-code</i>/to-institution/<i>institution_id</i>/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Origin/Destinations:' %}</span><a class="example-url" href="origin-destinations/"
>{{ site_base_uri }}{{ object.get_absolute_url }}origin-destinations</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Origin/Destinations to an institution:' %}</span>
<a class="example-url" href="origin-destinations/to-institution/276/"
>{{ site_base_uri }}{{ object.get_absolute_url }}origin-destinations/to-institution/<i>institution_id</i>/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Origin/Destinations from a stop area to an institution:' %}</span>
<a class="example-url" href="origin-destinations/from-stop-area/3282/to-institution/276/"
>{{ site_base_uri }}{{ object.get_absolute_url }}origin-destinations/from-stop-area/<i>stop_area_id</i>/to-institution/<i>institution_id</i>/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Origin/Destinations from a city to an institution:' %}</span>
<a class="example-url" href="origin-destinations/from-city/36005/to-institution/276/"
>{{ site_base_uri }}{{ object.get_absolute_url }}origin-destinations/from-city/<i>city_insee_code</i>/to-institution/<i>institution_id</i></a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Origin/Destinations from a city:' %}</span>
<a class="example-url" href="origin-destinations/from-city/36005/"
>{{ site_base_uri }}{{ object.get_absolute_url }}origin-destinations/from-city/<i>city_insee_code</i>/</a></div></li>
</ul>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Origin/Destinations:' %}</span><a class="example-url" href="origin-destinations/"
>{{ site_base_uri }}{{ object.get_absolute_url }}origin-destinations</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Origin/Destinations to an institution:' %}</span>
<a class="example-url" href="origin-destinations/to-institution/276/"
>{{ site_base_uri }}{{ object.get_absolute_url }}origin-destinations/to-institution/<i>institution_id</i>/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Origin/Destinations from a stop area to an institution:' %}</span>
<a class="example-url" href="origin-destinations/from-stop-area/3282/to-institution/276/"
>{{ site_base_uri }}{{ object.get_absolute_url }}origin-destinations/from-stop-area/<i>stop_area_id</i>/to-institution/<i>institution_id</i>/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Origin/Destinations from a city to an institution:' %}</span>
<a class="example-url" href="origin-destinations/from-city/36005/to-institution/276/"
>{{ site_base_uri }}{{ object.get_absolute_url }}origin-destinations/from-city/<i>city_insee_code</i>/to-institution/<i>institution_id</i></a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Origin/Destinations from a city:' %}</span>
<a class="example-url" href="origin-destinations/from-city/36005/"
>{{ site_base_uri }}{{ object.get_absolute_url }}origin-destinations/from-city/<i>city_insee_code</i>/</a></div></li>
</ul>
<h4>{% trans 'Subscriptions' %}</h4>
<ul class="endpoints">
<li class="post-method"><div class="description"><span class="description--label">{% trans 'Create a subscriber:' %}</span>
<a class="example-url" href="subscriber/"
>{{ site_base_uri }}{{ object.get_absolute_url }}subscriber/</a></div>
<div class="body-schemas">{% trans 'Same payload as for the Okina POST /b2b/subscribers endpoint' %}</div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Informations about a subscriber:' %}</span>
<a class="example-url" href="subscriber/284/"
>{{ site_base_uri }}{{ object.get_absolute_url }}subscriber/<i>id</i>/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans "Get subscriber's QR Code:" %}</span>
<a class="example-url" href="subscriber/284/qrcode/"
>{{ site_base_uri }}{{ object.get_absolute_url }}subscriber/<i>id</i>/qrcode/</a></div></li>
<li class="post-method"><div class="description"><span class="description--label">{% trans 'Create a subscription:' %}</span>
<a class="example-url" href="subscription/"
>{{ site_base_uri }}{{ object.get_absolute_url }}subscription/</a></div>
<div class="body-schemas">{% trans 'Same payload as for the Okina POST /b2b/subscriptions endpoint' %}</div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Informations about a subscription:' %}</span>
<a class="example-url" href="subscription/283/"
>{{ site_base_uri }}{{ object.get_absolute_url }}subscription/<i>id</i>/</a></div></li>
</ul>
<h4>{% trans 'Subscriptions' %}</h4>
<ul class="endpoints">
<li class="post-method"><div class="description"><span class="description--label">{% trans 'Create a subscriber:' %}</span>
<a class="example-url" href="subscriber/"
>{{ site_base_uri }}{{ object.get_absolute_url }}subscriber/</a></div>
<div class="body-schemas">{% trans 'Same payload as for the Okina POST /b2b/subscribers endpoint' %}</div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Informations about a subscriber:' %}</span>
<a class="example-url" href="subscriber/284/"
>{{ site_base_uri }}{{ object.get_absolute_url }}subscriber/<i>id</i>/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans "Get subscriber's QR Code:" %}</span>
<a class="example-url" href="subscriber/284/qrcode/"
>{{ site_base_uri }}{{ object.get_absolute_url }}subscriber/<i>id</i>/qrcode/</a></div></li>
<li class="post-method"><div class="description"><span class="description--label">{% trans 'Create a subscription:' %}</span>
<a class="example-url" href="subscription/"
>{{ site_base_uri }}{{ object.get_absolute_url }}subscription/</a></div>
<div class="body-schemas">{% trans 'Same payload as for the Okina POST /b2b/subscriptions endpoint' %}</div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Informations about a subscription:' %}</span>
<a class="example-url" href="subscription/283/"
>{{ site_base_uri }}{{ object.get_absolute_url }}subscription/<i>id</i>/</a></div></li>
</ul>
<h4>{% trans 'Topology' %}</h4>
<ul class="endpoints">
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Lines:' %}</span><a class="example-url" href="topology/lines/"
>{{ site_base_uri }}{{ object.get_absolute_url }}topology/lines/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Networks:' %}</span><a class="example-url" href="topology/networks/"
>{{ site_base_uri }}{{ object.get_absolute_url }}topology/networks/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Vehicle journeys:' %}</span><a class="example-url" href="topology/vehicle-journeys/"
>{{ site_base_uri }}{{ object.get_absolute_url }}topology/vehicle-journeys/</a></div></li>
</ul>
<h4>{% trans 'Topology' %}</h4>
<ul class="endpoints">
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Lines:' %}</span><a class="example-url" href="topology/lines/"
>{{ site_base_uri }}{{ object.get_absolute_url }}topology/lines/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Networks:' %}</span><a class="example-url" href="topology/networks/"
>{{ site_base_uri }}{{ object.get_absolute_url }}topology/networks/</a></div></li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Vehicle journeys:' %}</span><a class="example-url" href="topology/vehicle-journeys/"
>{{ site_base_uri }}{{ object.get_absolute_url }}topology/vehicle-journeys/</a></div></li>
</ul>
{% endblock %}
{% block security %}
<p>
{% trans 'Access to subscription endpoints is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_access' %}
<p>
{% trans 'Access to subscription endpoints is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_access' %}
{% endblock %}

View File

@ -2,47 +2,47 @@
{% load i18n gadjo %}
{% block form %}
{{ block.super }}
<h3>{% trans "Computed properties" %}</h3>
{{ formset.management_form }}
<table id="computed-property-forms">
<thead>
<tr>
{% for field in formset.0 %}
<th class="column-{{ field.name }}{% if field.required %} required{% endif %}">{{ field.label }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for sub_form in formset %}
<tr class='computed-property-form'>
{% for field in sub_form %}
<td class="field-{{ field.name }}">
{{ field.errors.as_ul }}
{{ field }}
</td>
{% endfor %}
</tr>
{{ block.super }}
<h3>{% trans "Computed properties" %}</h3>
{{ formset.management_form }}
<table id="computed-property-forms">
<thead>
<tr>
{% for field in formset.0 %}
<th class="column-{{ field.name }}{% if field.required %} required{% endif %}">{{ field.label }}</th>
{% endfor %}
</tbody>
</table>
<button id="add-computed-property-form" type="button">{% trans "Add another computed property" %}</button>
{% if object.pk %}
</tr>
</thead>
<tbody>
{% for sub_form in formset %}
<tr class='computed-property-form'>
{% for field in sub_form %}
<td class="field-{{ field.name }}">
{{ field.errors.as_ul }}
{{ field }}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
<button id="add-computed-property-form" type="button">{% trans "Add another computed property" %}</button>
{% if object.pk %}
<script
id="indexing-template-script"
data-url="{% url 'opengis-query-test-indexing-template' slug=object.resource.slug pk=object.pk %}"
>
$('button#test-indexing-template').click(function (e) {
$('div.template-result').show();
$.ajax({
url : $('#indexing-template-script').data('url'),
data: {'template': $('#id_indexing_template').val()},
type: 'GET',
success: function(data) {
$('span.template-result').html(data['data'].join(', '));
}
});
>
$('button#test-indexing-template').click(function (e) {
$('div.template-result').show();
$.ajax({
url : $('#indexing-template-script').data('url'),
data: {'template': $('#id_indexing_template').val()},
type: 'GET',
success: function(data) {
$('span.template-result').html(data['data'].join(', '));
}
});
});
</script>
{% endif %}
{% endif %}
{% endblock %}

View File

@ -1,7 +1,7 @@
{% load i18n %}
<textarea name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>
{% if widget.value %}{{ widget.value }}{% endif %}</textarea>
{% if widget.value %}{{ widget.value }}{% endif %}</textarea>
<div class="hint">{% trans 'Template used to generate contents used in fulltext search.' %}</div>
<button id="test-indexing-template" type="button">{% trans "Test template" %}</button>
<div class="template-result" style="display: none;">{% trans "Template result preview (first items only):" %} <span class="template-result">{% trans "loading" %}...</span></div>

View File

@ -2,21 +2,21 @@
{% load i18n %}
{% block content %}
<p>{% trans "Hi," %}</p>
<p>{% trans "Hi," %}</p>
<p>
{% blocktrans trimmed with name=connector.title credit_left=connector.credit_left %}
There are only {{ credit_left }} credits left for connector {{ name }}.
{% endblocktrans %}
</p>
<p>
{% blocktrans trimmed with name=connector.title credit_left=connector.credit_left %}
There are only {{ credit_left }} credits left for connector {{ name }}.
{% endblocktrans %}
</p>
<p>
{% blocktrans trimmed with account=connector.account %}
Please add more credit as soon as possible for OVH account {{ account }}.
{% endblocktrans %}
</p>
<p>
{% blocktrans trimmed with account=connector.account %}
Please add more credit as soon as possible for OVH account {{ account }}.
{% endblocktrans %}
</p>
{% with _("View connector page") as button_label %}
{% include "emails/button-link.html" with url=connector_url label=button_label %}
{% endwith %}
{% with _("View connector page") as button_label %}
{% include "emails/button-link.html" with url=connector_url label=button_label %}
{% endwith %}
{% endblock %}

View File

@ -2,19 +2,19 @@
{% load i18n passerelle %}
{% block description %}
{% if object.uses_new_api and not object.consumer_key %}
<div class="warningnotice">{% trans "Connector is not operational yet, as access needs to be obtained from OVH for the specified account." %}
<a href="{% url "ovh-request-token" slug=object.slug %}">{% trans "Click here to request access." %}</a>
</div>
{% endif %}
{% if object.uses_new_api and not object.consumer_key %}
<div class="warningnotice">{% trans "Connector is not operational yet, as access needs to be obtained from OVH for the specified account." %}
<a href="{% url "ovh-request-token" slug=object.slug %}">{% trans "Click here to request access." %}</a>
</div>
{% endif %}
{% if object.uses_new_api and object.consumer_key and not object.credit_left %}
<div class="pk-error"><p>{% trans "There is no credit left." %}</p></div>
{% endif %}
{% if object.uses_new_api and object.consumer_key and not object.credit_left %}
<div class="pk-error"><p>{% trans "There is no credit left." %}</p></div>
{% endif %}
{{ block.super }}
{{ block.super }}
{% if object.uses_new_api and object.consumer_key %}
<p>{% trans "Credit left:" %} {{ object.credit_left }}</p>
{% endif %}
{% if object.uses_new_api and object.consumer_key %}
<p>{% trans "Credit left:" %} {{ object.credit_left }}</p>
{% endif %}
{% endblock %}

View File

@ -3,9 +3,9 @@
<head>
<meta charset="utf-8"/>
<script type="text/javascript">
function open_tab() {
window.open("{{ redirect_url|escapejs }}");
}
function open_tab() {
window.open("{{ redirect_url|escapejs }}");
}
</script>
</head>
<body onload="open_tab()">

View File

@ -7,11 +7,11 @@
{% block content %}
<dl>
{% for o in object_list %}
<dt><a href="{{ o.slug }}/">{{ o.title }}</a></dt>
<dd>{{ o.description }}</dd>
{% endfor %}
</dl>
<dl>
{% for o in object_list %}
<dt><a href="{{ o.slug }}/">{{ o.title }}</a></dt>
<dd>{{ o.description }}</dd>
{% endfor %}
</dl>
{% endblock %}

View File

@ -7,26 +7,26 @@
{% block content %}
<p>
{{ object.description }}
</p>
<p>
{{ object.description }}
</p>
<ul>
{% block link_json %}
<li><abbr title="JavaScript Object Notation">JSON</abbr>: <a href="json">{{ absolute_uri }}json</a></li>
{% endblock %}
{% block link_jsonp %}
<li><abbr title="JSON with Padding">JSONP</abbr>: <a href="jsonp">{{ absolute_uri }}jsonp</a></li>
{% endblock %}
{% block links %}
{% endblock %}
</ul>
<ul>
{% block link_json %}
<li><abbr title="JavaScript Object Notation">JSON</abbr>: <a href="json">{{ absolute_uri }}json</a></li>
{% endblock %}
{% block link_jsonp %}
<li><abbr title="JSON with Padding">JSONP</abbr>: <a href="jsonp">{{ absolute_uri }}jsonp</a></li>
{% endblock %}
{% block links %}
{% endblock %}
</ul>
{% if sample %}
<h3>{% trans 'Sample' %}</h3>
<pre class="sample">{{ sample }}</pre>
{% endif %}
{% if sample %}
<h3>{% trans 'Sample' %}</h3>
<pre class="sample">{{ sample }}</pre>
{% endif %}
{% block example %}{% endblock %}
{% block example %}{% endblock %}
{% endblock %}

View File

@ -7,26 +7,26 @@
{% block content %}
<p>
{{ object.description }}
</p>
<p>
{{ object.description }}
</p>
<ul>
{% block link_json %}
<li><abbr title="JavaScript Object Notation">JSON</abbr>: <a href="json">{{ absolute_uri }}json</a></li>
{% endblock %}
{% block link_jsonp %}
<li><abbr title="JSON with Padding">JSONP</abbr>: <a href="jsonp">{{ absolute_uri }}jsonp</a></li>
{% endblock %}
{% block links %}
{% endblock %}
</ul>
<ul>
{% block link_json %}
<li><abbr title="JavaScript Object Notation">JSON</abbr>: <a href="json">{{ absolute_uri }}json</a></li>
{% endblock %}
{% block link_jsonp %}
<li><abbr title="JSON with Padding">JSONP</abbr>: <a href="jsonp">{{ absolute_uri }}jsonp</a></li>
{% endblock %}
{% block links %}
{% endblock %}
</ul>
{% if sample %}
<h3>{% trans 'Sample' %}</h3>
<pre class="sample">{{ sample }}</pre>
{% endif %}
{% if sample %}
<h3>{% trans 'Sample' %}</h3>
<pre class="sample">{{ sample }}</pre>
{% endif %}
{% block example %}{% endblock %}
{% block example %}{% endblock %}
{% endblock %}

View File

@ -1,18 +1,18 @@
{% load i18n %}
<div class="sftp-widget">
<div class="sftp-widget-url">
<div class="sftp-widget-url">
<label for="{{ widget.subwidgets.0.attrs.id }}">{% trans "URL" %}</label>
{% include widget.subwidgets.0.template_name with widget=widget.subwidgets.0 %}
</div>
<div class="sftp-widget-private-key">
</div>
<div class="sftp-widget-private-key">
<label for="{{ widget.subwidgets.1.attrs.id }}">{% trans "SSH private key" %}</label>
{% include widget.subwidgets.1.template_name with widget=widget.subwidgets.1 %}
</div>
<div class="sftp-widget-private-key-text">
</div>
<div class="sftp-widget-private-key-text">
{% include widget.subwidgets.2.template_name with widget=widget.subwidgets.2 %}
</div>
<div class="sftp-widget-private-key-password">
</div>
<div class="sftp-widget-private-key-password">
<label for="{{ widget.subwidgets.3.attrs.id }}">{% trans "SSH private key password" %}</label>
{% include widget.subwidgets.3.template_name with widget=widget.subwidgets.3 %}
</div>
</div>
</div>

View File

@ -5,72 +5,72 @@
{% endblock %}
{% block endpoints %}
<ul>
<li>{% trans 'Dump database (debug):' %} <a href="{% url 'fake-family-dump' slug=object.slug %}"
>{{ site_base_uri }}{% url 'fake-family-dump' slug=object.slug %}</a></li>
<li>{% trans 'Link NameID with an adult:' %} <a href="{% url 'fake-family-link' slug=object.slug %}"
>{{ site_base_uri }}{% url 'fake-family-link' slug=object.slug %}?NameID=...&login=...&password=...</a></li>
<li>{% trans 'Unlink NameID:' %} <a href="{% url 'fake-family-unlink' slug=object.slug %}"
>{{ site_base_uri }}{% url 'fake-family-unlink' slug=object.slug %}?NameID=...</a></li>
<li>{% trans 'Get all family informations:' %} <a href="{% url 'fake-family-info' slug=object.slug %}"
>{{ site_base_uri }}{% url 'fake-family-info' slug=object.slug %}?NameID=...</a></li>
<li>{% trans 'Get family list of items:' %} <a href="{% url 'fake-family-key' slug=object.slug key='key' %}"
>{{ site_base_uri }}{% url 'fake-family-key' slug=object.slug key='key' %}?NameID=...</a></li>
<em>key</em> = <em>adults</em>, <em>children</em>, …
</ul>
<ul>
<li>{% trans 'Dump database (debug):' %} <a href="{% url 'fake-family-dump' slug=object.slug %}"
>{{ site_base_uri }}{% url 'fake-family-dump' slug=object.slug %}</a></li>
<li>{% trans 'Link NameID with an adult:' %} <a href="{% url 'fake-family-link' slug=object.slug %}"
>{{ site_base_uri }}{% url 'fake-family-link' slug=object.slug %}?NameID=...&login=...&password=...</a></li>
<li>{% trans 'Unlink NameID:' %} <a href="{% url 'fake-family-unlink' slug=object.slug %}"
>{{ site_base_uri }}{% url 'fake-family-unlink' slug=object.slug %}?NameID=...</a></li>
<li>{% trans 'Get all family informations:' %} <a href="{% url 'fake-family-info' slug=object.slug %}"
>{{ site_base_uri }}{% url 'fake-family-info' slug=object.slug %}?NameID=...</a></li>
<li>{% trans 'Get family list of items:' %} <a href="{% url 'fake-family-key' slug=object.slug key='key' %}"
>{{ site_base_uri }}{% url 'fake-family-key' slug=object.slug key='key' %}?NameID=...</a></li>
<em>key</em> = <em>adults</em>, <em>children</em>, …
</ul>
<div>
<h3>{% trans "Contents" %}</h3>
<div>
<h3>{% trans "Contents" %}</h3>
<h4>{% trans "Adults" %}</h4>
<table class="main">
<thead><tr><th>{% trans "id" %}</th><th>{% trans "text" %}</th><th>{% trans "birthdate" %}</th><th>{% trans "keywords" %}</th></tr></thead>
<tbody>
{% for adult in object.jsondatabase.adults.values|dictsort:"id" %}
<tr>
<td>{{ adult.id }}</td><td>{{ adult.text }}</td><td>{{ adult.birthdate }}</td>
<td>{{ adult.keywords|join:'<br />' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h4>{% trans "Adults" %}</h4>
<table class="main">
<thead><tr><th>{% trans "id" %}</th><th>{% trans "text" %}</th><th>{% trans "birthdate" %}</th><th>{% trans "keywords" %}</th></tr></thead>
<tbody>
{% for adult in object.jsondatabase.adults.values|dictsort:"id" %}
<tr>
<td>{{ adult.id }}</td><td>{{ adult.text }}</td><td>{{ adult.birthdate }}</td>
<td>{{ adult.keywords|join:'<br />' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h4>{% trans "Children" %}</h4>
<table class="main">
<thead><tr><th>{% trans "id" %}</th><th>{% trans "text" %}</th><th>{% trans "birthdate" %}</th><th>{% trans "keywords" %}</th></tr></thead>
<tbody>
{% for child in object.jsondatabase.children.values|dictsort:"id" %}
<tr>
<td>{{ child.id }}</td><td>{{ child.text }}</td><td>{{ child.birthdate }}</td>
<td>{{ child.keywords|join:'<br />' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h4>{% trans "Children" %}</h4>
<table class="main">
<thead><tr><th>{% trans "id" %}</th><th>{% trans "text" %}</th><th>{% trans "birthdate" %}</th><th>{% trans "keywords" %}</th></tr></thead>
<tbody>
{% for child in object.jsondatabase.children.values|dictsort:"id" %}
<tr>
<td>{{ child.id }}</td><td>{{ child.text }}</td><td>{{ child.birthdate }}</td>
<td>{{ child.keywords|join:'<br />' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h4>{% trans "Families" %}</h4>
<table class="main">
<thead><tr><th>{% trans "id" %}</th><th>{% trans "adults" %}</th><th>{% trans "children" %}</th>
<th>{% trans "contacts" %}</th><th>{% trans "keywords" %}</th></tr></thead>
<tbody>
{% for family in object.jsondatabase.families.values|dictsort:"id" %}
<tr>
<td>{{ family.id }}</td>
<td>{{ family.adults|join:', ' }}</td>
<td>{{ family.children|join:', ' }}</td>
<td>{{ family.contacts|join:', ' }}</td>
<td>{{ family.keywords|join:'<br />' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<h4>{% trans "Families" %}</h4>
<table class="main">
<thead><tr><th>{% trans "id" %}</th><th>{% trans "adults" %}</th><th>{% trans "children" %}</th>
<th>{% trans "contacts" %}</th><th>{% trans "keywords" %}</th></tr></thead>
<tbody>
{% for family in object.jsondatabase.families.values|dictsort:"id" %}
<tr>
<td>{{ family.id }}</td>
<td>{{ family.adults|join:', ' }}</td>
<td>{{ family.children|join:', ' }}</td>
<td>{{ family.contacts|join:', ' }}</td>
<td>{{ family.keywords|join:'<br />' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
{% block security %}
<p>
{% trans 'Access is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_access' %}
<p>
{% trans 'Access is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_access' %}
{% endblock %}

View File

@ -2,52 +2,52 @@
{% load i18n passerelle %}
{% block description %}
<p>
<p>
{%trans "CSV Columns keyname : "%}
<ul>
<li>Column 0: street_start_number</li>
<li>Column 1: street_end_number</li>
<li>Column 2: </li>
<li>Column 3: </li>
<li>Column 4: street_side </li>
<li>Column 5: </li>
<li>Column 6: </li>
<li>Column 7: </li>
<li>Column 8: code</li>
<li>Column 9: id</li>
<li>Column 10: text</li>
<li>Column 11: address</li>
<li>Column 11: </li>
<li>Column 12: </li>
<li>Column 13: street_name</li>
<li>Column 14: </li>
<li>Column 15: canton </li>
<li>Column 16: </li>
<li>Column 17: </li>
<li>Column 18: </li>
<li>Column 0: street_start_number</li>
<li>Column 1: street_end_number</li>
<li>Column 2: </li>
<li>Column 3: </li>
<li>Column 4: street_side </li>
<li>Column 5: </li>
<li>Column 6: </li>
<li>Column 7: </li>
<li>Column 8: code</li>
<li>Column 9: id</li>
<li>Column 10: text</li>
<li>Column 11: address</li>
<li>Column 11: </li>
<li>Column 12: </li>
<li>Column 13: street_name</li>
<li>Column 14: </li>
<li>Column 15: canton </li>
<li>Column 16: </li>
<li>Column 17: </li>
<li>Column 18: </li>
</ul>
</p>
</p>
{% endblock %}
{% block endpoints %}
<ul class="endpoints">
<ul class="endpoints">
<li class="get-method">
<div class="description"><span class="description--label">{% trans "Request : "%}</span>
<div class="description"><span class="description--label">{% trans "Request : "%}</span>
{% url "generic-endpoint" connector="nancypoll" slug=object.slug endpoint="data" as get_poll %}
<a class="example-url" href="{{get_poll}}?street_no=37&street_name=Marechal Juin">{{get_poll}}?street_no=37&street_name=Marechal Juin</a>
<br />
{% trans "Response : "%}
{% trans "Response : "%}
<samp>{
"data": [{
"text": "GYMNASE BOURGUIGNON",
"canton": "NANCY 3",
"id": "18",
"address": "5 RUE DE TURINAZ"
}]
}
"data": [{
"text": "GYMNASE BOURGUIGNON",
"canton": "NANCY 3",
"id": "18",
"address": "5 RUE DE TURINAZ"
}]
}
</samp>
</div>
</div>
</li>
</ul>
</ul>
{% endblock %}

View File

@ -5,68 +5,68 @@
{% endblock %}
{% block endpoints %}
<ul>
<ul>
<li>
{%url 'solis-apa-integration' slug=object.slug as integration %}
<strong>POST</strong> - {%trans 'Import Demand'%} <a href="{{integration}}">{{site_base_uri}}{{integration}}</a>
{%url 'solis-apa-integration' slug=object.slug as integration %}
<strong>POST</strong> - {%trans 'Import Demand'%} <a href="{{integration}}">{{site_base_uri}}{{integration}}</a>
</li>
<li>
<h4>{%trans 'Referential'%}</h4>
<ul>
<li>
{%url 'solis-apa-communes' slug=object.slug as get_communes %}
<strong>GET</strong> - {%trans 'Communes:' %} <a href="{{get_communes}}">{{ site_base_uri }}{{get_communes}}?q=14600&code_dep=14</a> [?q=query&code_dep=code_dep]
</li>
<li>
{%url 'solis-apa-lieux' slug=object.slug as get_lieux %}
<strong>GET</strong> - {%trans 'Lieux:' %} <a href="{{get_lieux}}">{{ site_base_uri }}{{get_lieux}}?commune=commune-14-753&q=LES</a> [?commune=code_commune&q=query]
</li>
<li>
{%url 'solis-apa-homonymes' slug=object.slug as get_homonymes %}
<strong>GET</strong> - {%trans 'Homonymes:' %} <a href="{{get_homonymes}}">{{ site_base_uri }}{{get_homonymes}}?nom=dupont&prenom=thomas</a> [?nom=nom&prenom=prenom&dn=dn]
</li>
<h4>{%trans 'Referential'%}</h4>
<ul>
<li>
{%url 'solis-apa-communes' slug=object.slug as get_communes %}
<strong>GET</strong> - {%trans 'Communes:' %} <a href="{{get_communes}}">{{ site_base_uri }}{{get_communes}}?q=14600&code_dep=14</a> [?q=query&code_dep=code_dep]
</li>
<li>
{%url 'solis-apa-lieux' slug=object.slug as get_lieux %}
<strong>GET</strong> - {%trans 'Lieux:' %} <a href="{{get_lieux}}">{{ site_base_uri }}{{get_lieux}}?commune=commune-14-753&q=LES</a> [?commune=code_commune&q=query]
</li>
<li>
{%url 'solis-apa-homonymes' slug=object.slug as get_homonymes %}
<strong>GET</strong> - {%trans 'Homonymes:' %} <a href="{{get_homonymes}}">{{ site_base_uri }}{{get_homonymes}}?nom=dupont&prenom=thomas</a> [?nom=nom&prenom=prenom&dn=dn]
</li>
<li>
{%url 'solis-apa-referential' slug=object.slug reference_name='caisse-de-retraite' as get_caisse_retraite%}
<strong>GET</strong> - {%trans 'Caisses de retraite'%} <a href="{{get_caisse_retraite}}"> {{site_base_uri}}{{get_caisse_retraite}}</a>
</li>
<li>
{%url 'solis-apa-referential' reference_name='organisme-de-tutelle' slug=object.slug as get_organisme_tutelle%}
<strong>GET</strong> - {%trans 'Organimes de tutelle'%} <a href="{{get_organisme_tutelle}}"> {{site_base_uri}}{{get_organisme_tutelle}}</a>
</li>
<li>
{%url 'solis-apa-referential' reference_name='etablissement-asg' slug=object.slug as get_etablissement%}
<strong>GET</strong> - {%trans 'Etablissement'%} <a href="{{get_etablissement}}"> {{site_base_uri}}{{get_etablissement}}</a>
</li>
</ul>
<li>
{%url 'solis-apa-referential' slug=object.slug reference_name='caisse-de-retraite' as get_caisse_retraite%}
<strong>GET</strong> - {%trans 'Caisses de retraite'%} <a href="{{get_caisse_retraite}}"> {{site_base_uri}}{{get_caisse_retraite}}</a>
</li>
<li>
{%url 'solis-apa-referential' reference_name='organisme-de-tutelle' slug=object.slug as get_organisme_tutelle%}
<strong>GET</strong> - {%trans 'Organimes de tutelle'%} <a href="{{get_organisme_tutelle}}"> {{site_base_uri}}{{get_organisme_tutelle}}</a>
</li>
<li>
{%url 'solis-apa-referential' reference_name='etablissement-asg' slug=object.slug as get_etablissement%}
<strong>GET</strong> - {%trans 'Etablissement'%} <a href="{{get_etablissement}}"> {{site_base_uri}}{{get_etablissement}}</a>
</li>
</ul>
</li>
<li>
<h4>{%trans 'Suivi' %} </h4>
<ul>
<li>
{%url 'solis-apa-suivi' suivi_type='visite' slug=object.slug as suivi_visite%}
<strong>GET</strong> - {%trans 'Visite'%} <a href="{{suivi_visite}}">{{site_base_uri}}{{suivi_visite}}</a> [?datedebut=2015-11-04&datefin=2016-10-29]
</li>
<li>
{%url 'solis-apa-suivi' suivi_type='plan-aide' slug=object.slug as suivi_plan_aide%}
<strong>GET</strong> - {%trans 'Plan d aide '%} <a href="{{suivi_plan_aide}}">{{site_base_uri}}{{suivi_plan_aide}}</a> [?datedebut=2015-11-04&datefin=2016-10-29]
</li>
<li>
{%url 'solis-apa-suivi' suivi_type='presentation-commission' slug=object.slug as suivi_presentation_commission%}
<strong>GET</strong> - {%trans 'Presentation Commission'%} <a href="{{suivi_presentation_commission}}">{{site_base_uri}}{{suivi_presentation_commission}}</a> [?datedebut=2015-11-04&datefin=2016-10-29]
</li>
<li>
{%url 'solis-apa-suivi' suivi_type='decision-commission' slug=object.slug as suivi_decision_commission%}
<strong>GET</strong> - {%trans 'Decision Commission'%} <a href="{{suivi_decision_commission}}">{{site_base_uri}}{{suivi_decision_commission}}</a> [?datedebut=2015-11-04&datefin=2016-10-29]
</li>
</ul>
<h4>{%trans 'Suivi' %} </h4>
<ul>
<li>
{%url 'solis-apa-suivi' suivi_type='visite' slug=object.slug as suivi_visite%}
<strong>GET</strong> - {%trans 'Visite'%} <a href="{{suivi_visite}}">{{site_base_uri}}{{suivi_visite}}</a> [?datedebut=2015-11-04&datefin=2016-10-29]
</li>
<li>
{%url 'solis-apa-suivi' suivi_type='plan-aide' slug=object.slug as suivi_plan_aide%}
<strong>GET</strong> - {%trans 'Plan d aide '%} <a href="{{suivi_plan_aide}}">{{site_base_uri}}{{suivi_plan_aide}}</a> [?datedebut=2015-11-04&datefin=2016-10-29]
</li>
<li>
{%url 'solis-apa-suivi' suivi_type='presentation-commission' slug=object.slug as suivi_presentation_commission%}
<strong>GET</strong> - {%trans 'Presentation Commission'%} <a href="{{suivi_presentation_commission}}">{{site_base_uri}}{{suivi_presentation_commission}}</a> [?datedebut=2015-11-04&datefin=2016-10-29]
</li>
<li>
{%url 'solis-apa-suivi' suivi_type='decision-commission' slug=object.slug as suivi_decision_commission%}
<strong>GET</strong> - {%trans 'Decision Commission'%} <a href="{{suivi_decision_commission}}">{{site_base_uri}}{{suivi_decision_commission}}</a> [?datedebut=2015-11-04&datefin=2016-10-29]
</li>
</ul>
</li>
</ul>
</ul>
{% endblock %}
{% block security %}
<p>
{% trans 'Access is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_access' %}
<p>
{% trans 'Access is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_access' %}
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n passerelle %}
{% block endpoints %}
<h4>{% trans "Family related" %}</h4>
<ul class="endpoints">
<h4>{% trans "Family related" %}</h4>
<ul class="endpoints">
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="ping" as endpoint_ping %}
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Check WSDL availability:' %}</span> <a class="example-url" href="{{ endpoint_ping }}">{{ endpoint_ping }}</a>[?debug]</div></li>
@ -23,43 +23,43 @@
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Get family adults informations:' %}</span> <a class="example-url" href="{{ endpoint_family }}?NameID">{{ endpoint_family }}?NameID=...</a></div></li>
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="family" rest="children/" as endpoint_family %}
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Get family children informations:' %}</span> <a class="example-url" href="{{ endpoint_family }}?NameID">{{ endpoint_family }}?NameID=...</a></div></li>
</ul>
</ul>
<h4>{% trans "Invoices related" %}</h4>
<ul class="endpoints">
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Get invoice history list:' %}</span>
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/history/" as invoices_history_url %}
<a class="example-url" href="{{ invoices_history_url }}?NameID"> {{ invoices_history_url }}?NameID=...</a>
<em>42</em> {% trans 'is regie identifier' %}
</div>
</li>
<h4>{% trans "Invoices related" %}</h4>
<ul class="endpoints">
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Get invoice history list:' %}</span>
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/history/" as invoices_history_url %}
<a class="example-url" href="{{ invoices_history_url }}?NameID"> {{ invoices_history_url }}?NameID=...</a>
<em>42</em> {% trans 'is regie identifier' %}
</div>
</li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Get invoice list:' %}</span>
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/" as invoices_url %}
<a class="example-url" href="{{ invoices_url }}?NameID"> {{ invoices_url }}?NameID=... </a>
<em>42</em> {% trans 'is regie identifier' %}
</div>
</li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Get invoice list:' %}</span>
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/" as invoices_url %}
<a class="example-url" href="{{ invoices_url }}?NameID"> {{ invoices_url }}?NameID=... </a>
<em>42</em> {% trans 'is regie identifier' %}
</div>
</li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Show invoice details:' %}</span>
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/2345-20150916/" as invoice_details_url %}
<a class="example-url" href="{{ invoice_details_url }}"> {{ site_base_uri }}{{ invoice_details_url }} </a>
<em>42</em> {% trans 'is regie identifier' %},
<em>2345</em> {% trans 'is family identifier' %},
<em>20150916</em> {% trans 'is invoice identifier' %}
</div>
</li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Show invoice details:' %}</span>
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/2345-20150916/" as invoice_details_url %}
<a class="example-url" href="{{ invoice_details_url }}"> {{ site_base_uri }}{{ invoice_details_url }} </a>
<em>42</em> {% trans 'is regie identifier' %},
<em>2345</em> {% trans 'is family identifier' %},
<em>20150916</em> {% trans 'is invoice identifier' %}
</div>
</li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Get invoice pdf:' %}</span>
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/2345-20150916/pdf/" as invoice_download_url %}
<a class="example-url" href="{{ invoice_download_url }}"> {{ site_base_uri }}{{ invoice_download_url }} </a>
</div>
</li>
<li class="get-method"><div class="description"><span class="description--label">{% trans 'Get invoice pdf:' %}</span>
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/2345-20150916/pdf/" as invoice_download_url %}
<a class="example-url" href="{{ invoice_download_url }}"> {{ site_base_uri }}{{ invoice_download_url }} </a>
</div>
</li>
<li class="post-method"><div class="description"><span class="description--label">{% trans 'Pay invoice:' %}</span>
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/2345-20150916/pay/" as payment_url %}
<a class="example-url" href="{{ payment_url }}"> {{ site_base_uri }}{{ payment_url }}?NameID=... </a>
</div>
</li>
</ul>
<li class="post-method"><div class="description"><span class="description--label">{% trans 'Pay invoice:' %}</span>
{% url "generic-endpoint" connector="teamnet-axel" slug=object.slug endpoint="regie" rest="42/invoices/2345-20150916/pay/" as payment_url %}
<a class="example-url" href="{{ payment_url }}"> {{ site_base_uri }}{{ payment_url }}?NameID=... </a>
</div>
</li>
</ul>
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n passerelle %}
{% block description %}
{{ block.super }}
{% trans "Never" as default_updated %}
<p>{% trans "Last update of announces:" %} {{ object.last_update_announces|default:default_updated }}</p>
<p>{% trans "Last update of referentials:" %} {{ object.last_update_referentiels|default:default_updated }}</p>
{{ block.super }}
{% trans "Never" as default_updated %}
<p>{% trans "Last update of announces:" %} {{ object.last_update_announces|default:default_updated }}</p>
<p>{% trans "Last update of referentials:" %} {{ object.last_update_referentiels|default:default_updated }}</p>
{% endblock %}

View File

@ -2,13 +2,13 @@
{% load i18n passerelle %}
{% block extra-tab-buttons %}
<button role="tab" aria-selected="false" aria-controls="panel-details" id="tab-details" tabindex="-1">{% trans "Details" %}</button>
<button role="tab" aria-selected="false" aria-controls="panel-details" id="tab-details" tabindex="-1">{% trans "Details" %}</button>
{% endblock %}
{% block extra-sections %}
<div id="panel-details" role="tabpanel" tabindex="-1" aria-labelledby="tab-details" hidden>
<ul>
<li><a href="{% url "toulouse-smart-type-intervention" slug=object.slug %}">{% trans "Intervention types" %}</a></li>
</ul>
</div>
<div id="panel-details" role="tabpanel" tabindex="-1" aria-labelledby="tab-details" hidden>
<ul>
<li><a href="{% url "toulouse-smart-type-intervention" slug=object.slug %}">{% trans "Intervention types" %}</a></li>
</ul>
</div>
{% endblock %}

View File

@ -2,47 +2,47 @@
{% load i18n gadjo %}
{% block breadcrumb %}
{{ block.super }}
<a href="{{ toulousesmartresource.get_absolute_url }}">{{ toulousesmartresource.title }}</a>
<a href="#">{% trans 'Intervention types' %}</a>
{{ block.super }}
<a href="{{ toulousesmartresource.get_absolute_url }}">{{ toulousesmartresource.title }}</a>
<a href="#">{% trans 'Intervention types' %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'Intervention types' %}</h2>
<span class="actions">
<h2>{% trans 'Intervention types' %}</h2>
<span class="actions">
<a href="{% url "toulouse-smart-type-intervention-as-blocks" slug=toulousesmartresource.slug %}">{% trans "Export to blocks" %}</a>
</span>
</span>
{% endblock %}
{% block content %}
<table class="main">
<table class="main">
<thead>
<tr>
<th>Nom du type d'intervention</th>
<th>Nom</th>
<th>Type</th>
<th>Requis</th>
<th>Valeur par défaut</th>
</tr>
<tr>
<th>Nom du type d'intervention</th>
<th>Nom</th>
<th>Type</th>
<th>Requis</th>
<th>Valeur par défaut</th>
</tr>
</thead>
<tbody>
{% for intervention_type in toulousesmartresource.get_intervention_types %}
{% for intervention_type in toulousesmartresource.get_intervention_types %}
<tr><td colspan="4">{{ intervention_type.order }} - {{ intervention_type.name }}</td></tr>
{% for property in intervention_type.properties %}
<tr>
<td></td>
<td>{{ property.name }}</td>
<td>{{ property.type }}{% if property.type == 'item' %} ({% for value in property.restrictedValues %}{% if not forloop.first %}, {% endif %}«{{ value }}»{% endfor %}){% endif %}</td>
<td title="{{ property.required|lower }}">{{ property.required|yesno:"✔,✘" }}</td>
<td>{{ property.defaultValue }}</td>
</tr>
{% endfor %}
{% for property in intervention_type.properties %}
<tr>
<td></td>
<td>{{ property.name }}</td>
<td>{{ property.type }}{% if property.type == 'item' %} ({% for value in property.restrictedValues %}{% if not forloop.first %}, {% endif %}«{{ value }}»{% endfor %}){% endif %}</td>
<td title="{{ property.required|lower }}">{{ property.required|yesno:"✔,✘" }}</td>
<td>{{ property.defaultValue }}</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</table>
<!--
<!--
{{ toulousesmartresource.get_intervention_types|pprint }}
-->
-->
{% endblock %}

View File

@ -2,17 +2,17 @@
{% load i18n %}
{% block appbar %}
<h2>{% trans "Sending a test SMS" %}</h2>
<h2>{% trans "Sending a test SMS" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button>{% trans "Send SMS" %}</button>
<a class="cancel" href="{% url 'manage-home' %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button>{% trans "Send SMS" %}</button>
<a class="cancel" href="{% url 'manage-home' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,7 +2,7 @@
{% load i18n passerelle %}
{% block actions %}
{% if perms.base.see_accessright %}
<a rel="popup" id="sms-test-send" href="/manage{{ object.get_absolute_url }}test-send/">{% trans 'Send a test message' %}</a>
{% endif %}
{% if perms.base.see_accessright %}
<a rel="popup" id="sms-test-send" href="/manage{{ object.get_absolute_url }}test-send/">{% trans 'Send a test message' %}</a>
{% endif %}
{% endblock %}

View File

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="max-width: 60ex;">
<div class="content">
{% block content %}
{{ content }}
{% endblock %}
<head>
<meta charset="utf-8">
</head>
<body>
<div style="max-width: 60ex;">
<div class="content">
{% block content %}
{{ content }}
{% endblock %}
</div>
</div>
</div>
</body>
</body>
</html>

View File

@ -5,13 +5,13 @@
{% block footer %}Passerelle — Copyright © Entr'ouvert{% endblock %}
{% block extrascripts %}
{{ block.super }}
<script src="{% static "js/passerelle.js" %}"></script>
{{ block.super }}
<script src="{% static "js/passerelle.js" %}"></script>
{% endblock %}
{% block logout-url %}{% url 'auth_logout' %}{% endblock %}
{% block breadcrumb %}
{% if portal_agent_url %}{{ block.super }}{% endif %}
<a href="{% url 'manage-home' %}">{% trans 'Web Services' %}</a>
{% if portal_agent_url %}{{ block.super }}{% endif %}
<a href="{% url 'manage-home' %}">{% trans 'Web Services' %}</a>
{% endblock %}

View File

@ -1,41 +1,41 @@
{% load i18n %}
<table class="main">
<thead>
<tr>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Key Type' %}</th>
<th>{% trans 'IP Restriction' %}</th>
{% if perms.base.delete_accessright %}<th></th>{% endif %}
</tr>
</thead>
<tbody>
{% for object in access_rights_list %}
<tr>
{% if perms.base.change_apiuser %}
<td><a href="{% url 'apiuser-edit' pk=object.apiuser.id %}">{{ object.apiuser.fullname }}</a></td>
{% else %}
<td>{{ object.apiuser.fullname }}</td>
{% endif %}
<td>{% if object.apiuser.keytype %}{{ object.apiuser.keytype }}{% else %} - {% endif %}</td>
<td>{% if object.apiuser.ipsource %}{{ object.apiuser.ipsource }}{% else %} - {% endif %}</td>
{% if perms.base.delete_accessright %}
<td><a rel="popup" class="icon-remove-sign" href="{% url 'access-right-remove' pk=object.id %}"></a></td>
{% endif %}
</tr>
{% endfor %}
{% for trusted_service in trusted_services %}
<tr>
<td>{{ trusted_service.title }} ({{ trusted_service.verif_orig }})</td>
<td>SIGN</td>
<td> - </td>
{% if perms.base.delete_accessright %}<td><em>{% trans 'trusted service' %}</em></td>{% endif %}
</tr>
{% endfor %}
</tbody>
<thead>
<tr>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Key Type' %}</th>
<th>{% trans 'IP Restriction' %}</th>
{% if perms.base.delete_accessright %}<th></th>{% endif %}
</tr>
</thead>
<tbody>
{% for object in access_rights_list %}
<tr>
{% if perms.base.change_apiuser %}
<td><a href="{% url 'apiuser-edit' pk=object.apiuser.id %}">{{ object.apiuser.fullname }}</a></td>
{% else %}
<td>{{ object.apiuser.fullname }}</td>
{% endif %}
<td>{% if object.apiuser.keytype %}{{ object.apiuser.keytype }}{% else %} - {% endif %}</td>
<td>{% if object.apiuser.ipsource %}{{ object.apiuser.ipsource }}{% else %} - {% endif %}</td>
{% if perms.base.delete_accessright %}
<td><a rel="popup" class="icon-remove-sign" href="{% url 'access-right-remove' pk=object.id %}"></a></td>
{% endif %}
</tr>
{% endfor %}
{% for trusted_service in trusted_services %}
<tr>
<td>{{ trusted_service.title }} ({{ trusted_service.verif_orig }})</td>
<td>SIGN</td>
<td> - </td>
{% if perms.base.delete_accessright %}<td><em>{% trans 'trusted service' %}</em></td>{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% if perms.base.add_accessright %}
<p>
<a rel="popup" class="icon-plus button" href="{% url 'access-right-add' resource_type=resource_type resource_pk=resource_pk codename=permission %}">{% trans 'Add' %}</a>
</p>
<p>
<a rel="popup" class="icon-plus button" href="{% url 'access-right-add' resource_type=resource_type resource_pk=resource_pk codename=permission %}">{% trans 'Add' %}</a>
</p>
{% endif %}

View File

@ -2,29 +2,29 @@
{% load tz %}
{% if jobs %}
<table class="main" data-job-base-url="{% url 'view-jobs-connector' connector=object.get_connector_slug slug=object.slug %}" >
<table class="main" data-job-base-url="{% url 'view-jobs-connector' connector=object.get_connector_slug slug=object.slug %}" >
<thead>
<th>{% trans 'Creation Timestamp' %}</th>
<th>{% trans 'Update Timestamp' %}</th>
<th>{% trans 'Done Timestamp' %}</th>
<th>{% trans 'Type' %}</th>
<th>{% trans 'Status' %}</th>
<th>{% trans 'Creation Timestamp' %}</th>
<th>{% trans 'Update Timestamp' %}</th>
<th>{% trans 'Done Timestamp' %}</th>
<th>{% trans 'Type' %}</th>
<th>{% trans 'Status' %}</th>
</thead>
<tbody>
{% for job in jobs %}
<tr data-pk="{{ job.pk }}" {% if job.status == 'failed' %}class="error"{% endif %}>
<td class="timestamp">{{ job.creation_timestamp|localtime }}</td>
<td class="timestamp">{{ job.update_timestamp|localtime }}</td>
<td class="timestamp">{{ job.done_timestamp|localtime }}</td>
<td>{{ job.method_name }}</td>
<td class="message">{{ job.get_status_display }}</td>
</tr>
{% endfor %}
{% for job in jobs %}
<tr data-pk="{{ job.pk }}" {% if job.status == 'failed' %}class="error"{% endif %}>
<td class="timestamp">{{ job.creation_timestamp|localtime }}</td>
<td class="timestamp">{{ job.update_timestamp|localtime }}</td>
<td class="timestamp">{{ job.done_timestamp|localtime }}</td>
<td>{{ job.method_name }}</td>
<td class="message">{{ job.get_status_display }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</table>
{% with page_obj=jobs %}
{% include "gadjo/pagination.html" with anchor="#jobs" without_key="job_id" %}
{% endwith %}
{% with page_obj=jobs %}
{% include "gadjo/pagination.html" with anchor="#jobs" without_key="job_id" %}
{% endwith %}
{% endif %}

View File

@ -1,52 +1,52 @@
{% load i18n passerelle tz gadjo %}
{% if logrecords %}
<table class="main" id="table-logs" data-log-base-url="{% url 'view-logs-connector' connector=object.get_connector_slug slug=object.slug %}" >
<table class="main" id="table-logs" data-log-base-url="{% url 'view-logs-connector' connector=object.get_connector_slug slug=object.slug %}" >
<thead>
<th>{% trans 'Timestamp' %}</th>
<th>{% trans 'Source IP' %}</th>
<th>{% trans 'Message' %}</th>
<th>{% trans 'Timestamp' %}</th>
<th>{% trans 'Source IP' %}</th>
<th>{% trans 'Message' %}</th>
</thead>
<tbody>
{% for record in logrecords %}
<tr class="level-{{record.level}}" data-pk="{{ record.pk }}">
<td class="timestamp">
{{ record.timestamp|localtime|date:'DATE_FORMAT' }}
{{ record.timestamp|localtime|time:"H:i:s" }}
</td>
<td>{{ record.sourceip|default:"-" }}</td>
<td class="message">{{ record.message|censor }}</td>
</tr>
{% endfor %}
{% for record in logrecords %}
<tr class="level-{{record.level}}" data-pk="{{ record.pk }}">
<td class="timestamp">
{{ record.timestamp|localtime|date:'DATE_FORMAT' }}
{{ record.timestamp|localtime|time:"H:i:s" }}
</td>
<td>{{ record.sourceip|default:"-" }}</td>
<td class="message">{{ record.message|censor }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</table>
{% with page_obj=logrecords anchor="#table-logs" without_key="log_id" page_key=page_key|default:"page" %}
{% if page_obj.has_next or page_obj.has_previous %}
{% spaceless %}
<p class="paginator">
{% if page_obj.number > 1 %}
{% if page_obj.previous_page_number != 1 %}
<a href="{% querystring page_key=1 without without_key %}{{ anchor }}">1</a>
{% endif %}
{% with page_obj=logrecords anchor="#table-logs" without_key="log_id" page_key=page_key|default:"page" %}
{% if page_obj.has_next or page_obj.has_previous %}
{% spaceless %}
<p class="paginator">
{% if page_obj.number > 1 %}
{% if page_obj.previous_page_number != 1 %}
<a href="{% querystring page_key=1 without without_key %}{{ anchor }}">1</a>
{% endif %}
{% endif %}
{% if page_obj.has_previous %}
<a href="{% querystring page_key=page_obj.previous_page_number without without_key %}{{ anchor }}">{{ page_obj.previous_page_number }}</a>
{% endif %}
<span class="this-page">{{ page_obj.number }}</span>
{% if page_obj.has_next %}
<a href="{% querystring page_key=page_obj.next_page_number without without_key %}{{ anchor }}">{{ page_obj.next_page_number }}</a>
{% endif %}
</p>
{% endspaceless %}
{% endif %}
{% if page_obj.has_previous %}
<a href="{% querystring page_key=page_obj.previous_page_number without without_key %}{{ anchor }}">{{ page_obj.previous_page_number }}</a>
{% endif %}
<span class="this-page">{{ page_obj.number }}</span>
{% if page_obj.has_next %}
<a href="{% querystring page_key=page_obj.next_page_number without without_key %}{{ anchor }}">{{ page_obj.next_page_number }}</a>
{% endif %}
</p>
{% endspaceless %}
{% endif %}
{% endwith %}
{% endwith %}
{% else %}
<p>{% trans 'No records found' %}</p>
<p>{% trans 'No records found' %}</p>
{% endif %}

View File

@ -2,17 +2,17 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="">{% trans 'Legacy' %}</a>
{{ block.super }}
<a href="">{% trans 'Legacy' %}</a>
{% endblock %}
{% block content %}
<h3>{% trans 'Legacy data sources and services' %}</h3>
<ul class="apps">
{% for a in legacy_apps %}
<li class="ressources"><a href="../{{ a.url }}">{% trans a.name %}</a></li>
{% endfor %}
</ul>
<h3>{% trans 'Legacy data sources and services' %}</h3>
<ul class="apps">
{% for a in legacy_apps %}
<li class="ressources"><a href="../{{ a.url }}">{% trans a.name %}</a></li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -4,9 +4,9 @@
{% 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>
<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>
@ -16,21 +16,21 @@
{% 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 %},
<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>
</a>
</li>
{% endwith %}
{% endfor %}
</ul>
</div>
{% endblock %}

View File

@ -2,15 +2,15 @@
{% load i18n %}
{% block appbar %}
<h2>{% trans 'Removing access right' %}</h2>
<h2>{% trans 'Removing access right' %}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a href="{% url 'apiuser-list' %}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a href="{% url 'apiuser-list' %}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,25 +2,25 @@
{% load i18n gadjo %}
{% block breadcrumb %}
{{ block.super }}
<a href="#">{% trans 'Add access right' %}</a>
{{ block.super }}
<a href="#">{% trans 'Add access right' %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'Access right' %}</h2>
<h2>{% trans 'Access right' %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
<div id="form-content">
{% csrf_token %}
{{ form|with_template }}
</div>
<div class="buttons">
<button>{% trans "Add" %}</button>
<a href="{% url 'apiuser-list' %}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
<div id="form-content">
{% csrf_token %}
{{ form|with_template }}
</div>
<div class="buttons">
<button>{% trans "Add" %}</button>
<a href="{% url 'apiuser-list' %}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,24 +2,24 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
{% if object.id %}
<a href="{{ object.get_absolute_url }}">{{ object.username }}</a>
{% endif %}
{{ block.super }}
{% if object.id %}
<a href="{{ object.get_absolute_url }}">{{ object.username }}</a>
{% endif %}
{% endblock %}
{% block appbar %}
<h2>{% trans 'API User' %} - {{ object.username }}</h2>
<h2>{% trans 'API User' %} - {{ object.username }}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a href="{% url 'apiuser-list' %}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a href="{% url 'apiuser-list' %}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,31 +2,31 @@
{% load i18n gadjo %}
{% block breadcrumb %}
{{ block.super }}
{% if object.id %}
<a href="{{ object.get_absolute_url }}">{{ object.username }}</a>
{% else %}
<a href="{% url 'apiuser-add' %}">{% trans 'Add API User' %}</a>
{% endif %}
{{ block.super }}
{% if object.id %}
<a href="{{ object.get_absolute_url }}">{{ object.username }}</a>
{% else %}
<a href="{% url 'apiuser-add' %}">{% trans 'Add API User' %}</a>
{% endif %}
{% endblock %}
{% block appbar %}
<h2>{% trans 'API User' %} - {% if object.id %}{{ object.username }}{% else %}{% trans 'New' %}{% endif %}</h2>
<h2>{% trans 'API User' %} - {% if object.id %}{{ object.username }}{% else %}{% trans 'New' %}{% endif %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
<div id="form-content">
{% csrf_token %}
{{ form|with_template }}
</div>
{% block buttons %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'apiuser-list' %}">{% trans 'Cancel' %}</a>
</div>
{% endblock %}
</form>
<form method="post" enctype="multipart/form-data">
<div id="form-content">
{% csrf_token %}
{{ form|with_template }}
</div>
{% block buttons %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'apiuser-list' %}">{% trans 'Cancel' %}</a>
</div>
{% endblock %}
</form>
{% endblock %}

View File

@ -2,74 +2,74 @@
{% load i18n passerelle %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'apiuser-list' %}">{% trans 'Access Management' %}</a>
{{ block.super }}
<a href="{% url 'apiuser-list' %}">{% trans 'Access Management' %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'Access Management' %}</h2>
<span class="actions">
{% if perms.base.add_apiuser %}
<a href="{% url 'apiuser-add' %}">{% trans 'Add API User' %}</a>
{% endif %}
</span>
<h2>{% trans 'Access Management' %}</h2>
<span class="actions">
{% if perms.base.add_apiuser %}
<a href="{% url 'apiuser-add' %}">{% trans 'Add API User' %}</a>
{% endif %}
</span>
{% endblock %}
{% block content %}
<table class="main">
<thead>
<tr>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Key Type' %}</th>
<th>{% trans 'IP Restriction' %}</th>
{% if perms.base.delete_apiuser %}<th></th>{% endif %}
</tr>
</thead>
<tbody>
{% for object in object_list %}
<tr>
{% if perms.base.change_apiuser %}
<td><a href="{% url 'apiuser-edit' pk=object.id %}">{{ object.fullname }}</a></td>
{% else %}
<td>{{ object.fullname }}</td>
{% endif %}
<td>{% if object.keytype %}{{ object.keytype }}{% else %} - {% endif %}</td>
<td>{% if object.ipsource %}{{ object.ipsource }}{% else %} - {% endif %}</td>
{% if perms.base.delete_apiuser %}
<td><a rel="popup" class="icon-remove-sign" href="{% url 'apiuser-delete' pk=object.id %}"></a></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
<table class="main">
<thead>
<tr>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Key Type' %}</th>
<th>{% trans 'IP Restriction' %}</th>
{% if perms.base.delete_apiuser %}<th></th>{% endif %}
</tr>
</thead>
<tbody>
{% for object in object_list %}
<tr>
{% if perms.base.change_apiuser %}
<td><a href="{% url 'apiuser-edit' pk=object.id %}">{{ object.fullname }}</a></td>
{% else %}
<td>{{ object.fullname }}</td>
{% endif %}
<td>{% if object.keytype %}{{ object.keytype }}{% else %} - {% endif %}</td>
<td>{% if object.ipsource %}{{ object.ipsource }}{% else %} - {% endif %}</td>
{% if perms.base.delete_apiuser %}
<td><a rel="popup" class="icon-remove-sign" href="{% url 'apiuser-delete' pk=object.id %}"></a></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% include "gadjo/pagination.html" %}
{% include "gadjo/pagination.html" %}
{% if trusted_services %}
<h3>{% trans 'Trusted services:' %}</h3>
<table class="main">
<thead>
<tr>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Key Type' %}</th>
<th>{% trans 'Type' %}</th>
<th>{% trans 'Identifier' %}</th>
<th>{% trans 'URL' %}</th>
</tr>
</thead>
<tbody>
{% for trusted_service in trusted_services %}
<tr>
<td>{{ trusted_service.title }} ({{ trusted_service.verif_orig }})</td>
<td>SIGN</td>
<td>{{ trusted_service.service_type }}</td>
<td>{{ trusted_service.slug }}</td>
<td><a href="{{ trusted_service.url }}">{{ trusted_service.url }}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if trusted_services %}
<h3>{% trans 'Trusted services:' %}</h3>
<table class="main">
<thead>
<tr>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Key Type' %}</th>
<th>{% trans 'Type' %}</th>
<th>{% trans 'Identifier' %}</th>
<th>{% trans 'URL' %}</th>
</tr>
</thead>
<tbody>
{% for trusted_service in trusted_services %}
<tr>
<td>{{ trusted_service.title }} ({{ trusted_service.verif_orig }})</td>
<td>SIGN</td>
<td>{{ trusted_service.service_type }}</td>
<td>{{ trusted_service.slug }}</td>
<td><a href="{{ trusted_service.url }}">{{ trusted_service.url }}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}

View File

@ -1,52 +1,52 @@
{% load i18n passerelle %}
<li class="{{ endpoint.http_method|default:"get" }}-method">
<div class="description">{% if endpoint.description %}<span class="description--label">{{endpoint.description}}{% trans ':' %}</span>{% endif %}
<a href="{{endpoint.example_url}}" class="example-url">{{ site_base_uri }}{{endpoint.example_url_as_html}}</a></div>
<ul class="params">
{% if endpoint.get_params %}
<li>
<ul class="get-params">
{% for param in endpoint.get_params %}
<li><span class="param-name">{{param.name}}</span>
{% if param.optional %}<span class="param-optional">({% trans 'optional' %}{% if param.default_value %},
{% trans 'default value:' %} {{param.default_value}}{% endif %})</span>{% endif %}
{% if param.description %}{% trans ':' %} {{param.description}}{% endif %}
<span class="type">({% if param.type %}{{ param.type }}{% else %}string{% endif %}{% if param.blank is False %}, {% trans "not empty" %}{% endif %})</span>
</li>
{% endfor %}
</ul>
</li>
{% endif %}
{% if endpoint.body_schemas %}
<li><span class="params-title">{% trans "Request body" %}</span>
<div class="body-schemas">
{% render_body_schemas body_schemas=endpoint.body_schemas %}
{% if endpoint.body_schemas|get:"application/json"|get:"unflatten" %}
<div class="pk-information">{% blocktrans %}
Object parameters can be sent as flat elements, with keys and subkeys separated
by a / character, eg: <tt>{"element": {"child": "value"}}</tt> can
be sent as <tt>{"element/child": "value"}</tt>.
{% endblocktrans %}</div>
{% endif %}
</div>
</li>
{% endif %}
{% if endpoint.response_schemas %}
<li><span class="params-title">{% trans "Response body" %}</span>
<div class="body-schemas">
{% render_body_schemas body_schemas=endpoint.response_schemas %}
</div>
</li>
{% endif %}
{% if endpoint.post.input_example %}
<li><span class="params-title">{% trans "Request example" %}</span>
<pre class="endpoint-input-example">{{ endpoint.post.input_example|json_dumps }}</pre>
</li>
{% endif %}
</ul>
{% if endpoint.long_description %}
<div class="long-description">
{{ endpoint.long_description|linebreaks }}
</div>
{% endif %}
</li>
<li class="{{ endpoint.http_method|default:"get" }}-method">
<div class="description">{% if endpoint.description %}<span class="description--label">{{endpoint.description}}{% trans ':' %}</span>{% endif %}
<a href="{{endpoint.example_url}}" class="example-url">{{ site_base_uri }}{{endpoint.example_url_as_html}}</a></div>
<ul class="params">
{% if endpoint.get_params %}
<li>
<ul class="get-params">
{% for param in endpoint.get_params %}
<li><span class="param-name">{{param.name}}</span>
{% if param.optional %}<span class="param-optional">({% trans 'optional' %}{% if param.default_value %},
{% trans 'default value:' %} {{param.default_value}}{% endif %})</span>{% endif %}
{% if param.description %}{% trans ':' %} {{param.description}}{% endif %}
<span class="type">({% if param.type %}{{ param.type }}{% else %}string{% endif %}{% if param.blank is False %}, {% trans "not empty" %}{% endif %})</span>
</li>
{% endfor %}
</ul>
</li>
{% endif %}
{% if endpoint.body_schemas %}
<li><span class="params-title">{% trans "Request body" %}</span>
<div class="body-schemas">
{% render_body_schemas body_schemas=endpoint.body_schemas %}
{% if endpoint.body_schemas|get:"application/json"|get:"unflatten" %}
<div class="pk-information">{% blocktrans %}
Object parameters can be sent as flat elements, with keys and subkeys separated
by a / character, eg: <tt>{"element": {"child": "value"}}</tt> can
be sent as <tt>{"element/child": "value"}</tt>.
{% endblocktrans %}</div>
{% endif %}
</div>
</li>
{% endif %}
{% if endpoint.response_schemas %}
<li><span class="params-title">{% trans "Response body" %}</span>
<div class="body-schemas">
{% render_body_schemas body_schemas=endpoint.response_schemas %}
</div>
</li>
{% endif %}
{% if endpoint.post.input_example %}
<li><span class="params-title">{% trans "Request example" %}</span>
<pre class="endpoint-input-example">{{ endpoint.post.input_example|json_dumps }}</pre>
</li>
{% endif %}
</ul>
{% if endpoint.long_description %}
<div class="long-description">
{{ endpoint.long_description|linebreaks }}
</div>
{% endif %}
</li>

View File

@ -2,16 +2,16 @@
{% load i18n %}
{% block appbar %}
<h2>{% trans "Site Import" %}</h2>
<h2>{% trans "Site Import" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Import" %}</button>
<a class="cancel" href="{% url 'manage-home' %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Import" %}</button>
<a class="cancel" href="{% url 'manage-home' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -1,32 +1,32 @@
{% load i18n %}
<div class="job-dialog">
<table>
<tr>
<td>{% trans "Parameters" %}</td>
<td>{{ job.parameters }}</td>
</tr>
{% for key, value in job.status_details.items %}
{% if key != 'new_job_pk' %}
<tr>
<td>{{key}}</td>
<td>{% for key2, value2 in value.items %}
{{key2}}: {{value2}}<br>
{% empty %}
{{value|linebreaksbr}}
{% endfor %}</td>
</tr>
{% endif %}
{% endfor %}
</table>
<table>
<tr>
<td>{% trans "Parameters" %}</td>
<td>{{ job.parameters }}</td>
</tr>
{% for key, value in job.status_details.items %}
{% if key != 'new_job_pk' %}
<tr>
<td>{{key}}</td>
<td>{% for key2, value2 in value.items %}
{{key2}}: {{value2}}<br>
{% empty %}
{{value|linebreaksbr}}
{% endfor %}</td>
</tr>
{% endif %}
{% endfor %}
</table>
{% if job.status == 'failed' or job.status == 'restarted' %}
<div class="buttons">
{% if job.status == 'failed' %}
<a class="button" href="{% url 'restart-job' connector=object.get_connector_slug slug=object.slug job_pk=job.pk %}">{% trans "Restart" %}</a>
{% else %}
<a class="button" href="{% url 'view-jobs-connector' connector=object.get_connector_slug slug=object.slug %}?job_id={{ job.status_details.new_job_pk }}">{% trans "See new job" %}</a>
{% endif %}
</div>
{% endif %}
{% if job.status == 'failed' or job.status == 'restarted' %}
<div class="buttons">
{% if job.status == 'failed' %}
<a class="button" href="{% url 'restart-job' connector=object.get_connector_slug slug=object.slug job_pk=job.pk %}">{% trans "Restart" %}</a>
{% else %}
<a class="button" href="{% url 'view-jobs-connector' connector=object.get_connector_slug slug=object.slug %}?job_id={{ job.status_details.new_job_pk }}">{% trans "See new job" %}</a>
{% endif %}
</div>
{% endif %}
</div>

View File

@ -1,38 +1,38 @@
{% load passerelle i18n tz %}
<div class="log-dialog" title="{{ logline.level_name }} - {{ logline.timestamp|localtime|date:'DATE_FORMAT' }} {{ logline.timestamp|localtime|time:"H:i:s" }}">
<table>
<tr>
<td>{% trans 'Source IP' %}</td>
<td>{{ logline.sourceip|default:"-" }}</td>
</tr>
<tr>
<td>{% trans 'Message' %}</td>
<td>{{ logline.message|censor }}</td>
</tr>
{% for key, value in logline.extra.items %}
{% if key != 'transaction_id' %}
<tr>
<td>{{key}}</td>
<td>{% for key2, value2 in value.items %}
{{key2}}: {{value2|censor}}<br>
{% empty %}
{% with val=value|censor %}
{% if '_url' in key %}
<a href="{{val}}">{{val}}</a>
{% else %}
{{val|linebreaksbr}}
<table>
<tr>
<td>{% trans 'Source IP' %}</td>
<td>{{ logline.sourceip|default:"-" }}</td>
</tr>
<tr>
<td>{% trans 'Message' %}</td>
<td>{{ logline.message|censor }}</td>
</tr>
{% for key, value in logline.extra.items %}
{% if key != 'transaction_id' %}
<tr>
<td>{{key}}</td>
<td>{% for key2, value2 in value.items %}
{{key2}}: {{value2|censor}}<br>
{% empty %}
{% with val=value|censor %}
{% if '_url' in key %}
<a href="{{val}}">{{val}}</a>
{% else %}
{{val|linebreaksbr}}
{% endif %}
{% endwith %}
{% endfor %}</td>
</tr>
{% endif %}
{% endwith %}
{% endfor %}</td>
</tr>
{% endif %}
{% endfor %}
</table>
{% endfor %}
</table>
{% if logline.transaction_id %}
<div class="buttons">
<a class="button" href="{% url 'view-logs-connector' connector=object.get_connector_slug slug=object.slug %}?q={{logline.transaction_id}}">{% trans "Search for logs from the same call" %}</a>
</div>
{% endif %}
{% if logline.transaction_id %}
<div class="buttons">
<a class="button" href="{% url 'view-logs-connector' connector=object.get_connector_slug slug=object.slug %}?q={{logline.transaction_id}}">{% trans "Search for logs from the same call" %}</a>
</div>
{% endif %}
</div>

View File

@ -2,16 +2,16 @@
{% load i18n gadjo %}
{% block appbar %}
<h2>{% trans 'Logging Parameters' %}</h2>
<h2>{% trans 'Logging Parameters' %}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans 'Save' %}</button>
<a href="{{ connector.get_absolute_url }}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans 'Save' %}</button>
<a href="{{ connector.get_absolute_url }}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,30 +2,30 @@
{% load i18n gadjo %}
{% block appbar %}
<h2>{% trans "Availability check parameters" %}</h2>
<h2>{% trans "Availability check parameters" %}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<form method="post">
{% csrf_token %}
{% if availability_status %}
<div class="{% if availability_status.down %}errornotice{% else %}successnotice{% endif %}">
{% trans 'Connector Status:' %}
{% if availability_status.down %}
{% trans 'Down' %}
({% trans 'since:' %} {{availability_status.start_timestamp|date:"SHORT_DATETIME_FORMAT"}})
<span class="availability-status-message">{{availability_status.message}}</span>
{% else %}
{% trans 'Up' %}
{% if availability_status %}
<div class="{% if availability_status.down %}errornotice{% else %}successnotice{% endif %}">
{% trans 'Connector Status:' %}
{% if availability_status.down %}
{% trans 'Down' %}
({% trans 'since:' %} {{availability_status.start_timestamp|date:"SHORT_DATETIME_FORMAT"}})
<span class="availability-status-message">{{availability_status.message}}</span>
{% else %}
{% trans 'Up' %}
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans 'Save' %}</button>
<a href="{{ connector.get_absolute_url }}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans 'Save' %}</button>
<a href="{{ connector.get_absolute_url }}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,13 +2,13 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{{ view.resource.get_absolute_url }}">{{ view.resource.title }}</a>
{% block resource-child-breadcrumb %}
{% if object.id %}
<a href="#">{{ object }}</a>
{% else %}
<a href="#">{% blocktrans with verbose_name=view.model_verbose_name|lower %}Add {{ verbose_name }}{% endblocktrans %}</a>
{% endif %}
{% endblock %}
{{ block.super }}
<a href="{{ view.resource.get_absolute_url }}">{{ view.resource.title }}</a>
{% block resource-child-breadcrumb %}
{% if object.id %}
<a href="#">{{ object }}</a>
{% else %}
<a href="#">{% blocktrans with verbose_name=view.model_verbose_name|lower %}Add {{ verbose_name }}{% endblocktrans %}</a>
{% endif %}
{% endblock %}
{% endblock %}

View File

@ -2,16 +2,16 @@
{% load i18n %}
{% block appbar %}
<h2>{{ object }}</h2>
<h2>{{ object }}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>{% blocktrans %}Are you sure you want to delete {{ object }} ?{% endblocktrans %}</p>
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a href="{{ view.resource.get_absolute_url }}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<p>{% blocktrans %}Are you sure you want to delete {{ object }} ?{% endblocktrans %}</p>
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a href="{{ view.resource.get_absolute_url }}" class="cancel">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,28 +2,28 @@
{% load i18n gadjo %}
{% block appbar %}
<h2>
{% if object %}
{{ object }}
{% else %}
{% blocktrans with verbose_name=view.model_verbose_name|lower %}Add {{ verbose_name }}{% endblocktrans %}
{% endif %}
</h2>
<h2>
{% if object %}
{{ object }}
{% else %}
{% blocktrans with verbose_name=view.model_verbose_name|lower %}Add {{ verbose_name }}{% endblocktrans %}
{% endif %}
</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
<div id="form-content">
{% csrf_token %}
{% block form %}
{{ form|with_template }}
{% endblock %}
</div>
{% block buttons %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{{ view.resource.get_absolute_url }}">{% trans 'Cancel' %}</a>
</div>
{% endblock %}
</form>
<form method="post" enctype="multipart/form-data">
<div id="form-content">
{% csrf_token %}
{% block form %}
{{ form|with_template }}
{% endblock %}
</div>
{% block buttons %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{{ view.resource.get_absolute_url }}">{% trans 'Cancel' %}</a>
</div>
{% endblock %}
</form>
{% endblock %}

View File

@ -2,20 +2,20 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{{ object.get_absolute_url }}">{{ object.title }}</a>
{{ block.super }}
<a href="{{ object.get_absolute_url }}">{{ object.title }}</a>
{% endblock %}
{% block appbar %}
<h2>{{ view.model.get_verbose_name }} - {{ object.title }}</h2>
<h2>{{ view.model.get_verbose_name }} - {{ object.title }}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,40 +2,40 @@
{% load i18n gadjo static %}
{% block extrascripts %}
<script src="{% static "js/slugify.js" %}"></script>
{{ block.super }}
<script src="{% static "js/slugify.js" %}"></script>
{{ block.super }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
{% if object.id %}
<a href="{{ object.get_absolute_url }}">{{ object.title }}</a>
{% else %}
<a href="#">{% trans 'Add Connector' %}</a>
{% endif %}
{{ block.super }}
{% if object.id %}
<a href="{{ object.get_absolute_url }}">{{ object.title }}</a>
{% else %}
<a href="#">{% trans 'Add Connector' %}</a>
{% endif %}
{% endblock %}
{% block appbar %}
<h2>{{ view.model.get_verbose_name }} - {% if object.id %}{{ object.title }}{% else %}{% trans 'New' %}{% endif %}</h2>
<h2>{{ view.model.get_verbose_name }} - {% if object.id %}{{ object.title }}{% else %}{% trans 'New' %}{% endif %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
<div id="form-content">
{% csrf_token %}
{{ form|with_template }}
</div>
{% block buttons %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
{% if object.id %}
<a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
{% else %}
<a class="cancel" href="{% url 'add-connector' %}">{% trans 'Cancel' %}</a>
{% endif %}
</div>
{% endblock %}
</form>
<form method="post" enctype="multipart/form-data">
<div id="form-content">
{% csrf_token %}
{{ form|with_template }}
</div>
{% block buttons %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
{% if object.id %}
<a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
{% else %}
<a class="cancel" href="{% url 'add-connector' %}">{% trans 'Cancel' %}</a>
{% endif %}
</div>
{% endblock %}
</form>
{% endblock %}

View File

@ -2,34 +2,34 @@
{% load i18n passerelle %}
{% block breadcrumb %}
{{ block.super }}
<a href="{{object.get_absolute_url}}">{{ object.title }}</a>
<a href="#">{% trans "Jobs" %}</a>
{{ block.super }}
<a href="{{object.get_absolute_url}}">{{ object.title }}</a>
<a href="#">{% trans "Jobs" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Jobs" %}</h2>
<h2>{% trans "Jobs" %}</h2>
{% endblock %}
{% block content %}
<div id="jobs">
<div id="jobs">
<form>
<p><input name="q" type="search" value="{{query}}"> <button>{% trans 'Search' %}</button>
<span class="help_text">{% trans "(supports text search in job name or dates)" %}</span>
</p>
</form>
<form>
<p><input name="q" type="search" value="{{query}}"> <button>{% trans 'Search' %}</button>
<span class="help_text">{% trans "(supports text search in job name or dates)" %}</span>
</p>
</form>
{% include "passerelle/includes/resource-jobs-table.html" with jobs=page_obj %}
</div>
{% include "passerelle/includes/resource-jobs-table.html" with jobs=page_obj %}
</div>
{% if job_target %}
<script>
$(function () {
open_job_window($('table.main').data('job-base-url'), {{ job_target.pk }});
});
</script>
{% endif %}
{% if job_target %}
<script>
$(function () {
open_job_window($('table.main').data('job-base-url'), {{ job_target.pk }});
});
</script>
{% endif %}
{% endblock %}

View File

@ -2,35 +2,35 @@
{% load i18n passerelle %}
{% block breadcrumb %}
{{ block.super }}
<a href="{{object.get_absolute_url}}">{{ object.title }}</a>
<a href="#">{% trans "Logs" %}</a>
{{ block.super }}
<a href="{{object.get_absolute_url}}">{{ object.title }}</a>
<a href="#">{% trans "Logs" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Logs" %}</h2>
<h2>{% trans "Logs" %}</h2>
{% endblock %}
{% block content %}
<div id="logs">
<div id="logs">
<form>
<p>
{{ form.log_level }} <input name="q" type="search" value="{{ form.cleaned_data.q }}"> <button>{% trans 'Search' %}</button>
<span class="help_text">{% trans "(supports text search in messages, or dates)" %}</span>
</p>
</form>
<form>
<p>
{{ form.log_level }} <input name="q" type="search" value="{{ form.cleaned_data.q }}"> <button>{% trans 'Search' %}</button>
<span class="help_text">{% trans "(supports text search in messages, or dates)" %}</span>
</p>
</form>
{% include "passerelle/includes/resource-logs-table.html" with logrecords=page_obj %}
</div>
{% include "passerelle/includes/resource-logs-table.html" with logrecords=page_obj %}
</div>
{% if log_target %}
<script>
$(function () {
open_log_window($('table.main').data('log-base-url'), {{ log_target.id }});
});
</script>
{% endif %}
{% if log_target %}
<script>
$(function () {
open_log_window($('table.main').data('log-base-url'), {{ log_target.id }});
});
</script>
{% endif %}
{% endblock %}

View File

@ -2,176 +2,176 @@
{% load i18n passerelle %}
{% block breadcrumb %}
{{ block.super }}
<a href="{{object.get_absolute_url}}">{{ object.title }}</a>
{{ block.super }}
<a href="{{object.get_absolute_url}}">{{ object.title }}</a>
{% endblock %}
{% block appbar %}
<h2>{{ view.model.get_verbose_name }} - {{ object.title }}
<h2>{{ view.model.get_verbose_name }} - {{ object.title }}
{% with status=object.get_availability_status %}
{% if status %}
{% if status.down %}<span class="down" title="{{status.message}} {% trans 'since:' %} {{status.start_timestamp|date:"SHORT_DATETIME_FORMAT"}} ">{% trans 'Down' %}</span>{% endif %}
{% endif %}
{% endwith %}
</h2>
<span class="actions">
<a class="extra-actions-menu-opener"></a>
{% if object|can_edit:request.user %}
<a rel="popup" href="{{ object.get_edit_url }}">{% trans 'Edit' %}</a>
{% endif %}
{% block actions %}
{% endblock %}
</span>
<ul class="extra-actions-menu">
{% if object|can_edit:request.user and has_check_status %}
<li><a rel="popup" href="{% url 'manage-availability' resource_type=object|resource_type resource_pk=object.id %}">{% trans 'Availability check parameters' %}</a></li>
{% endif %}
{% if object|can_edit:request.user %}
<li><a rel="popup" href="{% url 'logging-parameters' resource_type=object|resource_type resource_pk=object.id %}">{% trans 'Logging parameters' %}</a></li>
{% endif %}
{% if request.user.is_authenticated %}
<li><a download href="{% url 'export-connector' connector=object.get_connector_slug slug=object.slug %}">{% trans 'Export' %}</a></li>
{% endif %}
{% if object|can_delete:request.user %}
<li><a rel="popup" href="{{ object.get_delete_url }}">{% trans 'Delete' %}</a></li>
{% endif %}
</ul>
</h2>
<span class="actions">
<a class="extra-actions-menu-opener"></a>
{% if object|can_edit:request.user %}
<a rel="popup" href="{{ object.get_edit_url }}">{% trans 'Edit' %}</a>
{% endif %}
{% block actions %}
{% endblock %}
</span>
<ul class="extra-actions-menu">
{% if object|can_edit:request.user and has_check_status %}
<li><a rel="popup" href="{% url 'manage-availability' resource_type=object|resource_type resource_pk=object.id %}">{% trans 'Availability check parameters' %}</a></li>
{% endif %}
{% if object|can_edit:request.user %}
<li><a rel="popup" href="{% url 'logging-parameters' resource_type=object|resource_type resource_pk=object.id %}">{% trans 'Logging parameters' %}</a></li>
{% endif %}
{% if request.user.is_authenticated %}
<li><a download href="{% url 'export-connector' connector=object.get_connector_slug slug=object.slug %}">{% trans 'Export' %}</a></li>
{% endif %}
{% if object|can_delete:request.user %}
<li><a rel="popup" href="{{ object.get_delete_url }}">{% trans 'Delete' %}</a></li>
{% endif %}
</ul>
{% endblock %}
{% block content %}
{% if request.user.is_authenticated %}
<div id="description">
{% block description %}
{% if object.description %}{{object.description|linebreaks}}{% endif %}
{% if request.user.is_authenticated %}
<div id="description">
{% block description %}
{% if object.description %}{{object.description|linebreaks}}{% endif %}
{% for field, value in object.get_description_fields %}
{% if value or value == False %}
<p>{{field.verbose_name}}{% trans ":" %} {% spaceless %}
{% if value == True %}{% trans "yes" %}
{% elif value == False %}{% trans "no" %}
{% else %}{{value}}
{% endif %}
{% endspaceless %}
</p>
{% endif %}
{% endfor %}
{% endblock %}
</div>
{% endif %}
<div class="pk-tabs connector-tabs">
<div class="pk-tabs--tab-list" role="tablist">
<button role="tab" {% if default_tab_page == 'endpoints' %}aria-selected="true" tabindex="0"{% else %}aria-selected="false" tabindex="-1"{% endif %}aria-controls="panel-endpoints" id="tab-endpoints">{% trans "Endpoints" %}</button>
{% if object|can_edit:request.user and object.queries is not None %}
<button role="tab" aria-selected="false" aria-controls="panel-queries" id="tab-queries" tabindex="-1">{% trans "Queries" %}</button>
{% endif %}
{% if request.user.is_authenticated %}{% block extra-tab-buttons %}{% endblock %}{% endif %}
{% if perms.base.see_accessright %}
<button role="tab" aria-selected="false" aria-controls="panel-security" id="tab-security" tabindex="-1">{% trans "Security" %}</button>
{% endif %}
{% if perms.base.see_resourcelog %}
<button role="tab" {% if default_tab_page == 'logs' %}aria-selected="true" tabindex="0"{% else %}aria-selected="false" tabindex="-1"{% endif %} aria-controls="panel-logs" id="tab-logs">{% trans "Logs" %}</button>
{% endif %}
{% if perms.base.view_job and object.jobs_set.all %}
<button role="tab" aria-selected="false" aria-controls="panel-jobs" id="tab-jobs" tabindex="-1">{% trans "Jobs" %}</button>
{% endif %}
</div>
<div class="pk-tabs--container">
<div id="panel-endpoints" role="tabpanel" tabindex="0" aria-labelledby="tab-endpoints" {% if default_tab_page != 'endpoints' %}hidden{% endif %}>
{% if object.documentation_url %}
<div class="pk-information documentation"><a href="{{ object.documentation_url }}">{% trans "Documentation" %}</a></div>
{% endif %}
<div>
{% if object.api_description %}<p>{{object.api_description|safe}}</p>{% endif %}
{% block endpoints %}
{% regroup object.get_endpoints_infos by display_category as endpoints_groups %}
{% for endpoints in endpoints_groups %}
{% if endpoints.grouper %}<h4>{{ endpoints.grouper }}</h4>{% elif not forloop.first %}<h4>{% trans "Misc" %}</h4>{% endif %}
<ul class="endpoints">
{% for endpoint in endpoints.list %}
{% if endpoint.show %}
{% include "passerelle/manage/endpoint.html" with endpoint=endpoint %}
{% for field, value in object.get_description_fields %}
{% if value or value == False %}
<p>{{field.verbose_name}}{% trans ":" %} {% spaceless %}
{% if value == True %}{% trans "yes" %}
{% elif value == False %}{% trans "no" %}
{% else %}{{value}}
{% endif %}
{% endspaceless %}
</p>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
{% endblock %}
</div>
</div>
{% block custom-queries %}
{% if object|can_edit:request.user and object.queries is not None %}
<div id="panel-queries" role="tabpanel" tabindex="-1" aria-labelledby="tab-queries" hidden>
<div>
{% if object.queries.exists %}
<ul class="objects-list single-links">
{% for query in object.queries.all %}
<li>
<a href="{{ query.edit_url }}">{{ query.name }}</a>
<a rel="popup" class="delete" href="{{ query.delete_url }}">{% trans "delete query" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
<p>{% trans 'No query are defined.' %}</p>
{% endif %}
<p>
<a class="icon-plus button" href="{{ object.create_query_url }}">{% trans 'New Query' %}</a>
</p>
</div>
{% endblock %}
</div>
{% endif %}
{% endblock %}
{% if request.user.is_authenticated %}
<div class="pk-tabs connector-tabs">
<div class="pk-tabs--tab-list" role="tablist">
<button role="tab" {% if default_tab_page == 'endpoints' %}aria-selected="true" tabindex="0"{% else %}aria-selected="false" tabindex="-1"{% endif %}aria-controls="panel-endpoints" id="tab-endpoints">{% trans "Endpoints" %}</button>
{% if object|can_edit:request.user and object.queries is not None %}
<button role="tab" aria-selected="false" aria-controls="panel-queries" id="tab-queries" tabindex="-1">{% trans "Queries" %}</button>
{% endif %}
{% if request.user.is_authenticated %}{% block extra-tab-buttons %}{% endblock %}{% endif %}
{% if perms.base.see_accessright %}
<button role="tab" aria-selected="false" aria-controls="panel-security" id="tab-security" tabindex="-1">{% trans "Security" %}</button>
{% endif %}
{% if perms.base.see_resourcelog %}
<button role="tab" {% if default_tab_page == 'logs' %}aria-selected="true" tabindex="0"{% else %}aria-selected="false" tabindex="-1"{% endif %} aria-controls="panel-logs" id="tab-logs">{% trans "Logs" %}</button>
{% endif %}
{% if perms.base.view_job and object.jobs_set.all %}
<button role="tab" aria-selected="false" aria-controls="panel-jobs" id="tab-jobs" tabindex="-1">{% trans "Jobs" %}</button>
{% endif %}
</div>
<div class="pk-tabs--container">
{% block extra-sections %}
{% endblock %}
<div id="panel-endpoints" role="tabpanel" tabindex="0" aria-labelledby="tab-endpoints" {% if default_tab_page != 'endpoints' %}hidden{% endif %}>
{% if object.documentation_url %}
<div class="pk-information documentation"><a href="{{ object.documentation_url }}">{% trans "Documentation" %}</a></div>
{% endif %}
<div>
{% if object.api_description %}<p>{{object.api_description|safe}}</p>{% endif %}
{% block endpoints %}
{% regroup object.get_endpoints_infos by display_category as endpoints_groups %}
{% for endpoints in endpoints_groups %}
{% if endpoints.grouper %}<h4>{{ endpoints.grouper }}</h4>{% elif not forloop.first %}<h4>{% trans "Misc" %}</h4>{% endif %}
<ul class="endpoints">
{% for endpoint in endpoints.list %}
{% if endpoint.show %}
{% include "passerelle/manage/endpoint.html" with endpoint=endpoint %}
{% endif %}
{% endfor %}
</ul>
{% endfor %}
{% endblock %}
</div>
</div>
{% if perms.base.see_accessright %}
<div id="panel-security" role="tabpanel" tabindex="-1" aria-labelledby="tab-security" hidden>
<div>
{% block security %}
{% for permission in object.get_connector_permissions %}
<p>{{permission.label}}</p>
{% access_rights_table resource=object permission=permission.key %}
{% empty %}
{% trans 'Access is open.' %}
{% endfor %}
{% endblock %}
{% block custom-queries %}
{% if object|can_edit:request.user and object.queries is not None %}
<div id="panel-queries" role="tabpanel" tabindex="-1" aria-labelledby="tab-queries" hidden>
<div>
{% if object.queries.exists %}
<ul class="objects-list single-links">
{% for query in object.queries.all %}
<li>
<a href="{{ query.edit_url }}">{{ query.name }}</a>
<a rel="popup" class="delete" href="{{ query.delete_url }}">{% trans "delete query" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
<p>{% trans 'No query are defined.' %}</p>
{% endif %}
<p>
<a class="icon-plus button" href="{{ object.create_query_url }}">{% trans 'New Query' %}</a>
</p>
</div>
</div>
{% endif %}
{% endblock %}
{% if request.user.is_authenticated %}
{% block extra-sections %}
{% endblock %}
{% if perms.base.see_accessright %}
<div id="panel-security" role="tabpanel" tabindex="-1" aria-labelledby="tab-security" hidden>
<div>
{% block security %}
{% for permission in object.get_connector_permissions %}
<p>{{permission.label}}</p>
{% access_rights_table resource=object permission=permission.key %}
{% empty %}
{% trans 'Access is open.' %}
{% endfor %}
{% endblock %}
</div>
</div>
{% endif %}
{% if perms.base.see_resourcelog %}
<div id="panel-logs" role="tabpanel" tabindex="-1" aria-labelledby="tab-logs" {% if not default_tab_page == 'logs' %}hidden{% endif %}>
<div>
{% block logs %}
{% resource_logs_table resource=object %}
{% endblock %}
<p><a class="button" href="{% url 'view-logs-connector' connector=object.get_connector_slug slug=object.slug %}">{% trans "Full page & filter" %}</a></p>
</div>
</div>
{% endif %}
{% if perms.base.view_job and object.jobs_set.all %}
<div id="panel-jobs" role="tabpanel" tabindex="-1" aria-labelledby="tab-jobs" hidden>
<div>
{% block jobs %}
{% resource_jobs_table resource=object %}
{% endblock %}
</div>
<p><a class="button" href="{% url 'view-jobs-connector' connector=object.get_connector_slug slug=object.slug %}">{% trans "Full page & filter" %}</a></p>
</div>
{% endif %}
{% block extra-tab-panels %}
{% endblock %}
{% endif %}
</div>
</div>
</div>
{% endif %}
{% if perms.base.see_resourcelog %}
<div id="panel-logs" role="tabpanel" tabindex="-1" aria-labelledby="tab-logs" {% if not default_tab_page == 'logs' %}hidden{% endif %}>
<div>
{% block logs %}
{% resource_logs_table resource=object %}
{% endblock %}
<p><a class="button" href="{% url 'view-logs-connector' connector=object.get_connector_slug slug=object.slug %}">{% trans "Full page & filter" %}</a></p>
</div>
</div>
{% endif %}
{% if perms.base.view_job and object.jobs_set.all %}
<div id="panel-jobs" role="tabpanel" tabindex="-1" aria-labelledby="tab-jobs" hidden>
<div>
{% block jobs %}
{% resource_jobs_table resource=object %}
{% endblock %}
</div>
<p><a class="button" href="{% url 'view-jobs-connector' connector=object.get_connector_slug slug=object.slug %}">{% trans "Full page & filter" %}</a></p>
</div>
{% endif %}
{% block extra-tab-panels %}
{% endblock %}
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="">{% trans 'Add a Connector' %}</a>
{{ block.super }}
<a href="">{% trans 'Add a Connector' %}</a>
{% endblock %}
@ -13,17 +13,17 @@
{% block content %}
{% regroup apps|dictsort:"category" by category as apps_list %}
{% for category in apps_list %}
<h3>{{ category.grouper }}</h3>
<ul class="objects-list single-links connectors add-connector">
{% for a in category.list %}
<li class="connector {{ a.get_css_class_name }}"
><a href="{{ a.get_add_url }}" ><span class="connector-name">{{ a.get_verbose_name }}</span></a></li>
{% regroup apps|dictsort:"category" by category as apps_list %}
{% for category in apps_list %}
<h3>{{ category.grouper }}</h3>
<ul class="objects-list single-links connectors add-connector">
{% for a in category.list %}
<li class="connector {{ a.get_css_class_name }}"
><a href="{{ a.get_add_url }}" ><span class="connector-name">{{ a.get_verbose_name }}</span></a></li>
{% endfor %}
</ul>
<br style="clear: both;">
{% endfor %}
</ul>
<br style="clear: both;">
{% endfor %}
{% endblock %}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block wrapper %}
<div id="wrap">
<div id="wrap">
{% endblock %}
{% block user-links %}
@ -10,26 +10,26 @@
{% block content %}
<h2>{% trans 'Log In' %}</h2>
<h2>{% trans 'Log In' %}</h2>
{% if form.errors %}
<p>{% trans 'Incorrect password. Try again.' %}</p>
{% endif %}
{% if form.errors %}
<p>{% trans 'Incorrect password. Try again.' %}</p>
{% endif %}
<form method="post" id="login-form">
{% csrf_token %}
<form method="post" id="login-form">
{% csrf_token %}
<p>
<label for="id_username">{{ form.username.label_tag }}</label>
{{ form.username }}
</p>
<p>
<label for="id_password">{{ form.password.label_tag }}</label>
{{ form.password }}
</p>
<p>
<label for="id_username">{{ form.username.label_tag }}</label>
{{ form.username }}
</p>
<p>
<label for="id_password">{{ form.password.label_tag }}</label>
{{ form.password }}
</p>
<input type="submit" value="{% trans 'Log In' %}" class="submit login" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
<input type="submit" value="{% trans 'Log In' %}" class="submit login" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
{% endblock %}