misc: apply djhtml (#69422)

This commit is contained in:
Valentin Deniaud 2022-09-29 17:24:45 +02:00
parent b991ea0ad7
commit a5ec15a465
34 changed files with 704 additions and 704 deletions

View File

@ -2,44 +2,44 @@
{% load i18n %}
{% block appbar %}
<h2>{{ type.text }}</h2>
<h2>{{ type.text }}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<div class="application-elements">
{% for element in elements %}
<label data-slugged-text="{{ element.text|slugify }}"><input type="checkbox" name="elements" value="{{ element.id }}">{{ element.text }}</label>
{% endfor %}
</div>
<div style="text-align: right">
<label>{% trans "Filter:" %} <input type="search" id="element-filter"></label>
</div>
<div class="buttons">
<button class="submit-button">{% trans "Add" %}</button>
<a class="cancel" href="{% url 'application-manifest' app_slug=app.slug %}">{% trans "Cancel" %}</a>
</div>
<script>
$('#element-filter').on('change blur keyup', function() {
const val = $(this).val().toLowerCase();
// force dimensions so a reduced number of elements do not affect size
$('.application-elements').css('height', $('.application-elements').height());
$('.application-elements').css('width', $('.application-elements').width());
if (!val) {
$('.application-elements label').show();
} else {
$('.application-elements label').each(function(idx, elem) {
var slugged_text = $(elem).attr('data-slugged-text');
if (slugged_text.indexOf(val) > -1) {
$(elem).show();
} else {
$(elem).hide();
}
});
}
});
</script>
<form method="post">
{% csrf_token %}
<div class="application-elements">
{% for element in elements %}
<label data-slugged-text="{{ element.text|slugify }}"><input type="checkbox" name="elements" value="{{ element.id }}">{{ element.text }}</label>
{% endfor %}
</div>
<div style="text-align: right">
<label>{% trans "Filter:" %} <input type="search" id="element-filter"></label>
</div>
<div class="buttons">
<button class="submit-button">{% trans "Add" %}</button>
<a class="cancel" href="{% url 'application-manifest' app_slug=app.slug %}">{% trans "Cancel" %}</a>
</div>
<script>
$('#element-filter').on('change blur keyup', function() {
const val = $(this).val().toLowerCase();
// force dimensions so a reduced number of elements do not affect size
$('.application-elements').css('height', $('.application-elements').height());
$('.application-elements').css('width', $('.application-elements').width());
if (!val) {
$('.application-elements label').show();
} else {
$('.application-elements label').each(function(idx, elem) {
var slugged_text = $(elem).attr('data-slugged-text');
if (slugged_text.indexOf(val) > -1) {
$(elem).show();
} else {
$(elem).hide();
}
});
}
});
</script>
</form>
</form>
{% endblock %}

View File

@ -2,18 +2,18 @@
{% load i18n %}
{% block appbar %}
<h2>{% blocktrans with title=object.name %}Removal of "{{ title }}"{% endblocktrans %}</h2>
<h2>{% blocktrans with title=object.name %}Removal of "{{ title }}"{% endblocktrans %}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>
{% trans 'Are you sure you want to remove this application?' %}
</p>
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a class="cancel" href="{% url 'application-manifest' app_slug=view.kwargs.slug %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<p>
{% trans 'Are you sure you want to remove this application?' %}
</p>
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a class="cancel" href="{% url 'application-manifest' app_slug=view.kwargs.slug %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -4,11 +4,11 @@
{% block appbar %}<h2>{% trans "Create Application" %}</h2>{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Create" %}</button>
<a class="cancel" href=".">{% trans "Cancel" %}</a>
</div>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Create" %}</button>
<a class="cancel" href=".">{% trans "Cancel" %}</a>
</div>
{% endblock %}

View File

@ -4,11 +4,11 @@
{% block appbar %}<h2>{% trans "Metadata" %}</h2>{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Submit" %}</button>
<a class="cancel" href="..">{% trans "Cancel" %}</a>
</div>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Submit" %}</button>
<a class="cancel" href="..">{% trans "Cancel" %}</a>
</div>
{% endblock %}

View File

@ -2,19 +2,19 @@
{% load i18n %}
{% block appbar %}
<h2>{% blocktrans with title=object.element.name %}Removal of "{{ title }}"{% endblocktrans %}</h2>
<h2>{% blocktrans with title=object.element.name %}Removal of "{{ title }}"{% endblocktrans %}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>
{% trans 'Are you sure you want to remove this element?' %}
</p>
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a class="cancel" href="{% url 'application-manifest' app_slug=view.kwargs.app_slug %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<p>
{% trans 'Are you sure you want to remove this element?' %}
</p>
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a class="cancel" href="{% url 'application-manifest' app_slug=view.kwargs.app_slug %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'applications-home' %}">{% trans 'Applications' %}</a>
{{ block.super }}
<a href="{% url 'applications-home' %}">{% trans 'Applications' %}</a>
{% endblock %}
{% block appbar %}
@ -16,27 +16,27 @@
{% block content %}
{% if object_list %}
<div id="applications">
{% for application in object_list %}
<div class="application application--{{ application.slug }}">
<h3>{{ application.name }}</h3>
<p>{{ application.description|default:"" }}</p>
{% if application.editable %}
<div class="buttons">
<a class="button" href="{% url 'application-manifest' app_slug=application.slug %}"
>{% trans "Edit" %}</a>
</div>
{% endif %}
</div>
{% endfor %}
</div>
{% else %}
<div id="no-applications">
<div class="infonotice">
<p>{% trans "You should find, install or build some applications." %}</p>
{% if object_list %}
<div id="applications">
{% for application in object_list %}
<div class="application application--{{ application.slug }}">
<h3>{{ application.name }}</h3>
<p>{{ application.description|default:"" }}</p>
{% if application.editable %}
<div class="buttons">
<a class="button" href="{% url 'application-manifest' app_slug=application.slug %}"
>{% trans "Edit" %}</a>
</div>
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% else %}
<div id="no-applications">
<div class="infonotice">
<p>{% trans "You should find, install or build some applications." %}</p>
</div>
</div>
{% endif %}
{% endblock %}

View File

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

View File

@ -2,12 +2,12 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'application-manifest' app_slug=app.slug %}">{{ app.name }}</a>
{{ block.super }}
<a href="{% url 'application-manifest' app_slug=app.slug %}">{{ app.name }}</a>
{% endblock %}
{% block appbar %}
<h2>{{ app.name }}</h2>
<h2>{{ app.name }}</h2>
<span class="actions">
<a rel="popup" href="{% url 'application-metadata' app_slug=app.slug %}">{% trans 'Metadata' %}</a>
</span>
@ -17,46 +17,46 @@
<ul class="objects-list single-links">
{% for relation in relations %}
{% if not relation.auto_dependency %}
<li><a>{{ relation.element.name }} <span class="extra-info">- {{ relation.element.type_label }}</span></a>
<a rel="popup" class="delete" href="{% url 'application-delete-element' app_slug=app.slug pk=relation.id %}">{% trans "remove" %}</a></li>
{% endif %}
{% if not relation.auto_dependency %}
<li><a>{{ relation.element.name }} <span class="extra-info">- {{ relation.element.type_label }}</span></a>
<a rel="popup" class="delete" href="{% url 'application-delete-element' app_slug=app.slug pk=relation.id %}">{% trans "remove" %}</a></li>
{% endif %}
{% endfor %}
{% for relation in relations %}
{% if relation.auto_dependency %}
<li class="auto-dependency"><a>{{ relation.element.name }} <span class="extra-info">- {{ relation.element.type_label }}</span></a></li>
{% endif %}
{% if relation.auto_dependency %}
<li class="auto-dependency"><a>{{ relation.element.name }} <span class="extra-info">- {{ relation.element.type_label }}</span></a></li>
{% endif %}
{% endfor %}
</ul>
{% if relations %}
<div class="buttons">
<a class="pk-button" href="{% url 'application-scandeps' app_slug=app.slug %}">{% trans "Scan dependencies" %}</a>
&nbsp; &nbsp;
<a class="pk-button" href="{% url 'application-generate' app_slug=app.slug %}">{% trans "Generate application bundle" %}</a>
{% if versions %}
&nbsp; &nbsp;
<a class="pk-button" download href="{% url 'application-download' app_slug=app.slug %}">{% trans "Download" %}</a>
{% endif %}
</div>
{% else %}
<div id="application-empty">
<div class="infonotice">
<p>{% trans "You should now assemble the different parts of your application." %}</p>
<div class="buttons">
<a class="pk-button" href="{% url 'application-scandeps' app_slug=app.slug %}">{% trans "Scan dependencies" %}</a>
&nbsp; &nbsp;
<a class="pk-button" href="{% url 'application-generate' app_slug=app.slug %}">{% trans "Generate application bundle" %}</a>
{% if versions %}
&nbsp; &nbsp;
<a class="pk-button" download href="{% url 'application-download' app_slug=app.slug %}">{% trans "Download" %}</a>
{% endif %}
</div>
{% else %}
<div id="application-empty">
<div class="infonotice">
<p>{% trans "You should now assemble the different parts of your application." %}</p>
</div>
</div>
</div>
{% endif %}
{% endblock %}
{% block sidebar %}
<aside id="sidebar">
<h3>{% trans "Add" %}</h3>
{% for service, types in types_by_service.items %}
<h4>{{ service }}</h4>
{% for type in types %}
<a class="button button-paragraph" rel="popup" href="{% url 'application-add-element' app_slug=app.slug type=type.id %}">{{ type.text }}</a>
{% endfor %}
{% endfor %}
</aside>
<aside id="sidebar">
<h3>{% trans "Add" %}</h3>
{% for service, types in types_by_service.items %}
<h4>{{ service }}</h4>
{% for type in types %}
<a class="button button-paragraph" rel="popup" href="{% url 'application-add-element' app_slug=app.slug type=type.id %}">{{ type.text }}</a>
{% endfor %}
{% endfor %}
</aside>
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'debug-home' %}">{% trans "Debugging" %}</a>
{{ block.super }}
<a href="{% url 'debug-home' %}">{% trans "Debugging" %}</a>
{% endblock %}
{% block appbar %}
@ -12,15 +12,15 @@
{% block content %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<button class="submit-button"
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<button class="submit-button"
name="toggle-current-ip">{% if current_ip_debug %}{% trans "Remove current IP" %}{% else %}{% trans "Add current IP" %}{% endif %} - {{ view.current_ip }}</button>
</div>
</form>
</div>
</form>
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'emails-home' %}">{% trans 'Emails' %}</a>
{{ block.super }}
<a href="{% url 'emails-home' %}">{% trans 'Emails' %}</a>
{% endblock %}
{% block appbar %}
@ -12,13 +12,13 @@
{% block content %}
<form action="." method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button>{% trans "Submit" %}</button>
</div>
</form>
<form action="." method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button>{% trans "Submit" %}</button>
</div>
</form>
{% endblock %}

View File

@ -2,18 +2,18 @@
{% load i18n %}
{% block appbar %}
<h2>{% blocktrans with title=object.name %}Removal of "{{ title }}"{% endblocktrans %}</h2>
<h2>{% blocktrans with title=object.name %}Removal of "{{ title }}"{% endblocktrans %}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>
{% trans 'Are you sure you want to delete this element ?' %}
</p>
<div class="buttons">
<button>{% trans 'Delete' %}</button>
<a class="cancel" href="{% url 'environment-home' %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<p>
{% trans 'Are you sure you want to delete this element ?' %}
</p>
<div class="buttons">
<button>{% trans 'Delete' %}</button>
<a class="cancel" href="{% url 'environment-home' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n service %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'environment-home' %}">{% trans 'Sites' %}</a>
{{ block.super }}
<a href="{% url 'environment-home' %}">{% trans 'Sites' %}</a>
{% endblock %}
{% block appbar %}
@ -15,121 +15,121 @@
<p>
<span>{% trans 'Add new service:' %}</span>
<span id="new-service">
{% for service in available_services %}
<a rel="popup" data-service="{{ service.id }}" href="{% url 'create-service' service=service.id %}">{{ service.label }}</a>
{% endfor %}
{% for service in available_services %}
<a rel="popup" data-service="{{ service.id }}" href="{% url 'create-service' service=service.id %}">{{ service.label }}</a>
{% endfor %}
</span>
</p>
{% for service in installed_services %}
<div data-service-id="{{ service.Extra.service_id }}"
data-slug="{{ service.slug }}"
class="bo-block service-block {{ service.Extra.service_id }}-block"
{% if service.wants_frequent_checks %}data-wants-check="true"{% endif %}>
<h3>{{ service.title }} <span class="slug">[{{service.slug}},
<a href="{{service.base_url}}">{{service.base_url}}</a>]</span></h3>
{% if not service.is_operational %}
{% if service.wants_frequent_checks %}
<p class="info being-deployed">
{% trans 'This service is still being deployed.' %}
</p>
{% else %}
<p class="warning">
{% trans 'This service is not operational.' %}
<a rel="popup" class="icon-remove-sign" href="{% url 'delete-service' service=service.Extra.service_id slug=service.slug %}" title="{% trans 'Delete service' %}"></a>
</p>
{% endif %}
{% endif %}
<form class="small" method="post" action=" {{ service|save_url }}" >
{% csrf_token %}
{{ service|as_update_form }}
<button class="enable-on-change" disabled="disabled">{% trans 'Save' %}</button>
<div data-service-id="{{ service.Extra.service_id }}"
data-slug="{{ service.slug }}"
class="bo-block service-block {{ service.Extra.service_id }}-block"
{% if service.wants_frequent_checks %}data-wants-check="true"{% endif %}>
<h3>{{ service.title }} <span class="slug">[{{service.slug}},
<a href="{{service.base_url}}">{{service.base_url}}</a>]</span></h3>
{% if not service.is_operational %}
{% if service.wants_frequent_checks %}
<p class="info being-deployed">
{% trans 'This service is still being deployed.' %}
</p>
{% else %}
<p class="warning">
{% trans 'This service is not operational.' %}
<a rel="popup" class="icon-remove-sign" href="{% url 'delete-service' service=service.Extra.service_id slug=service.slug %}" title="{% trans 'Delete service' %}"></a>
</p>
{% endif %}
{% endif %}
<form class="small" method="post" action=" {{ service|save_url }}" >
{% csrf_token %}
{{ service|as_update_form }}
<button class="enable-on-change" disabled="disabled">{% trans 'Save' %}</button>
<h4 class="custom-variables untoggled">{% trans "Custom variables" %}</h4>
<div>
{% for variable in service.variables.all %}
{% if not variable.auto %}
<p class="variable">
<label data-variable-id="{{ variable.id }}">{{ variable.get_field_label }}</label>
<input type="text" size="80" value="{{ variable.value }}" readonly>
<a rel="popup" class="update-variable" href="{% url 'update-variable' pk=variable.id %}" title="{% trans 'Update variable' %}">{% trans 'edit' %}</a>
<a rel="popup" class="icon-remove-sign" href="{% url 'delete-variable' pk=variable.id %}" title="{% trans 'Delete variable' %}"></a>
</p>
{% endif %}
{% endfor %}
<a rel="popup" class="button" href="{% url 'new-variable-service' service=service.Extra.service_id slug=service.slug %}">{% trans 'Add new variable' %}</a>
<h4 class="custom-variables untoggled">{% trans "Custom variables" %}</h4>
<div>
{% for variable in service.variables.all %}
{% if not variable.auto %}
<p class="variable">
<label data-variable-id="{{ variable.id }}">{{ variable.get_field_label }}</label>
<input type="text" size="80" value="{{ variable.value }}" readonly>
<a rel="popup" class="update-variable" href="{% url 'update-variable' pk=variable.id %}" title="{% trans 'Update variable' %}">{% trans 'edit' %}</a>
<a rel="popup" class="icon-remove-sign" href="{% url 'delete-variable' pk=variable.id %}" title="{% trans 'Delete variable' %}"></a>
</p>
{% endif %}
{% endfor %}
<a rel="popup" class="button" href="{% url 'new-variable-service' service=service.Extra.service_id slug=service.slug %}">{% trans 'Add new variable' %}</a>
</div>
</form>
{% if service.legacy_urls %}
<h4>
{% blocktrans count counter=service.legacy_urls|length %}
Legacy URL
{% plural%}
Legacy URLS
{% endblocktrans %}
</h4>
<ul>
{% for legacy_url in service.legacy_urls %}
<li>{{ legacy_url.base_url }} {% if legacy_url.datetime %}({% trans 'until' %} {{ legacy_url.datetime }}){% endif %}</li>
{% endfor %}
</ul>
{% endif%}
</div>
</form>
{% if service.legacy_urls %}
<h4>
{% blocktrans count counter=service.legacy_urls|length %}
Legacy URL
{% plural%}
Legacy URLS
{% endblocktrans %}
</h4>
<ul>
{% for legacy_url in service.legacy_urls %}
<li>{{ legacy_url.base_url }} {% if legacy_url.datetime %}({% trans 'until' %} {{ legacy_url.datetime }}){% endif %}</li>
{% endfor %}
</ul>
{% endif%}
</div>
{% endfor %}
{% endblock %}
{% block page-end %}
<script>
jQuery.fn.extend({
operational_check: function() {
return this.each(function() {
var div = $(this)
var p_info = $(div).find('p.info');
var url = 'check_operational/' + $(div).data('service-id') + '/' + $(div).data('slug');
$.getJSON(url, function(data) {
if (data.operational == true) {
$(p_info).hide('size');
} else {
setTimeout(function() { $(div).operational_check(); }, 10000);
<script>
jQuery.fn.extend({
operational_check: function() {
return this.each(function() {
var div = $(this)
var p_info = $(div).find('p.info');
var url = 'check_operational/' + $(div).data('service-id') + '/' + $(div).data('slug');
$.getJSON(url, function(data) {
if (data.operational == true) {
$(p_info).hide('size');
} else {
setTimeout(function() { $(div).operational_check(); }, 10000);
}
});
});
}
});
$(function() {
/* turn the new service links into a select box */
var select_new_service = $('<select><option></option></select>').insertAfter($('#new-service'));
$('#new-service').hide();
$('#new-service a').each(function(index, element) {
var text = $(element).text();
var option = $('<option value="' + $(element).data('service') + '">' + text + "</option>"
).appendTo(select_new_service);
});
$(select_new_service).change(function() {
var service_id = $(this).val();
if (service_id) {
$('#new-service a[data-service=' + service_id + ']').click();
$(this).val('');
}
});
$('a.update-variable').hide();
$('p.variable label, p.variable input').click(function() {
$(this).parent().find('a.update-variable').click();
});
$("div[data-wants-check='true']").each(function(index, element) {
$(element).operational_check();
});
$('button.enable-on-change').each(function(index, element) {
var button = $(element);
$(element).parent('form').find('input').on('change keydown',
function() { $(button).prop('disabled', null); });
});
});
}
});
$(function() {
/* turn the new service links into a select box */
var select_new_service = $('<select><option></option></select>').insertAfter($('#new-service'));
$('#new-service').hide();
$('#new-service a').each(function(index, element) {
var text = $(element).text();
var option = $('<option value="' + $(element).data('service') + '">' + text + "</option>"
).appendTo(select_new_service);
});
$(select_new_service).change(function() {
var service_id = $(this).val();
if (service_id) {
$('#new-service a[data-service=' + service_id + ']').click();
$(this).val('');
}
});
$('a.update-variable').hide();
$('p.variable label, p.variable input').click(function() {
$(this).parent().find('a.update-variable').click();
});
$("div[data-wants-check='true']").each(function(index, element) {
$(element).operational_check();
});
$('button.enable-on-change').each(function(index, element) {
var button = $(element);
$(element).parent('form').find('input').on('change keydown',
function() { $(button).prop('disabled', null); });
});
});
</script>
</script>
{% endblock %}

View File

@ -2,21 +2,21 @@
{% load i18n %}
{% block appbar %}
<h2>{% trans "Parameters Import" %}</h2>
<h2>{% trans "Parameters Import" %}</h2>
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'environment-import' %}">{% trans 'Parameters Import' %}</a>
{{ block.super }}
<a href="{% url 'environment-import' %}">{% trans 'Parameters Import' %}</a>
{% 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 '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 'home' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

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

View File

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

View File

@ -6,19 +6,19 @@
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'environment-variables' %}">{% trans 'Variables' %}</a>
{{ block.super }}
<a href="{% url 'environment-variables' %}">{% trans 'Variables' %}</a>
{% endblock %}
{% block content %}
<form class="small">
{% for variable in variables %}
<p class="variable">
<label data-variable-id="{{ variable.id }}">{{ variable.get_field_label }}</label>
<input type="text" size="80" value="{{ variable.value }}" readonly>
<a rel="popup" class="update-variable" href="{% url 'update-variable' pk=variable.id %}" title="{% trans 'Update variable' %}">{% trans 'edit' %}</a>
<a rel="popup" class="icon-remove-sign" href="{% url 'delete-variable' pk=variable.id %}" title="{% trans 'Delete variable' %}"></a>
</p>
<p class="variable">
<label data-variable-id="{{ variable.id }}">{{ variable.get_field_label }}</label>
<input type="text" size="80" value="{{ variable.value }}" readonly>
<a rel="popup" class="update-variable" href="{% url 'update-variable' pk=variable.id %}" title="{% trans 'Update variable' %}">{% trans 'edit' %}</a>
<a rel="popup" class="icon-remove-sign" href="{% url 'delete-variable' pk=variable.id %}" title="{% trans 'Delete variable' %}"></a>
</p>
{% endfor %}
<a rel="popup" class="button" href="{% url 'new-variable' %}">{% trans 'Add new variable' %}</a>
</form>
@ -27,19 +27,19 @@
{% block page-end %}
<script>
$(function() {
$('a.update-variable').hide();
$('p.variable label, p.variable input').click(function() {
$(this).parent().find('a.update-variable').click();
});
<script>
$(function() {
$('a.update-variable').hide();
$('p.variable label, p.variable input').click(function() {
$(this).parent().find('a.update-variable').click();
});
$('button.enable-on-change').each(function(index, element) {
var button = $(element);
$(element).parent('form').find('input').on('change keydown',
function() { $(button).prop('disabled', null); });
});
});
</script>
$('button.enable-on-change').each(function(index, element) {
var button = $(element);
$(element).parent('form').find('input').on('change keydown',
function() { $(button).prop('disabled', null); });
});
});
</script>
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'franceconnect-home' %}">FranceConnect</a>
{{ block.super }}
<a href="{% url 'franceconnect-home' %}">FranceConnect</a>
{% endblock %}
{% block appbar %}
@ -12,13 +12,13 @@
{% block content %}
<div class="pk-information">
<p>
{% trans "FranceConnect configuration screen has been moved next to other authentication methods." %}
</p>
<p>
<a class="pk-button" href="{{ idp_url }}manage/authenticators/">{% trans "Go to authentication methods configuration screen" %}</a>
</p>
</div>
<div class="pk-information">
<p>
{% trans "FranceConnect configuration screen has been moved next to other authentication methods." %}
</p>
<p>
<a class="pk-button" href="{{ idp_url }}manage/authenticators/">{% trans "Go to authentication methods configuration screen" %}</a>
</p>
</div>
{% endblock %}

View File

@ -2,20 +2,20 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'maintenance-home' %}">{% trans "Maintenance" %}</a>
{{ block.super }}
<a href="{% url 'maintenance-home' %}">{% trans "Maintenance" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'Maintenance' %}</h2>
<h2>{% trans 'Maintenance' %}</h2>
{% endblock %}
{% block content %}
<form action="." method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button>{% trans "Submit" %}</button>
</div>
</form>
<form action="." method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button>{% trans "Submit" %}</button>
</div>
</form>
{% endblock %}

View File

@ -6,15 +6,15 @@
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>
{% trans "Are you sure you want to disable user tracking support?" %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Disable" %}</button>
<a class="cancel" href="{% url 'matomo-home' %}">{% trans "Cancel" %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<p>
{% trans "Are you sure you want to disable user tracking support?" %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Disable" %}</button>
<a class="cancel" href="{% url 'matomo-home' %}">{% trans "Cancel" %}</a>
</div>
</form>
{% endblock %}

View File

@ -6,15 +6,15 @@
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>
{% trans "Are you sure you want to enable automatic user tracking support?" %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Enable" %}</button>
<a class="cancel" href="{% url 'matomo-home' %}">{% trans "Cancel" %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<p>
{% trans "Are you sure you want to enable automatic user tracking support?" %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Enable" %}</button>
<a class="cancel" href="{% url 'matomo-home' %}">{% trans "Cancel" %}</a>
</div>
</form>
{% endblock %}

View File

@ -6,15 +6,15 @@
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<p>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<p>
<div class="buttons">
<button class="submit-button">{% trans "Enable" %}</button>
<a class="cancel" href="{% url 'matomo-home' %}">{% trans "Cancel" %}</a>
</div>
</form>
<div class="buttons">
<button class="submit-button">{% trans "Enable" %}</button>
<a class="cancel" href="{% url 'matomo-home' %}">{% trans "Cancel" %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,100 +2,100 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'matomo-home' %}">Matomo</a>
{{ block.super }}
<a href="{% url 'matomo-home' %}">Matomo</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "User tracking" %}</h2>
{% if enabled %}
<span class="actions">
<a rel="popup" href="{% url 'matomo-disable' %}">{% trans 'Disable' %}</a>
{% if mode == 'auto' %}
<a href={{ logme_url }}>{% trans "Open visit tracking dashboard" %}</a>
<h2>{% trans "User tracking" %}</h2>
{% if enabled %}
<span class="actions">
<a rel="popup" href="{% url 'matomo-disable' %}">{% trans 'Disable' %}</a>
{% if mode == 'auto' %}
<a href={{ logme_url }}>{% trans "Open visit tracking dashboard" %}</a>
{% endif %}
</span>
{% endif %}
</span>
{% endif %}
{% endblock %}
{% block content %}
<div class="infonotice">
{% if not enabled %}
<p>
{% blocktrans %}
The audience measurement tools are deployed to obtain information about
visitor navigation. They help to understand where users come from on a site
and reconstruct their browsing activity. These tools use technologies that
permit to trace users on your site and associate a "referrer" or campaign
with a unique identifier.
{% endblocktrans %}
</p>
{% if ws_available %}
<p>
{% blocktrans %}
Publik can automatically use a tool called "Matomo", which is the tracker
solution recommended by the National Commission for Data Protection and Liberties (<a
href="https://www.cnil.fr/fr/solutions-pour-les-cookies-de-mesure-daudience">CNIL-France</a>).
{% endblocktrans %}
</p>
<div class="infonotice">
{% if not enabled %}
<p>
{% blocktrans %}
The audience measurement tools are deployed to obtain information about
visitor navigation. They help to understand where users come from on a site
and reconstruct their browsing activity. These tools use technologies that
permit to trace users on your site and associate a "referrer" or campaign
with a unique identifier.
{% endblocktrans %}
</p>
{% if ws_available %}
<p>
{% blocktrans %}
Publik can automatically use a tool called "Matomo", which is the tracker
solution recommended by the National Commission for Data Protection and Liberties (<a
href="https://www.cnil.fr/fr/solutions-pour-les-cookies-de-mesure-daudience">CNIL-France</a>).
{% endblocktrans %}
</p>
{% else %}
<p>
{% blocktrans %}
Matomo is the tracker solution recommended by the National Commission for Data
Protection and Liberties (<a
href="https://www.cnil.fr/fr/solutions-pour-les-cookies-de-mesure-daudience">CNIL-France</a>).
It requires <a href="https://www.cnil.fr/sites/default/files/typo/document/Configuration_piwik.pdf"
>little configuration</a> to be exempt from legal consent.
{% endblocktrans %}
</p>
{% endif %}
{% else %}
<p>
{% blocktrans %}
Matomo is the tracker solution recommended by the National Commission for Data
Protection and Liberties (<a
href="https://www.cnil.fr/fr/solutions-pour-les-cookies-de-mesure-daudience">CNIL-France</a>).
It requires <a href="https://www.cnil.fr/sites/default/files/typo/document/Configuration_piwik.pdf"
>little configuration</a> to be exempt from legal consent.
{% endblocktrans %}
</p>
{% endif %}
{% else %}
{% if mode == 'manual' %}
{% trans "Manual configuration." %}
{% elif mode == 'auto' %}
{% trans "Automatic configuration." %}
{% endif %}
{% endif %}
</div>
{% if not enabled %}
<p>
{% trans "Support is currently disabled." %}
</p>
<p>
<a class="button" rel="popup" href="{% url 'matomo-enable-manual' %}">{% trans 'Manual Configuration' %}</a>
{% if ws_available %}
<a class="button" rel="popup" href="{% url 'matomo-enable-auto' %}">{% trans 'Automatic Configuration' %}</a>
{% endif %}
</p>
{% else %}
{% if tracking_js != '' %}
{% if cnil_ack_level == 'excellent' %}
<div class="successnotice">
{% trans "Excellent respect of user rights." %}
</div>
{% elif cnil_ack_level == 'good' %}
<div class="warningnotice">
{% trans "Good respect of user rights." %}
</div>
{% elif cnil_ack_level == 'bad' %}
<div class="errornotice">
{% trans "No respect of user rights." %}
</div>
{% endif %}
{% endif %}
{% if mode == 'manual' %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
{% if mode == 'manual' %}
{% trans "Manual configuration." %}
{% elif mode == 'auto' %}
{% trans "Automatic configuration." %}
{% endif %}
{% endif %}
</div>
</form>
{% endif %}
{% endif %}
{% if not enabled %}
<p>
{% trans "Support is currently disabled." %}
</p>
<p>
<a class="button" rel="popup" href="{% url 'matomo-enable-manual' %}">{% trans 'Manual Configuration' %}</a>
{% if ws_available %}
<a class="button" rel="popup" href="{% url 'matomo-enable-auto' %}">{% trans 'Automatic Configuration' %}</a>
{% endif %}
</p>
{% else %}
{% if tracking_js != '' %}
{% if cnil_ack_level == 'excellent' %}
<div class="successnotice">
{% trans "Excellent respect of user rights." %}
</div>
{% elif cnil_ack_level == 'good' %}
<div class="warningnotice">
{% trans "Good respect of user rights." %}
</div>
{% elif cnil_ack_level == 'bad' %}
<div class="errornotice">
{% trans "No respect of user rights." %}
</div>
{% endif %}
{% endif %}
{% if mode == 'manual' %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
</div>
</form>
{% endif %}
{% endif %}
{% endblock %}

View File

@ -3,17 +3,17 @@
{% block content %}
<form method="post" enctype="multipart/form-data">
<div id="profile-form-content">
{% csrf_token %}
{{ form.as_p }}
</div>
{% block buttons %}
<form method="post" enctype="multipart/form-data">
<div id="profile-form-content">
{% csrf_token %}
{{ form.as_p }}
</div>
{% block buttons %}
<div class="buttons">
<button class="submit-button">{% trans 'Save' %}</button>
<a class="cancel" href="{% url 'profile-home' %}">{% trans 'Cancel' %}</a>
</div>
{% endblock %}
</form>
{% endblock %}
</form>
{% endblock %}

View File

@ -2,32 +2,32 @@
{% load i18n service %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'profile-home' %}">{% trans 'User Profile' %}</a>
{{ block.super }}
<a href="{% url 'profile-home' %}">{% trans 'User Profile' %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'User Profile' %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'profile-add-attribute' %}">{% trans 'New attribute' %}</a>
<a rel="popup" href="{% url 'profile-add-attribute' %}">{% trans 'New attribute' %}</a>
</span>
{% endblock %}
{% block content %}
<p class="hint">
{% blocktrans %}
Use drag and drop with the ⣿ handles to reorder the profile fields.
{% endblocktrans %}
</p>
<p class="hint">
{% blocktrans %}
Use drag and drop with the ⣿ handles to reorder the profile fields.
{% endblocktrans %}
</p>
<div class="objects-list" id="attributes-list" data-reorder-url="{% url 'profile-reorder' %}">
{% for object in object_list %}
<div data-attribute-id="{{object.id}}" {% if object.disabled %}class="disabled"{% endif %}>
<span class="handle"></span> <span class="label">{{object.label}} <span class="extra-info">({{object.get_real_kind_display}}, "{{ object.name }}")</span></span>
<a rel="popup" href="{% url 'profile-attribute-options' name=object.name %}">{% trans 'options' %}</a>
</div>
{% endfor %}
</div>
<div class="objects-list" id="attributes-list" data-reorder-url="{% url 'profile-reorder' %}">
{% for object in object_list %}
<div data-attribute-id="{{object.id}}" {% if object.disabled %}class="disabled"{% endif %}>
<span class="handle"></span> <span class="label">{{object.label}} <span class="extra-info">({{object.get_real_kind_display}}, "{{ object.name }}")</span></span>
<a rel="popup" href="{% url 'profile-attribute-options' name=object.name %}">{% trans 'options' %}</a>
</div>
{% endfor %}
</div>
{% endblock %}

View File

@ -6,15 +6,15 @@
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<p>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<p>
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'seo-home' %}">{% trans "Cancel" %}</a>
</div>
</form>
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'seo-home' %}">{% trans "Cancel" %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,69 +2,69 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'seo-home' %}">Se</a>
{{ block.super }}
<a href="{% url 'seo-home' %}">Se</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'Indexing Settings' %}</h2>
<span class="actions">
<a
rel="popup" href="{% url 'robots-customize' %}">
{% if mode == 'customize' %}{% trans "Change custom settings" %}
{% else %}{% trans 'Use custom settings' %}{% endif %}
</a>
<a
{% if mode == 'disallow' %}class="disabled"{% endif %}
href="{% url 'robots-disallow' %}">
{% trans 'Do not allow indexing' %}
</a>
<a
{% if mode == 'allow' %}class="disabled"{% endif %}
href="{% url 'robots-allow' %}">
{% trans 'Allow indexing' %}
</a>
</span>
<h2>{% trans 'Indexing Settings' %}</h2>
<span class="actions">
<a
rel="popup" href="{% url 'robots-customize' %}">
{% if mode == 'customize' %}{% trans "Change custom settings" %}
{% else %}{% trans 'Use custom settings' %}{% endif %}
</a>
<a
{% if mode == 'disallow' %}class="disabled"{% endif %}
href="{% url 'robots-disallow' %}">
{% trans 'Do not allow indexing' %}
</a>
<a
{% if mode == 'allow' %}class="disabled"{% endif %}
href="{% url 'robots-allow' %}">
{% trans 'Allow indexing' %}
</a>
</span>
{% endblock %}
{% block content %}
<div class="infonotice">
<div class="infonotice">
{% blocktrans %}
Robots are programs that automatically traverse web sites.
Web site owners can use a <tt>robots.txt</tt> file to give
instructions about their site.
Robots are programs that automatically traverse web sites.
Web site owners can use a <tt>robots.txt</tt> file to give
instructions about their site.
{% endblocktrans %}
</div>
</div>
{% if mode == 'allow' %}
<div class="successnotice">
{% trans "Web Robots are currently allowed." %}
</div>
{% endif %}
{% if mode == 'disallow' %}
<div class="warningnotice">
{% trans "Web Robots are currently not allowed." %}
</div>
{% endif %}
{% if mode == 'customize' or mode == 'disallow' %}
<div class="section padded">
<span>{% trans "Contents of robots.txt file:" %}</span>
<pre>{{ robots_txt }}</pre>
</div>
{% endif %}
{% if mode == 'customize' or mode == 'allow' %}
<div class="section padded">
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
{% if mode == 'allow' %}
<div class="successnotice">
{% trans "Web Robots are currently allowed." %}
</div>
</form>
</div>
{% endif %}
{% endif %}
{% if mode == 'disallow' %}
<div class="warningnotice">
{% trans "Web Robots are currently not allowed." %}
</div>
{% endif %}
{% if mode == 'customize' or mode == 'disallow' %}
<div class="section padded">
<span>{% trans "Contents of robots.txt file:" %}</span>
<pre>{{ robots_txt }}</pre>
</div>
{% endif %}
{% if mode == 'customize' or mode == 'allow' %}
<div class="section padded">
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
</div>
</form>
</div>
{% endif %}
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'sms-home' %}">{% trans 'SMS' %}</a>
{{ block.super }}
<a href="{% url 'sms-home' %}">{% trans 'SMS' %}</a>
{% endblock %}
{% block appbar %}
@ -12,13 +12,13 @@
{% block content %}
<form action="." method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button>{% trans "Submit" %}</button>
</div>
</form>
<form action="." method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button>{% trans "Submit" %}</button>
</div>
</form>
{% endblock %}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block content %}
<h4>
{% trans "You have no permission to access this page" %}
</h4>
<h4>
{% trans "You have no permission to access this page" %}
</h4>
{% endblock %}

View File

@ -5,19 +5,19 @@
{% block site-title %}{% trans "System" %}{% endblock %}
{% block css %}
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/style.css"/>
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/style.css"/>
{% endblock %}
{% if user.is_authenticated %}
{% block logout-url %}
{% url "logout" %}
{% endblock %}
{% block logout-url %}
{% url "logout" %}
{% endblock %}
{% endif %}
{% block extrascripts %}
{{ block.super }}
<script src="{% static "admin/js/urlify.js" %}"></script>
<script src="{% static "js/hobo.js" %}"></script>
{{ block.super }}
<script src="{% static "admin/js/urlify.js" %}"></script>
<script src="{% static "js/hobo.js" %}"></script>
{% endblock %}
{% block homepage-url %}
@ -30,8 +30,8 @@
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
{% if manager_homepage_url %}
<a href="{% url 'home' %}">{% trans 'System' %}</a>
{% endif %}
{{ block.super }}
{% if manager_homepage_url %}
<a href="{% url 'home' %}">{% trans 'System' %}</a>
{% endif %}
{% endblock %}

View File

@ -4,119 +4,119 @@
{% block appbar %}
<h2>{% trans 'System' %}</h2>
<span class="actions">
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
<li><a rel="popup" href="{% url 'environment-import' %}">{% trans 'Import' %}</a></li>
<li><a href="{% url 'environment-export' %}">{% trans 'Export' %}</a></li>
</ul>
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
<li><a rel="popup" href="{% url 'environment-import' %}">{% trans 'Import' %}</a></li>
<li><a href="{% url 'environment-export' %}">{% trans 'Export' %}</a></li>
</ul>
</span>
{% endblock %}
{% block content %}
{% if services %}
<div class="services">
{% for service in services %}
<a href="{{ service.base_url }}" class="service-link" data-service-slug="{{ service.slug }}">
<div class="service" data-service-slug="{{ service.slug }}">
<h3 class="service-title">{{ service.title }} <span class="service-url">{{ service.base_url }}</span></h3>
<p class="service-status-items">
<span class="checking">{% trans "checking..." %}</span>
<span style="display: none" class="dns">{% trans "DNS" %}</span>
<span style="display: none" class="certificate">{% trans "Certificate" %}</span>
<span style="display: none" class="web">{% trans "Web" %}</span>
<span style="display: none" class="security">{% trans "Security" %}</span>
</p>
</div>
</a>
{% endfor %}
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This deployment doesn't have any service deployed yet. Click on the
"Services" menu entry in the top right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% if services %}
<div class="services">
{% for service in services %}
<a href="{{ service.base_url }}" class="service-link" data-service-slug="{{ service.slug }}">
<div class="service" data-service-slug="{{ service.slug }}">
<h3 class="service-title">{{ service.title }} <span class="service-url">{{ service.base_url }}</span></h3>
<p class="service-status-items">
<span class="checking">{% trans "checking..." %}</span>
<span style="display: none" class="dns">{% trans "DNS" %}</span>
<span style="display: none" class="certificate">{% trans "Certificate" %}</span>
<span style="display: none" class="web">{% trans "Web" %}</span>
<span style="display: none" class="security">{% trans "Security" %}</span>
</p>
</div>
</a>
{% endfor %}
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This deployment doesn't have any service deployed yet. Click on the
"Services" menu entry in the top right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
<script>
$(function() {
$.ajax({
url: '/api/health/',
success: function(response, status) {
$('[data-service-slug]').each(function(idx, service_block) {
var $service_block = $(service_block);
var service_slug = $service_block.data('service-slug');
var service = response.data[service_slug];
var ok = true;
if (service.is_resolvable) {
$service_block.find('.dns').addClass('op-ok');
} else {
$service_block.find('.dns').addClass('op-nok');
ok = false;
}
if (service.has_valid_certificate) {
$service_block.find('.certificate').addClass('op-ok');
} else {
$service_block.find('.certificate').addClass('op-nok');
ok = false;
}
if (service.is_running) {
$service_block.find('.web').addClass('op-ok');
} else {
$service_block.find('.web').addClass('op-nok');
ok = false;
}
$service_block.find('.security').addClass('sec-' + service.security_data.level);
$service_block.find('.security').attr('title', service.security_data.label);
<script>
$(function() {
$.ajax({
url: '/api/health/',
success: function(response, status) {
$('[data-service-slug]').each(function(idx, service_block) {
var $service_block = $(service_block);
var service_slug = $service_block.data('service-slug');
var service = response.data[service_slug];
var ok = true;
if (service.is_resolvable) {
$service_block.find('.dns').addClass('op-ok');
} else {
$service_block.find('.dns').addClass('op-nok');
ok = false;
}
if (service.has_valid_certificate) {
$service_block.find('.certificate').addClass('op-ok');
} else {
$service_block.find('.certificate').addClass('op-nok');
ok = false;
}
if (service.is_running) {
$service_block.find('.web').addClass('op-ok');
} else {
$service_block.find('.web').addClass('op-nok');
ok = false;
}
$service_block.find('.security').addClass('sec-' + service.security_data.level);
$service_block.find('.security').attr('title', service.security_data.label);
var $service_p = $service_block.find('span.checking')
$service_block.find('span').show();
$service_p.hide();
if (ok) {
$service_block.addClass('op-ok');
} else {
$service_block.addClass('op-nok');
var $service_p = $service_block.find('span.checking')
$service_block.find('span').show();
$service_p.hide();
if (ok) {
$service_block.addClass('op-ok');
} else {
$service_block.addClass('op-nok');
}
});
}
});
}
});
});
</script>
});
</script>
{% endblock %}
{% block sidebar %}
<aside id="sidebar">
<h3>{% trans "Settings" %}</h3>
<aside id="sidebar">
<h3>{% trans "Settings" %}</h3>
{% if has_authentic %}
<a class="button button-paragraph" href="{% url 'profile-home' %}">{% trans 'User Profile' %}</a>
{% endif %}
<a class="button button-paragraph" href="{% url 'theme-home' %}">{% trans 'Theme' %}
{% if not has_global_title %}
<p class="warning">
{% trans 'You have not yet defined a name for the platform; the generic title "Compte Citoyen" is used.' %}
</p>
{% endif %}
</a>
<a class="button button-paragraph" href="{% url 'emails-home' %}">{% trans 'Emails' %}
{% if not has_default_from_email %}
<p class="warning">
{% trans "You have not yet defined an address for emails sent by Publik." %}
</p>
{% endif %}
</a>
<a class="button button-paragraph" href="{% url 'sms-home' %}">{% trans 'SMS' %}</a>
{% if has_authentic %}
<a class="button button-paragraph" href="{% url 'franceconnect-home' %}">FranceConnect</a>
{% endif %}
<a class="button button-paragraph" href="{% url 'matomo-home' %}">{% trans 'User tracking' %}</a>
<a class="button button-paragraph" href="{% url 'seo-home' %}">{% trans 'Indexing' %}</a>
<a class="button button-paragraph" href="{% url 'environment-home' %}">{% trans 'Services' %}</a>
<a class="button button-paragraph" href="{% url 'environment-variables' %}">{% trans 'Variables' %}</a>
<a class="button button-paragraph" href="{% url 'debug-home' %}">{% trans 'Debugging' %}</a>
{% if show_maintenance_menu %}<a class="button button-paragraph" href="{% url 'maintenance-home' %}">{% trans 'Maintenance' %}</a>{% endif %}
</aside>
{% if has_authentic %}
<a class="button button-paragraph" href="{% url 'profile-home' %}">{% trans 'User Profile' %}</a>
{% endif %}
<a class="button button-paragraph" href="{% url 'theme-home' %}">{% trans 'Theme' %}
{% if not has_global_title %}
<p class="warning">
{% trans 'You have not yet defined a name for the platform; the generic title "Compte Citoyen" is used.' %}
</p>
{% endif %}
</a>
<a class="button button-paragraph" href="{% url 'emails-home' %}">{% trans 'Emails' %}
{% if not has_default_from_email %}
<p class="warning">
{% trans "You have not yet defined an address for emails sent by Publik." %}
</p>
{% endif %}
</a>
<a class="button button-paragraph" href="{% url 'sms-home' %}">{% trans 'SMS' %}</a>
{% if has_authentic %}
<a class="button button-paragraph" href="{% url 'franceconnect-home' %}">FranceConnect</a>
{% endif %}
<a class="button button-paragraph" href="{% url 'matomo-home' %}">{% trans 'User tracking' %}</a>
<a class="button button-paragraph" href="{% url 'seo-home' %}">{% trans 'Indexing' %}</a>
<a class="button button-paragraph" href="{% url 'environment-home' %}">{% trans 'Services' %}</a>
<a class="button button-paragraph" href="{% url 'environment-variables' %}">{% trans 'Variables' %}</a>
<a class="button button-paragraph" href="{% url 'debug-home' %}">{% trans 'Debugging' %}</a>
{% if show_maintenance_menu %}<a class="button button-paragraph" href="{% url 'maintenance-home' %}">{% trans 'Maintenance' %}</a>{% endif %}
</aside>
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "hobo/base.html" %}
{% block content %}
{% block mellon_content %}
{% endblock %}
{% block mellon_content %}
{% endblock %}
{% endblock %}
{% block extrascripts %}
{% block mellon_extrascripts %}
{% endblock %}
{% block mellon_extrascripts %}
{% endblock %}
{% endblock %}

View File

@ -2,15 +2,15 @@
{% load i18n %}
{% block appbar %}
<h2>{% trans "Authentication" %}</h2>
<h2>{% trans "Authentication" %}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<ul class="login">
{{ form.as_ul }}
<li><button>{% trans "Log in" %}</button></li>
</ul>
</form>
<form method="post">
{% csrf_token %}
<ul class="login">
{{ form.as_ul }}
<li><button>{% trans "Log in" %}</button></li>
</ul>
</form>
{% endblock %}

View File

@ -2,31 +2,31 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'theme-home' %}">{% trans 'Theme' %}</a>
{{ block.super }}
<a href="{% url 'theme-home' %}">{% trans 'Theme' %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'Theme' %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'theme-options' %}">{% trans 'Options' %}</a>
<a rel="popup" href="{% url 'theme-options' %}">{% trans 'Options' %}</a>
</span>
{% endblock %}
{% block content %}
<form action="{% url 'theme-select' %}" method="post">
{% csrf_token %}
<div class="objects-list" id="themes-list">
{% for theme in themes %}
<div data-id="{{theme.id}}">
<label style="border-color: {{theme.variables.theme_color}}"><input type="radio" name="theme" value="{{theme.id}}" {% if theme.id == selected_theme %}checked="checked"{% endif %}/>{{theme.label}}</label>
</div>
{% endfor %}
</div>
<div class="buttons">
<button>{% trans "Submit" %}</button>
</div>
</form>
<form action="{% url 'theme-select' %}" method="post">
{% csrf_token %}
<div class="objects-list" id="themes-list">
{% for theme in themes %}
<div data-id="{{theme.id}}">
<label style="border-color: {{theme.variables.theme_color}}"><input type="radio" name="theme" value="{{theme.id}}" {% if theme.id == selected_theme %}checked="checked"{% endif %}/>{{theme.label}}</label>
</div>
{% endfor %}
</div>
<div class="buttons">
<button>{% trans "Submit" %}</button>
</div>
</form>
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'theme-home' %}">{% trans 'Theme' %}</a>
{{ block.super }}
<a href="{% url 'theme-home' %}">{% trans 'Theme' %}</a>
{% endblock %}
{% block appbar %}
@ -12,13 +12,13 @@
{% block content %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Submit" %}</button>
<a class="cancel" href=".">{% trans "Cancel" %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Submit" %}</button>
<a class="cancel" href=".">{% trans "Cancel" %}</a>
</div>
</form>
{% endblock %}