misc: apply djhtml (#69419)
This commit is contained in:
parent
7c768be73d
commit
dfdbaf2b8a
|
@ -8,27 +8,27 @@
|
|||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div {% if onload %}onload="{{ onload }}"{% endif %}>
|
||||
<div id="page">
|
||||
<div id="top">
|
||||
{% block header %}
|
||||
<h1>WIP/DJANGO - {% if title %}{{ title }}{% else %}{{ site_name }}{% endif %}</h1>
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div id="main-content">
|
||||
{% block content %}
|
||||
{{ prelude }}
|
||||
<div {% if onload %}onload="{{ onload }}"{% endif %}>
|
||||
<div id="page">
|
||||
<div id="top">
|
||||
{% block header %}
|
||||
<h1>WIP/DJANGO - {% if title %}{{ title }}{% else %}{{ site_name }}{% endif %}</h1>
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div id="main-content">
|
||||
{% block content %}
|
||||
{{ prelude }}
|
||||
|
||||
{% if breadcrumb %}
|
||||
<p id="breadcrumb">{{ breadcrumb|safe }}</p>
|
||||
{% endif %}
|
||||
{% if breadcrumb %}
|
||||
<p id="breadcrumb">{{ breadcrumb|safe }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% block body %}
|
||||
{{ body|safe }}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
{{ body|safe }}
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div id="footer">{{ footer }}</div>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div id="footer">{{ footer }}</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
|
||||
{% block body %}
|
||||
|
||||
<div>
|
||||
<h2>HELLO WORLD</h2>
|
||||
<div>
|
||||
<h2>HELLO WORLD</h2>
|
||||
|
||||
{% regroup forms by category as category_list %}
|
||||
{% for category in category_list %}
|
||||
{% if category.grouper %}<h3>{{ category.grouper }}</h3>{% endif %}
|
||||
<ul>
|
||||
{% for form in category.list %}
|
||||
<li><a href="{{ form.url }}">{{ form.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
{% regroup forms by category as category_list %}
|
||||
{% for category in category_list %}
|
||||
{% if category.grouper %}<h3>{{ category.grouper }}</h3>{% endif %}
|
||||
<ul>
|
||||
{% for form in category.list %}
|
||||
<li><a href="{{ form.url }}">{{ form.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{% extends "qommon/forms/widget.html" %}
|
||||
{% block widget-control %}
|
||||
<!-- TEST TEMPLATE -->
|
||||
<!-- backoffice: {{ request.is_in_backoffice|pprint }} -->
|
||||
<!-- backoffice compat: {{ request.quixote_request.is_in_backoffice|pprint }} -->
|
||||
<!-- substitution variable: {{ example_url }} -->
|
||||
<select id="form_{{widget.name}}" name="{{widget.name}}"
|
||||
<!-- TEST TEMPLATE -->
|
||||
<!-- backoffice: {{ request.is_in_backoffice|pprint }} -->
|
||||
<!-- backoffice compat: {{ request.quixote_request.is_in_backoffice|pprint }} -->
|
||||
<!-- substitution variable: {{ example_url }} -->
|
||||
<select id="form_{{widget.name}}" name="{{widget.name}}"
|
||||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}"{% endfor %}>
|
||||
<option value="">---</option>
|
||||
{% for option in widget.get_options %}
|
||||
<option{% for attr in option.attrs.items %} {{attr.0}}="{{attr.1}}"{% endfor %}
|
||||
<option value="">---</option>
|
||||
{% for option in widget.get_options %}
|
||||
<option{% for attr in option.attrs.items %} {{attr.0}}="{{attr.1}}"{% endfor %}
|
||||
>{{ option.description }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<div style="max-width: 60ex;">
|
||||
<div class="content">
|
||||
{% block content %}
|
||||
{{ content }}
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<div style="max-width: 60ex;">
|
||||
<div class="content">
|
||||
{% block content %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block footer %}
|
||||
{% if email_signature %}
|
||||
<div style="font-size: smaller; font-color: #888; margin-top: 2em;">
|
||||
{{ email_signature|linebreaks }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block footer %}
|
||||
{% if email_signature %}
|
||||
<div style="font-size: smaller; font-color: #888; margin-top: 2em;">
|
||||
{{ email_signature|linebreaks }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,45 +1,45 @@
|
|||
<div class="{% block widget-css-classes %}widget {{widget.class_name}} {{widget.extra_css_class}}
|
||||
{% if widget.readonly %}widget-readonly{% endif %}
|
||||
{% if widget.get_error %}widget-with-error{% endif %}
|
||||
{% if widget.is_required %}widget-required{% else %}widget-optional{% endif %}
|
||||
{% if widget.is_prefilled %}widget-prefilled{% endif %}{% endblock %}"
|
||||
{% block widget-attrs %}
|
||||
{% if widget.is_hidden %}style="display: none"{% endif %}
|
||||
{% if widget.field %}data-field-id="{{ widget.field.id }}"{% endif %}
|
||||
data-widget-name="{{ widget.name }}"
|
||||
{% if widget.div_id %}id="{{widget.div_id}}" data-valuecontainerid="form_{{widget.name}}"{% endif %}
|
||||
{% if widget.a11y_role %}role="{{ a11y_role }}"{% endif %}
|
||||
{% if widget.a11y_labelledby %}aria-labelledby="form_label_{{widget.name}}"{% endif %}
|
||||
{% for attr in widget.prefill_attributes %}
|
||||
data-{{attr}}="{{widget.prefill_attributes|get:attr}}"
|
||||
{% endfor %}
|
||||
{% if "data-dynamic-display-child-of" in widget.attrs %}
|
||||
data-dynamic-display-child-of="{{widget.attrs|get:"data-dynamic-display-child-of"}}"
|
||||
{% endif %}
|
||||
{% if "data-dynamic-display-value" in widget.attrs %}
|
||||
data-dynamic-display-value="{{widget.attrs|get:"data-dynamic-display-value"}}"
|
||||
{% endif %}
|
||||
{% if "data-dynamic-display-value-in" in widget.attrs %}
|
||||
data-dynamic-display-value-in="{{widget.attrs|get:"data-dynamic-display-value-in"}}"
|
||||
{% endif %}
|
||||
{% if widget.live_condition_source %}data-live-source="true"{% endif %}
|
||||
{% endblock %}
|
||||
>
|
||||
{% if widget.readonly %}widget-readonly{% endif %}
|
||||
{% if widget.get_error %}widget-with-error{% endif %}
|
||||
{% if widget.is_required %}widget-required{% else %}widget-optional{% endif %}
|
||||
{% if widget.is_prefilled %}widget-prefilled{% endif %}{% endblock %}"
|
||||
{% block widget-attrs %}
|
||||
{% if widget.is_hidden %}style="display: none"{% endif %}
|
||||
{% if widget.field %}data-field-id="{{ widget.field.id }}"{% endif %}
|
||||
data-widget-name="{{ widget.name }}"
|
||||
{% if widget.div_id %}id="{{widget.div_id}}" data-valuecontainerid="form_{{widget.name}}"{% endif %}
|
||||
{% if widget.a11y_role %}role="{{ a11y_role }}"{% endif %}
|
||||
{% if widget.a11y_labelledby %}aria-labelledby="form_label_{{widget.name}}"{% endif %}
|
||||
{% for attr in widget.prefill_attributes %}
|
||||
data-{{attr}}="{{widget.prefill_attributes|get:attr}}"
|
||||
{% endfor %}
|
||||
{% if "data-dynamic-display-child-of" in widget.attrs %}
|
||||
data-dynamic-display-child-of="{{widget.attrs|get:"data-dynamic-display-child-of"}}"
|
||||
{% endif %}
|
||||
{% if "data-dynamic-display-value" in widget.attrs %}
|
||||
data-dynamic-display-value="{{widget.attrs|get:"data-dynamic-display-value"}}"
|
||||
{% endif %}
|
||||
{% if "data-dynamic-display-value-in" in widget.attrs %}
|
||||
data-dynamic-display-value-in="{{widget.attrs|get:"data-dynamic-display-value-in"}}"
|
||||
{% endif %}
|
||||
{% if widget.live_condition_source %}data-live-source="true"{% endif %}
|
||||
{% endblock %}
|
||||
>
|
||||
{% block widget-title %}
|
||||
{{widget.rendered_title}}
|
||||
{{widget.rendered_title}}
|
||||
{% endblock %}
|
||||
{% block widget-content %}
|
||||
<div class="content {{widget.content.content_extra_css_class}}"
|
||||
{% for attr, value in widget.content_extra_attributes.items %}
|
||||
{{attr}}="{{value}}"
|
||||
{% endfor %}
|
||||
>
|
||||
{% block widget-error %}{{widget.rendered_error}}{% endblock %}
|
||||
{% block widget-control %}{{widget.render_content|safe}}{% endblock %}
|
||||
{% block widget-hint %}{{widget.rendered_hint}}{% endblock %}
|
||||
</div>
|
||||
<div class="content {{widget.content.content_extra_css_class}}"
|
||||
{% for attr, value in widget.content_extra_attributes.items %}
|
||||
{{attr}}="{{value}}"
|
||||
{% endfor %}
|
||||
>
|
||||
{% block widget-error %}{{widget.rendered_error}}{% endblock %}
|
||||
{% block widget-control %}{{widget.render_content|safe}}{% endblock %}
|
||||
{% block widget-hint %}{{widget.rendered_hint}}{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% if widget.render_br %}
|
||||
<br class="content {{widget.content.content_extra_css_class}}">
|
||||
<br class="content {{widget.content.content_extra_css_class}}">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block widget-attrs %}
|
||||
{{ block.super }} data-block-row="element{{ widget.index }}"
|
||||
{{ block.super }} data-block-row="element{{ widget.index }}"
|
||||
{% endblock %}
|
||||
|
||||
{% block widget-content %}
|
||||
{% for subwidget in widget.get_widgets %}
|
||||
{% if widget.readonly and not subwidget.field.include_in_validation_page %}<div style="display: none">{% endif %}
|
||||
{{ subwidget.render|safe }}
|
||||
{% if widget.readonly and not subwidget.field.include_in_validation_page %}</div>{% endif %}
|
||||
{% endfor %}
|
||||
{% if not widget.readonly and widget.remove_button %}<button class="remove-button" title="{% trans "Remove" %}"><span>-</span></button>{% endif %} {% endblock %}
|
||||
{% for subwidget in widget.get_widgets %}
|
||||
{% if widget.readonly and not subwidget.field.include_in_validation_page %}<div style="display: none">{% endif %}
|
||||
{{ subwidget.render|safe }}
|
||||
{% if widget.readonly and not subwidget.field.include_in_validation_page %}</div>{% endif %}
|
||||
{% endfor %}
|
||||
{% if not widget.readonly and widget.remove_button %}<button class="remove-button" title="{% trans "Remove" %}"><span>-</span></button>{% endif %} {% endblock %}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
{% extends "qommon/forms/widget.html" %}
|
||||
|
||||
{% block widget-control %}
|
||||
<ul {% if widget.inline %}class="inline"{% endif %} data-base-for-name="{{ widget.get_name_for_id }}_op_">
|
||||
{% for option in widget.get_options %}
|
||||
<li {% if option.disabled %}class="disabled"{% endif %}><label for="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}"><input
|
||||
id="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}"
|
||||
{% if option.selected %}checked="checked"
|
||||
{% elif widget.readonly or option.disabled %}disabled{% endif %}
|
||||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}" {% endfor %}
|
||||
type="checkbox"
|
||||
{% if widget.readonly %}value="yes" disabled {% else %}name="{{ option.name }}" value="yes"{% endif %}
|
||||
><span>{{ option.label }}</span></label>
|
||||
{% if widget.readonly and option.selected %}<input type="hidden" name="{{ option.name }}" value="yes">{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul {% if widget.inline %}class="inline"{% endif %} data-base-for-name="{{ widget.get_name_for_id }}_op_">
|
||||
{% for option in widget.get_options %}
|
||||
<li {% if option.disabled %}class="disabled"{% endif %}><label for="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}"><input
|
||||
id="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}"
|
||||
{% if option.selected %}checked="checked"
|
||||
{% elif widget.readonly or option.disabled %}disabled{% endif %}
|
||||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}" {% endfor %}
|
||||
type="checkbox"
|
||||
{% if widget.readonly %}value="yes" disabled {% else %}name="{{ option.name }}" value="yes"{% endif %}
|
||||
><span>{{ option.label }}</span></label>
|
||||
{% if widget.readonly and option.selected %}<input type="hidden" name="{{ option.name }}" value="yes">{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div {% if widget.field.id %}data-field-id="{{ widget.field.id }}"{% endif %}
|
||||
{% if widget.is_hidden %}style="display: none"{% endif %}
|
||||
class="comment-field {{widget.extra_css_class|default_if_none:"" }}">
|
||||
{% if widget.is_hidden %}style="display: none"{% endif %}
|
||||
class="comment-field {{widget.extra_css_class|default_if_none:"" }}">
|
||||
{% block widget-content %}
|
||||
{{ widget.content|safe }}
|
||||
{{ widget.content|safe }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
{% extends "qommon/forms/widget.html" %}
|
||||
|
||||
{% block widget-control %}
|
||||
{% if "readonly" in widget.attrs %}
|
||||
{# for readonly mode, add an hidden field with the correct value and a text #}
|
||||
{# input with the formated date value; this will avoid displaying the date in #}
|
||||
{# Y-m-d format, or including a date input with an ineffective reset × button. #}
|
||||
<input type="hidden" name="{{widget.name}}" {% if widget.value %}value="{{ widget.value|date:"Y-m-d" }}"{% endif %}>
|
||||
<input type="text" {% if widget.value %}value="{{ widget.value|date }}"{% endif %}
|
||||
{% else %}
|
||||
{# otherwise, use an <input type="date"> but also include js datetime picker #}
|
||||
{# attributes, in case it's not supported. #}
|
||||
<input name="{{widget.name}}" {% if widget.value %}value="{{ widget.value|date:"Y-m-d" }}"{% endif %}
|
||||
type="date"
|
||||
{% if widget.value %}data-formatted-value="{{ widget.value|default:"" }}"{% endif %}
|
||||
class="date-pick"
|
||||
data-date-format="{{widget.date_format}}"
|
||||
{% if "readonly" in widget.attrs %}
|
||||
{# for readonly mode, add an hidden field with the correct value and a text #}
|
||||
{# input with the formated date value; this will avoid displaying the date in #}
|
||||
{# Y-m-d format, or including a date input with an ineffective reset × button. #}
|
||||
<input type="hidden" name="{{widget.name}}" {% if widget.value %}value="{{ widget.value|date:"Y-m-d" }}"{% endif %}>
|
||||
<input type="text" {% if widget.value %}value="{{ widget.value|date }}"{% endif %}
|
||||
{% else %}
|
||||
{# otherwise, use an <input type="date"> but also include js datetime picker #}
|
||||
{# attributes, in case it's not supported. #}
|
||||
<input name="{{widget.name}}" {% if widget.value %}value="{{ widget.value|date:"Y-m-d" }}"{% endif %}
|
||||
type="date"
|
||||
{% if widget.value %}data-formatted-value="{{ widget.value|default:"" }}"{% endif %}
|
||||
class="date-pick"
|
||||
data-date-format="{{widget.date_format}}"
|
||||
|
||||
{# set widget not to go into the time pages #}
|
||||
data-min-view="2"
|
||||
{# set widget not to go into the time pages #}
|
||||
data-min-view="2"
|
||||
|
||||
{# if there is no value we set the initial view to be the view of decades, #}
|
||||
{# it is more appropriate to select a far away date. #}
|
||||
data-start-view="{% if widget.value %}2{% else %}4{% endif %}"
|
||||
{# if there is no value we set the initial view to be the view of decades, #}
|
||||
{# it is more appropriate to select a far away date. #}
|
||||
data-start-view="{% if widget.value %}2{% else %}4{% endif %}"
|
||||
|
||||
{% if widget.minimum_date %}
|
||||
data-start-date="{{ widget.start_date }}"
|
||||
min="{{widget.minimum_date|date:"Y-m-d"}}"
|
||||
{% if widget.minimum_date %}
|
||||
data-start-date="{{ widget.start_date }}"
|
||||
min="{{widget.minimum_date|date:"Y-m-d"}}"
|
||||
{% endif %}
|
||||
{% if widget.maximum_date %}
|
||||
data-end-date="{{ widget.end_date }}"
|
||||
max="{{widget.maximum_date|date:"Y-m-d"}}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if widget.maximum_date %}
|
||||
data-end-date="{{ widget.end_date }}"
|
||||
max="{{widget.maximum_date|date:"Y-m-d"}}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
id="form_{{widget.get_name_for_id}}"
|
||||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}" {% endfor %}
|
||||
{% if widget.required %}aria-required="true"{% endif %}
|
||||
|
|
|
@ -2,51 +2,51 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block widget-control %}
|
||||
<div class="file-button {% if widget.is_image %}file-image{% endif %}"
|
||||
{% if widget.automatic_image_resize %}data-image-resize="true"{% endif %}>
|
||||
{% for w in widget.get_widgets %}
|
||||
{{ w.render|safe }}
|
||||
{% endfor %}
|
||||
<div class="widget-message click-to-upload">
|
||||
{% trans "Drop a file or click to select one" %}
|
||||
</div>
|
||||
<div class="widget-message upload-done">
|
||||
{% trans "Upload done" %}
|
||||
</div>
|
||||
<style>.click-to-upload, .upload-done { display: none; }</style>
|
||||
<div class="fileprogress" style="display: none;">
|
||||
<div class="bar"
|
||||
role="progressbar"
|
||||
aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-valuetext="0%"
|
||||
aria-label="" tabindex="-1"
|
||||
data-upload="{% trans "Upload in progress..." %}"
|
||||
data-resize="{% trans "Resizing image..." %}"
|
||||
data-error="{% trans "Error during upload." %}"></div>
|
||||
</div>
|
||||
<div class="fileinfo {% if widget.readonly and widget.has_tempfile_image %}thumbnail{% endif %}">
|
||||
<span class="filename">{% if widget.tempfile and not widget.is_remote_storage %}<a
|
||||
href="tempfile?t={{ widget.tempfile.token }}"
|
||||
download="{{widget.tempfile.base_filename}}"
|
||||
>{{ widget.tempfile.base_filename }}</a>{% elif widget.tempfile %}{{ widget.tempfile.base_filename }}{% endif %}</span>
|
||||
{% if not widget.readonly %}
|
||||
<a href="#" role="button" class="remove" title="{% trans 'Remove this file' %}">{% trans "remove" %}</a>
|
||||
{% elif widget.has_tempfile_image %}
|
||||
<img alt="" src="tempfile?t={{ widget.tempfile.token }}&thumbnail=1"/>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% block portfolio-picker %}
|
||||
{% if not widget.readonly and widget.allow_portfolio_picking and session_user %}
|
||||
<p class="use-file-from-fargo"><span
|
||||
data-src="{{site_url}}/fargo/pick" data-width="500" data-height="400"
|
||||
data-title="{% trans "Pick a file from the portfolio" %}"
|
||||
data-popup>{% trans "Use file from the portfolio" %}</span></p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
<div class="file-button {% if widget.is_image %}file-image{% endif %}"
|
||||
{% if widget.automatic_image_resize %}data-image-resize="true"{% endif %}>
|
||||
{% for w in widget.get_widgets %}
|
||||
{{ w.render|safe }}
|
||||
{% endfor %}
|
||||
<div class="widget-message click-to-upload">
|
||||
{% trans "Drop a file or click to select one" %}
|
||||
</div>
|
||||
<div class="widget-message upload-done">
|
||||
{% trans "Upload done" %}
|
||||
</div>
|
||||
<style>.click-to-upload, .upload-done { display: none; }</style>
|
||||
<div class="fileprogress" style="display: none;">
|
||||
<div class="bar"
|
||||
role="progressbar"
|
||||
aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-valuetext="0%"
|
||||
aria-label="" tabindex="-1"
|
||||
data-upload="{% trans "Upload in progress..." %}"
|
||||
data-resize="{% trans "Resizing image..." %}"
|
||||
data-error="{% trans "Error during upload." %}"></div>
|
||||
</div>
|
||||
<div class="fileinfo {% if widget.readonly and widget.has_tempfile_image %}thumbnail{% endif %}">
|
||||
<span class="filename">{% if widget.tempfile and not widget.is_remote_storage %}<a
|
||||
href="tempfile?t={{ widget.tempfile.token }}"
|
||||
download="{{widget.tempfile.base_filename}}"
|
||||
>{{ widget.tempfile.base_filename }}</a>{% elif widget.tempfile %}{{ widget.tempfile.base_filename }}{% endif %}</span>
|
||||
{% if not widget.readonly %}
|
||||
<a href="#" role="button" class="remove" title="{% trans 'Remove this file' %}">{% trans "remove" %}</a>
|
||||
{% elif widget.has_tempfile_image %}
|
||||
<img alt="" src="tempfile?t={{ widget.tempfile.token }}&thumbnail=1"/>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% block portfolio-picker %}
|
||||
{% if not widget.readonly and widget.allow_portfolio_picking and session_user %}
|
||||
<p class="use-file-from-fargo"><span
|
||||
data-src="{{site_url}}/fargo/pick" data-width="500" data-height="400"
|
||||
data-title="{% trans "Pick a file from the portfolio" %}"
|
||||
data-popup>{% trans "Use file from the portfolio" %}</span></p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('[data-widget-name="{{ widget.name }}"]').each($.WcsFileUpload.prepare);
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('[data-widget-name="{{ widget.name }}"]').each($.WcsFileUpload.prepare);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -11,21 +11,21 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block widget-control %}
|
||||
{{ block.super }}
|
||||
{{ block.super }}
|
||||
|
||||
<style>
|
||||
.item-marker input + span {
|
||||
position: relative;
|
||||
z-index: 1000;
|
||||
margin-top: -55px;
|
||||
margin-left: -5px;
|
||||
display: block;
|
||||
width: 25px;
|
||||
height: 41px;
|
||||
background: url(/static/images/blank-marker-icon.png);
|
||||
}
|
||||
.item-marker input:checked + span {
|
||||
background: url(/static/xstatic/images/marker-icon.png);
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.item-marker input + span {
|
||||
position: relative;
|
||||
z-index: 1000;
|
||||
margin-top: -55px;
|
||||
margin-left: -5px;
|
||||
display: block;
|
||||
width: 25px;
|
||||
height: 41px;
|
||||
background: url(/static/images/blank-marker-icon.png);
|
||||
}
|
||||
.item-marker input:checked + span {
|
||||
background: url(/static/xstatic/images/marker-icon.png);
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{% extends "qommon/forms/widget.html" %}
|
||||
|
||||
{% block widget-control %}
|
||||
<input type="hidden" name="{{widget.name}}$latlng" {% if widget.value %}value="{{widget.value}}"{% endif %}>
|
||||
<div id="map-{{widget.get_name_for_id}}" class="qommon-map"
|
||||
{% if widget.readonly %}data-readonly="true"{% endif %}
|
||||
{% if widget.sync_map_and_address_fields %}data-address-sync="true"{% endif %}
|
||||
{% for key, value in widget.map_attributes.items %}{{key}}="{{value}}" {% endfor %}
|
||||
{% if widget.initial_position %}
|
||||
data-init-lat="{{ widget.initial_position.lat }}"
|
||||
data-init-lng="{{ widget.initial_position.lng }}"
|
||||
{% endif %}
|
||||
{% block widget-control-attributes %}{% endblock %}
|
||||
></div>
|
||||
<input type="hidden" name="{{widget.name}}$latlng" {% if widget.value %}value="{{widget.value}}"{% endif %}>
|
||||
<div id="map-{{widget.get_name_for_id}}" class="qommon-map"
|
||||
{% if widget.readonly %}data-readonly="true"{% endif %}
|
||||
{% if widget.sync_map_and_address_fields %}data-address-sync="true"{% endif %}
|
||||
{% for key, value in widget.map_attributes.items %}{{key}}="{{value}}" {% endfor %}
|
||||
{% if widget.initial_position %}
|
||||
data-init-lat="{{ widget.initial_position.lat }}"
|
||||
data-init-lng="{{ widget.initial_position.lng }}"
|
||||
{% endif %}
|
||||
{% block widget-control-attributes %}{% endblock %}
|
||||
></div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{% extends "qommon/forms/widget.html" %}
|
||||
{% block widget-control %}
|
||||
<textarea style="width: 100%" id="form_{{widget.get_name_for_id}}" name="{{widget.name}}"
|
||||
<textarea style="width: 100%" id="form_{{widget.get_name_for_id}}" name="{{widget.name}}"
|
||||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}" {% endfor %}
|
||||
>{{widget.value|default:""}}</textarea>
|
||||
<script type="module">
|
||||
import Godo from "/static/xstatic/js/godo.js?{{version_hash}}";
|
||||
new Godo(document.getElementById('form_{{widget.get_name_for_id}}'), {schema: 'basic'});
|
||||
</script>
|
||||
>{{widget.value|default:""}}</textarea>
|
||||
<script type="module">
|
||||
import Godo from "/static/xstatic/js/godo.js?{{version_hash}}";
|
||||
new Godo(document.getElementById('form_{{widget.get_name_for_id}}'), {schema: 'basic'});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
{% extends "qommon/forms/widget.html" %}
|
||||
{% block widget-control %}
|
||||
<select
|
||||
<select
|
||||
{% if widget.readonly %}
|
||||
hidden
|
||||
id="form_{{widget.get_name_for_id}}_hidden" name="{{widget.name}}[]"
|
||||
hidden
|
||||
id="form_{{widget.get_name_for_id}}_hidden" name="{{widget.name}}[]"
|
||||
{% else %}
|
||||
id="form_{{widget.get_name_for_id}}" name="{{widget.name}}[]"
|
||||
data-autocomplete="true"
|
||||
id="form_{{widget.get_name_for_id}}" name="{{widget.name}}[]"
|
||||
data-autocomplete="true"
|
||||
{% endif %}
|
||||
{% if widget.required %}data-required="true"{% endif %}
|
||||
{% for attr in widget.attrs.items %}{% if attr.0 != 'readonly' %}{{attr.0}}="{{attr.1}}" {% endif %}{% endfor %}>
|
||||
{% for option in widget.get_options %}
|
||||
<option value="{{ option.value }}" {% if option.disabled %}disabled{% endif %} {% if option.selected %}selected{% endif %}>{{ option.label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if widget.readonly %}
|
||||
<input readonly id="form_{{widget.get_name_for_id}}" value="{{ widget.get_selected_options_labels|join:", " }}">
|
||||
{% endif %}
|
||||
{% for option in widget.get_options %}
|
||||
<option value="{{ option.value }}" {% if option.disabled %}disabled{% endif %} {% if option.selected %}selected{% endif %}>{{ option.label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if widget.readonly %}
|
||||
<input readonly id="form_{{widget.get_name_for_id}}" value="{{ widget.get_selected_options_labels|join:", " }}">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
{% block widget-css-classes %}{{ block.super }}{% if widget.field.inline %} widget-inline-radio{% endif %}{% endblock %}
|
||||
|
||||
{% block widget-control %}
|
||||
{% for option in widget.get_options %}
|
||||
<label for="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}"
|
||||
{% if option.disabled %}class="disabled"{% endif %}><input
|
||||
id="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}"
|
||||
{% if option.selected %}checked="checked"
|
||||
{% elif widget.readonly or option.disabled %}disabled="disabled"{% endif %}
|
||||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}" {% endfor %}
|
||||
type="radio" name="{{ widget.name }}"
|
||||
value="{{ option.value }}"><span>{{ option.label }}</span></label>
|
||||
{% if not forloop.last %}{{ widget.delim|safe }}{% endif %}
|
||||
{% endfor %}
|
||||
{% for option in widget.get_options %}
|
||||
<label for="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}"
|
||||
{% if option.disabled %}class="disabled"{% endif %}><input
|
||||
id="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}"
|
||||
{% if option.selected %}checked="checked"
|
||||
{% elif widget.readonly or option.disabled %}disabled="disabled"{% endif %}
|
||||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}" {% endfor %}
|
||||
type="radio" name="{{ widget.name }}"
|
||||
value="{{ option.value }}"><span>{{ option.label }}</span></label>
|
||||
{% if not forloop.last %}{{ widget.delim|safe }}{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,177 +1,177 @@
|
|||
{% extends "qommon/forms/widget.html" %}
|
||||
{% load qommon i18n %}
|
||||
{% block widget-control %}
|
||||
<select style="display: none" id="form_{{widget.get_name_for_id}}" name="{{widget.name}}"
|
||||
<select style="display: none" id="form_{{widget.get_name_for_id}}" name="{{widget.name}}"
|
||||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}"{% endfor %}>
|
||||
<option value="">---</option>
|
||||
{% for option in widget.get_options %}
|
||||
{% with datetime=option.options.datetime|parse_datetime %}
|
||||
<option{% for attr in option.attrs.items %} {{attr.0}}="{{attr.1}}"{% endfor %}
|
||||
<option value="">---</option>
|
||||
{% for option in widget.get_options %}
|
||||
{% with datetime=option.options.datetime|parse_datetime %}
|
||||
<option{% for attr in option.attrs.items %} {{attr.0}}="{{attr.1}}"{% endfor %}
|
||||
data-weekday="{{ datetime|date:"l" }}"
|
||||
data-date="{{ datetime|date:"Y-m-d" }}"
|
||||
data-time="{{ datetime|date:"H:i" }}"
|
||||
>{{ option.description }}</option>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div id="form_{{widget.get_name_for_id}}_table" class="timetable-widget meetings_table">
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
var ALIGN_DATE = null;
|
||||
{% with widget.field.get_initial_date_alignment as alignment_date %}
|
||||
{% if alignment_date %}var ALIGN_DATE = "{{ alignment_date|date:"Y-m-d" }}";{% endif %}
|
||||
{% endwith %}
|
||||
var WEEKDAYS = ["{% trans "Sunday" %}", "{% trans "Monday" %}",
|
||||
"{% trans "Tuesday" %}", "{% trans "Wednesday" %}",
|
||||
"{% trans "Thursday" %}", "{% trans "Friday" %}",
|
||||
"{% trans "Saturday" %}"];
|
||||
var $select = $('#form_{{widget.get_name_for_id}}');
|
||||
var $table = $('#form_{{widget.get_name_for_id}}_table');
|
||||
var column_count = 5;
|
||||
>{{ option.description }}</option>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div id="form_{{widget.get_name_for_id}}_table" class="timetable-widget meetings_table">
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
var ALIGN_DATE = null;
|
||||
{% with widget.field.get_initial_date_alignment as alignment_date %}
|
||||
{% if alignment_date %}var ALIGN_DATE = "{{ alignment_date|date:"Y-m-d" }}";{% endif %}
|
||||
{% endwith %}
|
||||
var WEEKDAYS = ["{% trans "Sunday" %}", "{% trans "Monday" %}",
|
||||
"{% trans "Tuesday" %}", "{% trans "Wednesday" %}",
|
||||
"{% trans "Thursday" %}", "{% trans "Friday" %}",
|
||||
"{% trans "Saturday" %}"];
|
||||
var $select = $('#form_{{widget.get_name_for_id}}');
|
||||
var $table = $('#form_{{widget.get_name_for_id}}_table');
|
||||
var column_count = 5;
|
||||
|
||||
function fill_with_items(items) {
|
||||
$select.empty();
|
||||
$('<option value=""></option>').appendTo($select);
|
||||
for (var i=0; i<items.length; i++) {
|
||||
var date = new Date(items[i].datetime.slice(0, 10));
|
||||
var $option = $('<option></option>', {
|
||||
value: items[i].id,
|
||||
text: items[i].text,
|
||||
'data-weekday': WEEKDAYS[date.getDay()],
|
||||
'data-date': items[i].datetime.slice(0, 10),
|
||||
'data-time': items[i].datetime.slice(11, 16)
|
||||
function fill_with_items(items) {
|
||||
$select.empty();
|
||||
$('<option value=""></option>').appendTo($select);
|
||||
for (var i=0; i<items.length; i++) {
|
||||
var date = new Date(items[i].datetime.slice(0, 10));
|
||||
var $option = $('<option></option>', {
|
||||
value: items[i].id,
|
||||
text: items[i].text,
|
||||
'data-weekday': WEEKDAYS[date.getDay()],
|
||||
'data-date': items[i].datetime.slice(0, 10),
|
||||
'data-time': items[i].datetime.slice(11, 16)
|
||||
});
|
||||
if (items[i].disabled) {
|
||||
$option.prop('disabled', true);
|
||||
}
|
||||
if (items[i].selected) {
|
||||
$option.attr('selected', true);
|
||||
}
|
||||
$option.appendTo($select);
|
||||
}
|
||||
}
|
||||
|
||||
$select.on('wcs:options-change', function(ev, data) {
|
||||
if (data !== undefined) {
|
||||
fill_with_items(data.items);
|
||||
}
|
||||
$table.empty();
|
||||
var options = $select.find('option');
|
||||
var current_date = null;
|
||||
var current_day_div = null;
|
||||
var current_offset = null;
|
||||
var alignment_offset = null;
|
||||
var nb_days = 0;
|
||||
|
||||
for (var i=0; i<options.length; i++) {
|
||||
var $option = $(options[i]);
|
||||
if ($option.attr('value') == '') continue;
|
||||
var option_date = $option.data('date');
|
||||
if (option_date !== current_date) {
|
||||
var day_label = $option.text().split(' ', 3).join(' ');
|
||||
if (Intl && Intl.DateTimeFormat) {
|
||||
// create day label from actual date, this works for event agendas.
|
||||
var date = new Date(option_date);
|
||||
var month = new Intl.DateTimeFormat('fr', {month: 'long'}).format(date);
|
||||
day_label = date.getDate() + ' ' + month + ' ' + date.getFullYear();
|
||||
}
|
||||
var weekday = $option.data('weekday');
|
||||
nb_days += 1;
|
||||
current_day_div = $('<div><div class="head">' + weekday + '<br>' + day_label + '</div></div>');
|
||||
current_day_div.appendTo($table);
|
||||
current_date = option_date;
|
||||
}
|
||||
var day_time = $option.data('time');
|
||||
var option_span = $('<span class="timetable-cell selectable" data-idx="' + i + '"><span>' + day_time + '</span></span>').appendTo(current_day_div);
|
||||
if ($option.attr('disabled')) {
|
||||
$(option_span).addClass('disabled').removeClass('selectable');
|
||||
}
|
||||
if ($option.attr('selected')) {
|
||||
current_offset = nb_days - 1;
|
||||
$(option_span).addClass('on');
|
||||
}
|
||||
if (current_offset === null && ALIGN_DATE !== null && alignment_offset === null && option_date >= ALIGN_DATE) {
|
||||
alignment_offset = nb_days - 1;
|
||||
}
|
||||
}
|
||||
if (current_offset === null && ALIGN_DATE !== null && alignment_offset === null) {
|
||||
alignment_offset = nb_days - 1;
|
||||
}
|
||||
if (current_offset === null && alignment_offset !== null) {
|
||||
current_offset = Math.max(Math.min(alignment_offset, nb_days-column_count), 0);
|
||||
} else if (current_offset === null) {
|
||||
current_offset = 0;
|
||||
}
|
||||
var go_prev = $('<button class="prev">←</button>');
|
||||
var go_next = $('<button class="next">→</button>');
|
||||
go_prev.prependTo($table);
|
||||
go_next.appendTo($table);
|
||||
go_prev.on('click', function() {
|
||||
current_offset = Math.max(0, current_offset - 1);
|
||||
display(current_offset);
|
||||
return false;
|
||||
});
|
||||
go_next.on('click', function() {
|
||||
current_offset = Math.min(current_offset + 1, Math.max(0, nb_days-column_count));
|
||||
display(current_offset);
|
||||
return false;
|
||||
});
|
||||
|
||||
function display(offset) {
|
||||
$table.children('div').each(function(idx, elem) {
|
||||
if (idx >= offset && idx < offset+column_count) {
|
||||
$(elem).show();
|
||||
} else {
|
||||
$(elem).hide();
|
||||
}
|
||||
});
|
||||
if (go_prev.next().is(':visible')) {
|
||||
go_prev.prop('disabled', true);
|
||||
} else {
|
||||
go_prev.prop('disabled', null);
|
||||
}
|
||||
if (go_next.prev().is(':visible')) {
|
||||
go_next.prop('disabled', true);
|
||||
} else {
|
||||
go_next.prop('disabled', null);
|
||||
}
|
||||
current_offset = offset;
|
||||
}
|
||||
|
||||
function set_layout() {
|
||||
if ($select.parents('form').width() > 600) {
|
||||
// desktop layout
|
||||
column_count = 5;
|
||||
$table.removeClass('mobile');
|
||||
} else {
|
||||
// mobile layout
|
||||
column_count = 1;
|
||||
$table.addClass('mobile');
|
||||
}
|
||||
display(current_offset);
|
||||
t1 = new Date();
|
||||
}
|
||||
set_layout();
|
||||
var layout_change_timeout_id = null;
|
||||
$(window).on('resize', function() {
|
||||
clearTimeout(layout_change_timeout_id);
|
||||
layout_change_timeout_id = setTimeout(set_layout, 200);
|
||||
});
|
||||
|
||||
$table.find('span.selectable').on('click', function() {
|
||||
$table.find('span.timetable-cell').removeClass('on');
|
||||
$(this).addClass('on');
|
||||
$select.val($(options[$(this).data('idx')]).attr('value'));
|
||||
$select.parents('div.widget-prefilled').removeClass('widget-prefilled');
|
||||
$select.trigger('wcs:change');
|
||||
});
|
||||
});
|
||||
if (items[i].disabled) {
|
||||
$option.prop('disabled', true);
|
||||
}
|
||||
if (items[i].selected) {
|
||||
$option.attr('selected', true);
|
||||
}
|
||||
$option.appendTo($select);
|
||||
}
|
||||
}
|
||||
|
||||
$select.on('wcs:options-change', function(ev, data) {
|
||||
if (data !== undefined) {
|
||||
fill_with_items(data.items);
|
||||
}
|
||||
$table.empty();
|
||||
var options = $select.find('option');
|
||||
var current_date = null;
|
||||
var current_day_div = null;
|
||||
var current_offset = null;
|
||||
var alignment_offset = null;
|
||||
var nb_days = 0;
|
||||
|
||||
for (var i=0; i<options.length; i++) {
|
||||
var $option = $(options[i]);
|
||||
if ($option.attr('value') == '') continue;
|
||||
var option_date = $option.data('date');
|
||||
if (option_date !== current_date) {
|
||||
var day_label = $option.text().split(' ', 3).join(' ');
|
||||
if (Intl && Intl.DateTimeFormat) {
|
||||
// create day label from actual date, this works for event agendas.
|
||||
var date = new Date(option_date);
|
||||
var month = new Intl.DateTimeFormat('fr', {month: 'long'}).format(date);
|
||||
day_label = date.getDate() + ' ' + month + ' ' + date.getFullYear();
|
||||
}
|
||||
var weekday = $option.data('weekday');
|
||||
nb_days += 1;
|
||||
current_day_div = $('<div><div class="head">' + weekday + '<br>' + day_label + '</div></div>');
|
||||
current_day_div.appendTo($table);
|
||||
current_date = option_date;
|
||||
}
|
||||
var day_time = $option.data('time');
|
||||
var option_span = $('<span class="timetable-cell selectable" data-idx="' + i + '"><span>' + day_time + '</span></span>').appendTo(current_day_div);
|
||||
if ($option.attr('disabled')) {
|
||||
$(option_span).addClass('disabled').removeClass('selectable');
|
||||
}
|
||||
if ($option.attr('selected')) {
|
||||
current_offset = nb_days - 1;
|
||||
$(option_span).addClass('on');
|
||||
}
|
||||
if (current_offset === null && ALIGN_DATE !== null && alignment_offset === null && option_date >= ALIGN_DATE) {
|
||||
alignment_offset = nb_days - 1;
|
||||
}
|
||||
}
|
||||
if (current_offset === null && ALIGN_DATE !== null && alignment_offset === null) {
|
||||
alignment_offset = nb_days - 1;
|
||||
}
|
||||
if (current_offset === null && alignment_offset !== null) {
|
||||
current_offset = Math.max(Math.min(alignment_offset, nb_days-column_count), 0);
|
||||
} else if (current_offset === null) {
|
||||
current_offset = 0;
|
||||
}
|
||||
var go_prev = $('<button class="prev">←</button>');
|
||||
var go_next = $('<button class="next">→</button>');
|
||||
go_prev.prependTo($table);
|
||||
go_next.appendTo($table);
|
||||
go_prev.on('click', function() {
|
||||
current_offset = Math.max(0, current_offset - 1);
|
||||
display(current_offset);
|
||||
return false;
|
||||
});
|
||||
go_next.on('click', function() {
|
||||
current_offset = Math.min(current_offset + 1, Math.max(0, nb_days-column_count));
|
||||
display(current_offset);
|
||||
return false;
|
||||
});
|
||||
|
||||
function display(offset) {
|
||||
$table.children('div').each(function(idx, elem) {
|
||||
if (idx >= offset && idx < offset+column_count) {
|
||||
$(elem).show();
|
||||
} else {
|
||||
$(elem).hide();
|
||||
}
|
||||
$select.trigger('wcs:options-change');
|
||||
});
|
||||
if (go_prev.next().is(':visible')) {
|
||||
go_prev.prop('disabled', true);
|
||||
} else {
|
||||
go_prev.prop('disabled', null);
|
||||
}
|
||||
if (go_next.prev().is(':visible')) {
|
||||
go_next.prop('disabled', true);
|
||||
} else {
|
||||
go_next.prop('disabled', null);
|
||||
}
|
||||
current_offset = offset;
|
||||
}
|
||||
|
||||
function set_layout() {
|
||||
if ($select.parents('form').width() > 600) {
|
||||
// desktop layout
|
||||
column_count = 5;
|
||||
$table.removeClass('mobile');
|
||||
} else {
|
||||
// mobile layout
|
||||
column_count = 1;
|
||||
$table.addClass('mobile');
|
||||
}
|
||||
display(current_offset);
|
||||
t1 = new Date();
|
||||
}
|
||||
set_layout();
|
||||
var layout_change_timeout_id = null;
|
||||
$(window).on('resize', function() {
|
||||
clearTimeout(layout_change_timeout_id);
|
||||
layout_change_timeout_id = setTimeout(set_layout, 200);
|
||||
});
|
||||
|
||||
$table.find('span.selectable').on('click', function() {
|
||||
$table.find('span.timetable-cell').removeClass('on');
|
||||
$(this).addClass('on');
|
||||
$select.val($(options[$(this).data('idx')]).attr('value'));
|
||||
$select.parents('div.widget-prefilled').removeClass('widget-prefilled');
|
||||
$select.trigger('wcs:change');
|
||||
});
|
||||
});
|
||||
$select.trigger('wcs:options-change');
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block widget-hint %}
|
||||
{% if widget.hint %}<div class="hint">{{widget.hint}}</div>{% endif %}
|
||||
{% if widget.hint %}<div class="hint">{{widget.hint}}</div>{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
{% extends "qommon/forms/widget.html" %}
|
||||
{% block widget-control %}
|
||||
<select id="form_{{widget.get_name_for_id}}" name="{{widget.name}}"
|
||||
<select id="form_{{widget.get_name_for_id}}" name="{{widget.name}}"
|
||||
{% if widget.select2 %}data-autocomplete="true"{% endif %}
|
||||
{% if widget.required %}data-required="true"{% endif %}
|
||||
{% for attr in widget.attrs.items %}{% if attr.0 != 'readonly' %}{{attr.0}}="{{attr.1}}"{% endif %}{% endfor %}>
|
||||
{% if not widget.separate_hint and widget.hint %}
|
||||
<option value="" data-hint="{{ widget.hint }}">{% if not widget.select2 %}{{ widget.hint }}{% endif %}</option>
|
||||
{% endif %}
|
||||
{% for option in widget.get_options %}
|
||||
<option{% for attr in option.attrs.items %} {{attr.0}}="{{attr.1}}"{% endfor %}>{{ option.description }}</option>
|
||||
{% empty %}
|
||||
{% if widget.separate_hint or not widget.hint %}
|
||||
<option value="">---</option>
|
||||
{% if not widget.separate_hint and widget.hint %}
|
||||
<option value="" data-hint="{{ widget.hint }}">{% if not widget.select2 %}{{ widget.hint }}{% endif %}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% for option in widget.get_options %}
|
||||
<option{% for attr in option.attrs.items %} {{attr.0}}="{{attr.1}}"{% endfor %}>{{ option.description }}</option>
|
||||
{% empty %}
|
||||
{% if widget.separate_hint or not widget.hint %}
|
||||
<option value="">---</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{% extends "qommon/forms/widgets/select_jsonp.html" %}
|
||||
{% load i18n %}
|
||||
{% block widget-control %}
|
||||
{{ block.super }}
|
||||
{% if not widget.readonly %}
|
||||
<div>
|
||||
<label><input class="wcs-manual-address" type="checkbox"><span>{% trans "If you cannot find this address in the list you can check this box to manually enter it." %}</span></label>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ block.super }}
|
||||
{% if not widget.readonly %}
|
||||
<div>
|
||||
<label><input class="wcs-manual-address" type="checkbox"><span>{% trans "If you cannot find this address in the list you can check this box to manually enter it." %}</span></label>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{% extends "qommon/forms/widget.html" %}
|
||||
{% load i18n %}
|
||||
{% block widget-control %}
|
||||
<div class="wcs-widget-select2-container">
|
||||
<select id="form_{{widget.get_name_for_id}}" name="{{widget.name}}"
|
||||
data-select2-url="{{widget.get_select2_url}}"
|
||||
{% if widget.value %}data-value="{{ widget.value }}"{% endif %}
|
||||
data-required="{% if widget.is_required %}true{% endif %}"
|
||||
data-initial-display-value="{{widget.get_display_value|default_if_none:''}}">
|
||||
</select>
|
||||
{% if widget.add_related_url %}
|
||||
<a class="add-related pk-button" id="add_form_{{ widget.get_name_for_id }}"
|
||||
href="{{ widget.add_related_url }}?_popup=1"
|
||||
title="{% blocktrans with card=widget.get_title %}Add another {{ card }}{% endblocktrans %}">+</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="wcs-widget-select2-container">
|
||||
<select id="form_{{widget.get_name_for_id}}" name="{{widget.name}}"
|
||||
data-select2-url="{{widget.get_select2_url}}"
|
||||
{% if widget.value %}data-value="{{ widget.value }}"{% endif %}
|
||||
data-required="{% if widget.is_required %}true{% endif %}"
|
||||
data-initial-display-value="{{widget.get_display_value|default_if_none:''}}">
|
||||
</select>
|
||||
{% if widget.add_related_url %}
|
||||
<a class="add-related pk-button" id="add_form_{{ widget.get_name_for_id }}"
|
||||
href="{{ widget.add_related_url }}?_popup=1"
|
||||
title="{% blocktrans with card=widget.get_title %}Add another {{ card }}{% endblocktrans %}">+</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
{% extends "qommon/forms/widget.html" %}
|
||||
|
||||
{% block widget-control %}
|
||||
<input id="form_{{widget.get_name_for_id}}" name="{{widget.name}}"
|
||||
type="{% if "readonly" in widget.attrs %}text{% else %}time{% endif %}"
|
||||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}" {% endfor %}
|
||||
{% if widget.required %}aria-required="true"{% endif %}
|
||||
{% if "readonly" in widget.attrs %}
|
||||
{% if widget.value %}value="{{ widget.value }}"{% endif %}
|
||||
{% else %}
|
||||
<input id="form_{{widget.get_name_for_id}}" name="{{widget.name}}"
|
||||
type="{% if "readonly" in widget.attrs %}text{% else %}time{% endif %}"
|
||||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}" {% endfor %}
|
||||
{% if widget.required %}aria-required="true"{% endif %}
|
||||
{% if "readonly" in widget.attrs %}
|
||||
{% if widget.value %}value="{{ widget.value }}"{% endif %}
|
||||
{% else %}
|
||||
|
||||
value="{{ widget.value|default:"" }}" data-formatted-value="{{ widget.value|default:"" }}"
|
||||
class="date-pick"
|
||||
data-date-format="hh:ii"
|
||||
value="{{ widget.value|default:"" }}" data-formatted-value="{{ widget.value|default:"" }}"
|
||||
class="date-pick"
|
||||
data-date-format="hh:ii"
|
||||
|
||||
data-min-view="0"
|
||||
data-max-view="0"
|
||||
data-start-view="0"
|
||||
data-min-view="0"
|
||||
data-max-view="0"
|
||||
data-start-view="0"
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
<div class="warningnotice">{% trans "There was a temporary error during your authentication, please retry later." %}</div>
|
||||
<div class="warningnotice">{% trans "There was a temporary error during your authentication, please retry later." %}</div>
|
||||
|
||||
<form method="post">
|
||||
<form method="post">
|
||||
<button>{% trans "Retry" %}</button>
|
||||
</form>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
{% if done %}
|
||||
<p>
|
||||
{% if done_message %}
|
||||
{{ done_message }}
|
||||
{% else %}
|
||||
{% trans "The action has been confirmed. You can now close this window." %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% else %}
|
||||
<p>
|
||||
{% if message %}
|
||||
{{ message }}
|
||||
{% else %}
|
||||
{% trans "Please confirm action." %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{{ html_form.render|safe }}
|
||||
{% endif %}
|
||||
{% if done %}
|
||||
<p>
|
||||
{% if done_message %}
|
||||
{{ done_message }}
|
||||
{% else %}
|
||||
{% trans "The action has been confirmed. You can now close this window." %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% else %}
|
||||
<p>
|
||||
{% if message %}
|
||||
{{ message }}
|
||||
{% else %}
|
||||
{% trans "Please confirm action." %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{{ html_form.render|safe }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "wcs/backoffice.html" %}
|
||||
|
||||
{% block main-content %}
|
||||
{{ body|safe }}
|
||||
{{ body|safe }}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
{% block footer %}w.c.s. — Copyright © Entr'ouvert{% endblock %}
|
||||
|
||||
{% block gadjo-js %}
|
||||
{{script|safe}}
|
||||
{{script|safe}}
|
||||
{% endblock %}
|
||||
|
||||
{% block gadjo-css %}
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/qommon.css?{% version_hash %}"/>
|
||||
{{ block.super }}
|
||||
{% block css %}{% endblock %}
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/dc2/admin.css?{% version_hash %}"/>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/qommon.css?{% version_hash %}"/>
|
||||
{{ block.super }}
|
||||
{% block css %}{% endblock %}
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/dc2/admin.css?{% version_hash %}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block bodyargs %}class="section-{{section}} {% if admin_for_all %}admin-for-all{% endif %}"{% endblock %}
|
||||
|
@ -27,35 +27,35 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block sidepage %}
|
||||
<div id="sidepage">
|
||||
<span id="applabel">{{app_label}}</span>
|
||||
{{ header_menu|safe }}
|
||||
</div>
|
||||
<div id="sidepage">
|
||||
<span id="applabel">{{app_label}}</span>
|
||||
{{ header_menu|safe }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block main-content %}
|
||||
{% block content %}
|
||||
{% block appbar %}
|
||||
<div id="appbar">
|
||||
<h2>{% block appbar-title %}{% endblock %}</h2>
|
||||
<span class="actions">{% block appbar-actions %}{% endblock %}</span>
|
||||
</div>
|
||||
<div id="appbar">
|
||||
<h2>{% block appbar-title %}{% endblock %}</h2>
|
||||
<span class="actions">{% block appbar-actions %}{% endblock %}</span>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block session-message %}
|
||||
{{session_message|safe}}
|
||||
{{session_message|safe}}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% if sidebar or has_sidebar %}
|
||||
<aside id="sidebar">
|
||||
<span id="sidebar-toggle">⁞</span>
|
||||
<div id="sticky-sidebar">
|
||||
{% block sidebar-content %}
|
||||
{{ sidebar|safe }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</aside>
|
||||
{% endif %}
|
||||
{% if sidebar or has_sidebar %}
|
||||
<aside id="sidebar">
|
||||
<span id="sidebar-toggle">⁞</span>
|
||||
<div id="sticky-sidebar">
|
||||
{% block sidebar-content %}
|
||||
{{ sidebar|safe }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</aside>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
<div id="appbar">
|
||||
<h2>{% trans "API access" %} - {{ api_access.name }}</h2>
|
||||
<span class="actions">
|
||||
<a href="delete" rel="popup">{% trans "Delete" %}</a>
|
||||
<a href="edit">{% trans "Edit" %}</a>
|
||||
</span>
|
||||
</div>
|
||||
<div id="appbar">
|
||||
<h2>{% trans "API access" %} - {{ api_access.name }}</h2>
|
||||
<span class="actions">
|
||||
<a href="delete" rel="popup">{% trans "Delete" %}</a>
|
||||
<a href="edit">{% trans "Edit" %}</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% if api_access.description %}
|
||||
<div class="bo-block">{{ api_access.description }}</div>
|
||||
{% endif %}
|
||||
{% if api_access.description %}
|
||||
<div class="bo-block">{{ api_access.description }}</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Parameters" %}</h3>
|
||||
<ul>
|
||||
<li>{% trans "Access identifier:" %} {{ api_access.access_identifier }}</li>
|
||||
<li>{% trans "Access key:" %} {{ api_access.access_key }}</li>
|
||||
{% if api_access.restrict_to_anonymised_data %}<li>{% trans "Restricted to anonymised data" %}</li>{% endif %}
|
||||
{% if api_access.get_roles %}
|
||||
<li>{% trans "Roles:" %}
|
||||
<ul>
|
||||
{% for role in api_access.get_roles %}<li>{{ role.name }}</li>{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Parameters" %}</h3>
|
||||
<ul>
|
||||
<li>{% trans "Access identifier:" %} {{ api_access.access_identifier }}</li>
|
||||
<li>{% trans "Access key:" %} {{ api_access.access_key }}</li>
|
||||
{% if api_access.restrict_to_anonymised_data %}<li>{% trans "Restricted to anonymised data" %}</li>{% endif %}
|
||||
{% if api_access.get_roles %}
|
||||
<li>{% trans "Roles:" %}
|
||||
<ul>
|
||||
{% for role in api_access.get_roles %}<li>{{ role.name }}</li>{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
{% block appbar-title %}{% trans "API access" %}{% endblock %}
|
||||
|
||||
{% block appbar-actions %}
|
||||
<a rel="popup" href="new">{% trans "New API access" %}</a>
|
||||
<a rel="popup" href="new">{% trans "New API access" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if api_accesses %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for api_access in api_accesses %}
|
||||
<li><a href="{{ api_access.id }}/">{{ api_access.name }} ({{ api_access.access_identifier }})</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class="infonotice">
|
||||
{% trans "There are no API access defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if api_accesses %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for api_access in api_accesses %}
|
||||
<li><a href="{{ api_access.id }}/">{{ api_access.name }} ({{ api_access.access_identifier }})</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class="infonotice">
|
||||
{% trans "There are no API access defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{% block appbar %}
|
||||
<div id="appbar">
|
||||
<h2>{% block appbar-title %}{% endblock %}</h2>
|
||||
<span class="actions">{% block appbar-actions %}{% endblock %}</span>
|
||||
</div>
|
||||
<div id="appbar">
|
||||
<h2>{% block appbar-title %}{% endblock %}</h2>
|
||||
<span class="actions">{% block appbar-actions %}{% endblock %}</span>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block session-message %}
|
||||
{{session_message|safe}}
|
||||
{{session_message|safe}}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
@ -5,27 +5,27 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
<div class="pk-tabs inspect-tabs inspect-form-tabs">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
<button role="tab" aria-selected="true" aria-controls="inspect-infos" id="tab-infos" tabindex="0">{% trans "Information" %}</button>
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-fields" id="tab-fields" tabindex="-1">{% trans "Fields" %}</button>
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
<div class="pk-tabs inspect-tabs inspect-form-tabs">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
<button role="tab" aria-selected="true" aria-controls="inspect-infos" id="tab-infos" tabindex="0">{% trans "Information" %}</button>
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-fields" id="tab-fields" tabindex="-1">{% trans "Fields" %}</button>
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
|
||||
<div id="inspect-infos" role="tabpanel" tabindex="0" aria-labelledby="tab-info">
|
||||
<ul>
|
||||
<li><span class="parameter">{% trans "Title" %}{% trans ":" %}</span> {{ blockdef.name|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Category" %}{% trans ":" %}</span> {% if blockdef.category %}<a href="{{ blockdef.category.get_admin_url }}">{{ blockdef.category.name }}</a>{% else %}-{% endif %}</li>
|
||||
<li><span class="parameter">{% trans "Digest Template" %}{% trans ":" %}</span> {{ blockdef.digest_template|default:"-" }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="inspect-infos" role="tabpanel" tabindex="0" aria-labelledby="tab-info">
|
||||
<ul>
|
||||
<li><span class="parameter">{% trans "Title" %}{% trans ":" %}</span> {{ blockdef.name|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Category" %}{% trans ":" %}</span> {% if blockdef.category %}<a href="{{ blockdef.category.get_admin_url }}">{{ blockdef.category.name }}</a>{% else %}-{% endif %}</li>
|
||||
<li><span class="parameter">{% trans "Digest Template" %}{% trans ":" %}</span> {{ blockdef.digest_template|default:"-" }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="inspect-fields" role="tabpanel" tabindex="0" aria-labelledby="tab-fields" hidden>
|
||||
{% for field in blockdef.fields %}
|
||||
{% include "wcs/backoffice/includes/inspect-field.html" with path=blockdef.get_admin_url %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="inspect-fields" role="tabpanel" tabindex="0" aria-labelledby="tab-fields" hidden>
|
||||
{% for field in blockdef.fields %}
|
||||
{% include "wcs/backoffice/includes/inspect-field.html" with path=blockdef.get_admin_url %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,34 +4,34 @@
|
|||
{% block appbar-title %}{% trans "Field Blocks" %}{% endblock %}
|
||||
|
||||
{% block appbar-actions %}
|
||||
<a href="categories/">{% trans "Categories" %}</a>
|
||||
<a rel="popup" href="import">{% trans "Import" %}</a>
|
||||
<a rel="popup" href="new">{% trans "New field block" %}</a>
|
||||
<a href="categories/">{% trans "Categories" %}</a>
|
||||
<a rel="popup" href="import">{% trans "Import" %}</a>
|
||||
<a rel="popup" href="new">{% trans "New field block" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if categories %}
|
||||
{% for category in categories %}
|
||||
{% if category.blocks %}
|
||||
<div class="section">
|
||||
<h2>{{ category.name }}</h2>
|
||||
{% if categories %}
|
||||
{% for category in categories %}
|
||||
{% if category.blocks %}
|
||||
<div class="section">
|
||||
<h2>{{ category.name }}</h2>
|
||||
<ul class="objects-list single-links">
|
||||
{% for block in category.blocks %}
|
||||
<li><a href="{{ block.id }}/">{{ block.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% elif blocks %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for block in category.blocks %}
|
||||
<li><a href="{{ block.id }}/">{{ block.name }}</a></li>
|
||||
{% for block in blocks %}
|
||||
<li><a href="{{ block.id }}/">{{ block.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="infonotice">
|
||||
{% trans "There are no field blocks defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% elif blocks %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for block in blocks %}
|
||||
<li><a href="{{ block.id }}/">{{ block.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class="infonotice">
|
||||
{% trans "There are no field blocks defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,30 +2,30 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block appbar %}
|
||||
<div id="appbar">
|
||||
<h2>{% trans "Import File" %}</h2>
|
||||
</div>
|
||||
<div id="appbar">
|
||||
<h2>{% trans "Import File" %}</h2>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>{% trans "You can add data to this card by uploading a file." %}</p>
|
||||
<p>{% trans "You can add data to this card by uploading a file." %}</p>
|
||||
|
||||
{% if not impossible_csv_fields %}
|
||||
<p><a href="data-sample-csv">{% trans "Download sample CSV file for this card" %}</a></p>
|
||||
{% else %}
|
||||
<div class="warningnotice">
|
||||
<p>
|
||||
{% blocktrans count fields=impossible_csv_fields|length with labels=impossible_csv_fields|join:", " %}
|
||||
{{ labels }} is required but cannot be filled from CSV.
|
||||
{% plural %}
|
||||
{{ labels }} are required but cannot be filled from CSV.
|
||||
{% endblocktrans %}
|
||||
{% trans "Only JSON files can be imported." %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not impossible_csv_fields %}
|
||||
<p><a href="data-sample-csv">{% trans "Download sample CSV file for this card" %}</a></p>
|
||||
{% else %}
|
||||
<div class="warningnotice">
|
||||
<p>
|
||||
{% blocktrans trimmed count fields=impossible_csv_fields|length with labels=impossible_csv_fields|join:", " %}
|
||||
{{ labels }} is required but cannot be filled from CSV.
|
||||
{% plural %}
|
||||
{{ labels }} are required but cannot be filled from CSV.
|
||||
{% endblocktrans %}
|
||||
{% trans "Only JSON files can be imported." %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{ html_form.render|safe }}
|
||||
{{ html_form.render|safe }}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
{% block appbar-title %}{% trans "Card Models" %}{% endblock %}
|
||||
|
||||
{% block appbar-actions %}
|
||||
{% if is_global_accessible_forms %}
|
||||
<a href="../forms/data-sources/">{% trans "Data sources" %}</a>
|
||||
<a href="../forms/blocks/">{% trans "Fields blocks" %}</a>
|
||||
{% endif %}
|
||||
{% if is_global_accessible_cards %}
|
||||
<a href="categories/">{% trans "Categories" %}</a>
|
||||
{% endif %}
|
||||
<a rel="popup" href="import">{% trans "Import" %}</a>
|
||||
<a rel="popup" href="new">{% trans "New Card Model" %}</a>
|
||||
{% if is_global_accessible_forms %}
|
||||
<a href="../forms/data-sources/">{% trans "Data sources" %}</a>
|
||||
<a href="../forms/blocks/">{% trans "Fields blocks" %}</a>
|
||||
{% endif %}
|
||||
{% if is_global_accessible_cards %}
|
||||
<a href="categories/">{% trans "Categories" %}</a>
|
||||
{% endif %}
|
||||
<a rel="popup" href="import">{% trans "Import" %}</a>
|
||||
<a rel="popup" href="new">{% trans "New Card Model" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block no-objects %}
|
||||
{% trans "There are no card models defined." %}
|
||||
{% trans "There are no card models defined." %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,66 +4,66 @@
|
|||
{% block appbar-title %}{{ category.name }}{% endblock %}
|
||||
|
||||
{% block appbar-actions %}
|
||||
{% if not category.is_readonly %}
|
||||
<a href="delete" rel="popup">{% trans "Delete" %}</a>
|
||||
<a href="edit">{% trans "Edit" %}</a>
|
||||
{% endif %}
|
||||
{% if not category.is_readonly %}
|
||||
<a href="delete" rel="popup">{% trans "Delete" %}</a>
|
||||
<a href="edit">{% trans "Edit" %}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ block.super }}
|
||||
{{ block.super }}
|
||||
|
||||
{% if not category.snapshot_object %}{{ view.last_modification_block|safe }}{% endif %}
|
||||
{% if not category.snapshot_object %}{{ view.last_modification_block|safe }}{% endif %}
|
||||
|
||||
{% if category.description %}
|
||||
<div class="bo-block">{{ category.get_description_html_text|safe }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not category.snapshot_object %}
|
||||
<div class="section">
|
||||
<h3>{% trans view.usage_title %}</h3>
|
||||
{% with view.get_formdefs as formdefs %}
|
||||
{% if formdefs %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for formdef in formdefs %}
|
||||
<li><a href="{{ formdef.get_admin_url }}">{{ formdef.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div><p>{% trans view.empty_message %}</p></div>
|
||||
{% if category.description %}
|
||||
<div class="bo-block">{{ category.get_description_html_text|safe }}</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if category.export_roles or category.statistics_roles or category.management_roles %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Permissions" %}</h3>
|
||||
<div>
|
||||
<ul>
|
||||
{% if category.management_roles %}
|
||||
<li>{% trans "Management roles:" %}
|
||||
<ul>
|
||||
{% for role in category.management_roles %}<li>{{ role.name }}</li>{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if category.export_roles %}
|
||||
<li>{% trans "Export roles:" %}
|
||||
<ul>
|
||||
{% for role in category.export_roles %}<li>{{ role.name }}</li>{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if category.statistics_roles %}
|
||||
<li>{% trans "Statistics roles:" %}
|
||||
<ul>
|
||||
{% for role in category.statistics_roles %}<li>{{ role.name }}</li>{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not category.snapshot_object %}
|
||||
<div class="section">
|
||||
<h3>{% trans view.usage_title %}</h3>
|
||||
{% with view.get_formdefs as formdefs %}
|
||||
{% if formdefs %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for formdef in formdefs %}
|
||||
<li><a href="{{ formdef.get_admin_url }}">{{ formdef.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div><p>{% trans view.empty_message %}</p></div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if category.export_roles or category.statistics_roles or category.management_roles %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Permissions" %}</h3>
|
||||
<div>
|
||||
<ul>
|
||||
{% if category.management_roles %}
|
||||
<li>{% trans "Management roles:" %}
|
||||
<ul>
|
||||
{% for role in category.management_roles %}<li>{{ role.name }}</li>{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if category.export_roles %}
|
||||
<li>{% trans "Export roles:" %}
|
||||
<ul>
|
||||
{% for role in category.export_roles %}<li>{{ role.name }}</li>{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if category.statistics_roles %}
|
||||
<li>{% trans "Statistics roles:" %}
|
||||
<ul>
|
||||
{% for role in category.statistics_roles %}<li>{{ role.name }}</li>{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,16 +4,16 @@
|
|||
{% block appbar-title %}{% trans "All changes" context 'studio' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for obj in objects %}
|
||||
<li>
|
||||
<a href="{{ obj.get_admin_url }}">
|
||||
{{ obj.name }}
|
||||
<span class="extra-info">{{ obj.snapshot_timestamp }}</span>
|
||||
<span class="badge">{{ obj.verbose_name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{{ pagination_links|safe }}
|
||||
<ul class="objects-list single-links">
|
||||
{% for obj in objects %}
|
||||
<li>
|
||||
<a href="{{ obj.get_admin_url }}">
|
||||
{{ obj.name }}
|
||||
<span class="extra-info">{{ obj.snapshot_timestamp }}</span>
|
||||
<span class="badge">{{ obj.verbose_name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{{ pagination_links|safe }}
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
{% block appbar-title %}{% trans "Cards" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% regroup view.get_carddefs by category.id as category_list %}
|
||||
<ul class="biglist">
|
||||
{% for category_id, object_list in category_list %}
|
||||
{% if not forloop.first or category_id %}<li><h3>{{ object_list.0.category.name|default:_('Misc') }}</h3></li>{% endif %}
|
||||
{% for carddef in object_list %}
|
||||
<li><a href="{{ carddef.url_name }}/">{{ carddef.name }}</a></li>
|
||||
{% regroup view.get_carddefs by category.id as category_list %}
|
||||
<ul class="biglist">
|
||||
{% for category_id, object_list in category_list %}
|
||||
{% if not forloop.first or category_id %}<li><h3>{{ object_list.0.category.name|default:_('Misc') }}</h3></li>{% endif %}
|
||||
{% for carddef in object_list %}
|
||||
<li><a href="{{ carddef.url_name }}/">{{ carddef.name }}</a></li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,109 +1,109 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
<div id="appbar">
|
||||
<h2>{% trans "Data Source" %} - {{ datasource.name }}</h2>
|
||||
<span class="actions">
|
||||
{% if not datasource.is_readonly %}
|
||||
<a href="edit">{% trans "Edit" %}</a>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% if datasource.description %}
|
||||
<div class="bo-block">{{ datasource.description }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if datasource.data_source %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Configuration" %}</h3>
|
||||
<ul>
|
||||
{% if datasource.agenda_ds %}
|
||||
{% with datasource.agenda_ds_origin as origin %}
|
||||
<li>{% trans "Type of source:" %} {% trans "Agenda data" %}{% if origin %} ({% trans "Copy of:" %} <a href="{{ origin.get_admin_url }}">{{ origin.name }}</a>){% endif %}</li>
|
||||
<li>{% trans "URL:" %} <a href="{{ url }}">{{ datasource.data_source.value }}</a></li>
|
||||
{% if datasource.qs_data %}
|
||||
<li>{% trans "Extra query string data:" %}
|
||||
<ul>
|
||||
{% for k, v in datasource.qs_data.items %}
|
||||
<li>{% blocktrans %}{{ k }}:{% endblocktrans %} {{ v }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<li>{% trans "Type of source:" %} {{ datasource.type_label }}</li>
|
||||
{% if datasource.data_source.type == 'json' or datasource.data_source.type == 'jsonp' or datasource.data_source.type == 'geojson' %}
|
||||
<li>{% trans "URL:" %} <a href="{{ url }}">{{ datasource.data_source.value }}</a></li>
|
||||
{% elif datasource.data_source.type == 'formula' %}
|
||||
<li>{% trans "Python Expression:" %} {{ datasource.data_source.value }}</li>
|
||||
{% elif datasource.data_source.type == 'wcs:users' %}
|
||||
{% spaceless %}
|
||||
<li>{% trans "Users with roles:" %}
|
||||
<ul>
|
||||
{% for role in roles %}
|
||||
{% if role.0 in datasource.users_included_roles %}
|
||||
<li>{{ role.1 }}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
<li>{% trans "Users without roles:" %}
|
||||
<ul>
|
||||
{% for role in roles %}
|
||||
{% if role.0 in datasource.users_excluded_roles %}
|
||||
<li>{{ role.1 }}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
<li>{% trans "Include disabled users:" %}
|
||||
{% if datasource.include_disabled_users %}
|
||||
{% trans "Yes" %}
|
||||
{% else %}
|
||||
{% trans "No" %}
|
||||
<div id="appbar">
|
||||
<h2>{% trans "Data Source" %} - {{ datasource.name }}</h2>
|
||||
<span class="actions">
|
||||
{% if not datasource.is_readonly %}
|
||||
<a href="edit">{% trans "Edit" %}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endspaceless %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if datasource.cache_duration %}
|
||||
<li>{% trans "Cache Duration:" %} {{ datasource.humanized_cache_duration }}
|
||||
{% endif %}
|
||||
{% if not datasource.data_source.type == 'wcs:users' %}
|
||||
<li>{% trans "Notify on errors:" %} {{ datasource.notify_on_errors|yesno }}</li>
|
||||
<li>{% trans "Record on errors:" %} {{ datasource.record_on_errors|yesno }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% with preview_block=view.preview_block %}
|
||||
{% if preview_block %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Preview (first items only)" %}</h3>
|
||||
<div class="data-source-preview">
|
||||
{{ view.preview_block|safe }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% with formdefs=view.usage_in_formdefs %}
|
||||
{% if formdefs %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Usage in forms" %}</h3>
|
||||
<ul class="objects-list single-links">
|
||||
{% for formdef in formdefs %}
|
||||
<li><a href="{{ formdef.get_admin_url }}">{{ formdef.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% if datasource.description %}
|
||||
<div class="bo-block">{{ datasource.description }}</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% else %}
|
||||
<p class="infonotice">{% trans "Not configured" %}</p>
|
||||
{% endif %}
|
||||
{% if datasource.data_source %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Configuration" %}</h3>
|
||||
<ul>
|
||||
{% if datasource.agenda_ds %}
|
||||
{% with datasource.agenda_ds_origin as origin %}
|
||||
<li>{% trans "Type of source:" %} {% trans "Agenda data" %}{% if origin %} ({% trans "Copy of:" %} <a href="{{ origin.get_admin_url }}">{{ origin.name }}</a>){% endif %}</li>
|
||||
<li>{% trans "URL:" %} <a href="{{ url }}">{{ datasource.data_source.value }}</a></li>
|
||||
{% if datasource.qs_data %}
|
||||
<li>{% trans "Extra query string data:" %}
|
||||
<ul>
|
||||
{% for k, v in datasource.qs_data.items %}
|
||||
<li>{% blocktrans %}{{ k }}:{% endblocktrans %} {{ v }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<li>{% trans "Type of source:" %} {{ datasource.type_label }}</li>
|
||||
{% if datasource.data_source.type == 'json' or datasource.data_source.type == 'jsonp' or datasource.data_source.type == 'geojson' %}
|
||||
<li>{% trans "URL:" %} <a href="{{ url }}">{{ datasource.data_source.value }}</a></li>
|
||||
{% elif datasource.data_source.type == 'formula' %}
|
||||
<li>{% trans "Python Expression:" %} {{ datasource.data_source.value }}</li>
|
||||
{% elif datasource.data_source.type == 'wcs:users' %}
|
||||
{% spaceless %}
|
||||
<li>{% trans "Users with roles:" %}
|
||||
<ul>
|
||||
{% for role in roles %}
|
||||
{% if role.0 in datasource.users_included_roles %}
|
||||
<li>{{ role.1 }}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
<li>{% trans "Users without roles:" %}
|
||||
<ul>
|
||||
{% for role in roles %}
|
||||
{% if role.0 in datasource.users_excluded_roles %}
|
||||
<li>{{ role.1 }}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
<li>{% trans "Include disabled users:" %}
|
||||
{% if datasource.include_disabled_users %}
|
||||
{% trans "Yes" %}
|
||||
{% else %}
|
||||
{% trans "No" %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endspaceless %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if datasource.cache_duration %}
|
||||
<li>{% trans "Cache Duration:" %} {{ datasource.humanized_cache_duration }}
|
||||
{% endif %}
|
||||
{% if not datasource.data_source.type == 'wcs:users' %}
|
||||
<li>{% trans "Notify on errors:" %} {{ datasource.notify_on_errors|yesno }}</li>
|
||||
<li>{% trans "Record on errors:" %} {{ datasource.record_on_errors|yesno }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% with preview_block=view.preview_block %}
|
||||
{% if preview_block %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Preview (first items only)" %}</h3>
|
||||
<div class="data-source-preview">
|
||||
{{ view.preview_block|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% with formdefs=view.usage_in_formdefs %}
|
||||
{% if formdefs %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Usage in forms" %}</h3>
|
||||
<ul class="objects-list single-links">
|
||||
{% for formdef in formdefs %}
|
||||
<li><a href="{{ formdef.get_admin_url }}">{{ formdef.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% else %}
|
||||
<p class="infonotice">{% trans "Not configured" %}</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,94 +4,94 @@
|
|||
{% block appbar-title %}{% trans "Data Sources" %}{% endblock %}
|
||||
|
||||
{% block appbar-actions %}
|
||||
<a href="categories/">{% trans "Categories" %}</a>
|
||||
{% if has_chrono %}
|
||||
<a href="sync-agendas">{% trans "Refresh agendas" %}</a>
|
||||
{% endif %}
|
||||
<a data-popup href="import">{% trans "Import" %}</a>
|
||||
{% if has_users %}
|
||||
<a href="new-users">{% trans "New User Data Source" %}</a>
|
||||
{% endif %}
|
||||
<a href="new">{% trans "New Data Source" %}</a>
|
||||
<a href="categories/">{% trans "Categories" %}</a>
|
||||
{% if has_chrono %}
|
||||
<a href="sync-agendas">{% trans "Refresh agendas" %}</a>
|
||||
{% endif %}
|
||||
<a data-popup href="import">{% trans "Import" %}</a>
|
||||
{% if has_users %}
|
||||
<a href="new-users">{% trans "New User Data Source" %}</a>
|
||||
{% endif %}
|
||||
<a href="new">{% trans "New Data Source" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if has_users %}
|
||||
<div class="section foldable">
|
||||
<h2>{% trans "Users Data Sources" %}</h2>
|
||||
{% if user_data_sources %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for data_source in user_data_sources %}
|
||||
<li><a href="{{ data_source.id }}/">{{ data_source.name }} ({{ data_source.slug }})</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div>
|
||||
{% trans "There are no users data sources defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if categories %}
|
||||
{% for category in categories %}
|
||||
{% if category.data_sources %}
|
||||
<div class="section foldable">
|
||||
<h2>{{ category.name }}</h2>
|
||||
<ul class="objects-list single-links">
|
||||
{% for data_source in category.data_sources %}
|
||||
<li><a href="{{ data_source.id }}/">{{ data_source.name }} ({{ data_source.slug }})</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% if has_users %}
|
||||
<div class="section foldable">
|
||||
<h2>{% trans "Users Data Sources" %}</h2>
|
||||
{% if user_data_sources %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for data_source in user_data_sources %}
|
||||
<li><a href="{{ data_source.id }}/">{{ data_source.name }} ({{ data_source.slug }})</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div>
|
||||
{% trans "There are no users data sources defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% if data_sources %}
|
||||
<div class="section foldable">
|
||||
<h2>{% trans "Manually Configured Data Sources" %}</h2>
|
||||
<ul class="objects-list single-links">
|
||||
{% for data_source in data_sources %}
|
||||
<li><a href="{{ data_source.id }}/">{{ data_source.name }} ({{ data_source.slug }})</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div>
|
||||
{% trans "There are no data sources defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="section foldable">
|
||||
<h2>{% trans "Data Sources from Card Models" %} - {% trans "automatically configured" %}</h2>
|
||||
{% if generated_data_sources %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for data_source in generated_data_sources %}
|
||||
<li><a href="{{ data_source.0.get_url }}{% if data_source.3 %}{{ data_source.3.get_url_slug }}/{% endif %}">{{ data_source.1 }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div>
|
||||
{% trans "There are no data sources from card models." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if categories %}
|
||||
{% for category in categories %}
|
||||
{% if category.data_sources %}
|
||||
<div class="section foldable">
|
||||
<h2>{{ category.name }}</h2>
|
||||
<ul class="objects-list single-links">
|
||||
{% for data_source in category.data_sources %}
|
||||
<li><a href="{{ data_source.id }}/">{{ data_source.name }} ({{ data_source.slug }})</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% if data_sources %}
|
||||
<div class="section foldable">
|
||||
<h2>{% trans "Manually Configured Data Sources" %}</h2>
|
||||
<ul class="objects-list single-links">
|
||||
{% for data_source in data_sources %}
|
||||
<li><a href="{{ data_source.id }}/">{{ data_source.name }} ({{ data_source.slug }})</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div>
|
||||
{% trans "There are no data sources defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if has_chrono %}
|
||||
<div class="section foldable">
|
||||
<h2>{% trans "Agendas" %} - {% trans "automatically configured" %}</h2>
|
||||
{% if agenda_data_sources %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for data_source in agenda_data_sources %}
|
||||
<li><a href="{{ data_source.id }}/">{{ data_source.name }} ({{ data_source.slug }}){% if data_source.external_status == 'not-found' %} - <span class="extra-info">{% trans "not found" %}</span>{% endif %}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div>
|
||||
{% trans "There are no agendas." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="section foldable">
|
||||
<h2>{% trans "Data Sources from Card Models" %} - {% trans "automatically configured" %}</h2>
|
||||
{% if generated_data_sources %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for data_source in generated_data_sources %}
|
||||
<li><a href="{{ data_source.0.get_url }}{% if data_source.3 %}{{ data_source.3.get_url_slug }}/{% endif %}">{{ data_source.1 }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div>
|
||||
{% trans "There are no data sources from card models." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if has_chrono %}
|
||||
<div class="section foldable">
|
||||
<h2>{% trans "Agendas" %} - {% trans "automatically configured" %}</h2>
|
||||
{% if agenda_data_sources %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for data_source in agenda_data_sources %}
|
||||
<li><a href="{{ data_source.id }}/">{{ data_source.name }} ({{ data_source.slug }}){% if data_source.external_status == 'not-found' %} - <span class="extra-info">{% trans "not found" %}</span>{% endif %}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div>
|
||||
{% trans "There are no agendas." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,39 +3,39 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
<div id="appbar">
|
||||
<h2>{% trans "Deprecations Report" %}</h2>
|
||||
<span class="actions">
|
||||
<a href="scan">{% trans "Rescan for deprecations" %}</a>
|
||||
</span>
|
||||
</div>
|
||||
<div id="appbar">
|
||||
<h2>{% trans "Deprecations Report" %}</h2>
|
||||
<span class="actions">
|
||||
<a href="scan">{% trans "Rescan for deprecations" %}</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% if not report.report_lines %}
|
||||
<div class="no-deprecations">
|
||||
<p>{% trans "No deprecated items were found on this site." %}</p>
|
||||
</div>
|
||||
{% if not report.report_lines %}
|
||||
<div class="no-deprecations">
|
||||
<p>{% trans "No deprecated items were found on this site." %}</p>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<div class="section deprecations">
|
||||
{% else %}
|
||||
<div class="section deprecations">
|
||||
|
||||
{% regroup report.report_lines by category as category_report_lines %}
|
||||
{% for category in category_report_lines %}
|
||||
<h3>{{ view.titles|get:category.grouper }}</h3>
|
||||
<div class="section--{{ category.grouper }}">
|
||||
<div class="pk-information">
|
||||
<p>{{ view.short_docs|get:category.grouper }}
|
||||
<a href="{{ view.help_urls|get:category.grouper }}">{% trans "Read more" %}</a></p>
|
||||
</div>
|
||||
<ul>
|
||||
{% for report_line in category.list %}
|
||||
<li><a href="{{ report_line.url }}">{{ report_line.location_label }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% regroup report.report_lines by category as category_report_lines %}
|
||||
{% for category in category_report_lines %}
|
||||
<h3>{{ view.titles|get:category.grouper }}</h3>
|
||||
<div class="section--{{ category.grouper }}">
|
||||
<div class="pk-information">
|
||||
<p>{{ view.short_docs|get:category.grouper }}
|
||||
<a href="{{ view.help_urls|get:category.grouper }}">{% trans "Read more" %}</a></p>
|
||||
</div>
|
||||
<ul>
|
||||
{% for report_line in category.list %}
|
||||
<li><a href="{{ report_line.url }}">{{ report_line.location_label }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<p>{% trans "Generated on:" %} {{ report.now|datetime }}</p>
|
||||
{% endif %}
|
||||
<p>{% trans "Generated on:" %} {{ report.now|datetime }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="error-page pk-error">
|
||||
<h2>{{ title }}</h2>
|
||||
<p>{{ error_message }}</p>
|
||||
<p><a href="javascript: window.history.back();">{% trans "Go back" %}</a></p>
|
||||
</div>
|
||||
<div class="error-page pk-error">
|
||||
<h2>{{ title }}</h2>
|
||||
<p>{{ error_message }}</p>
|
||||
<p><a href="javascript: window.history.back();">{% trans "Go back" %}</a></p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,86 +4,86 @@
|
|||
{% block appbar-title %}{% trans "Data Inspector" %}{% endblock %}
|
||||
|
||||
{% block appbar-actions %}
|
||||
{% for action in actions %}
|
||||
<a href="{{ action.url }}">{{ action.label }}</a>
|
||||
{% endfor %}
|
||||
{% for action in actions %}
|
||||
<a href="{{ action.url }}">{{ action.label }}</a>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ block.super }}
|
||||
{{ block.super }}
|
||||
|
||||
<div id="inspect-test-tools" class="section">
|
||||
<h2>{% trans "Test tools" %}</h2>
|
||||
<div>
|
||||
{{ html_form.render|safe }}
|
||||
<div id="test-tool-result">
|
||||
{{ view.test_tool_result|safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="inspect-test-tools" class="section">
|
||||
<h2>{% trans "Test tools" %}</h2>
|
||||
<div>
|
||||
{{ html_form.render|safe }}
|
||||
<div id="test-tool-result">
|
||||
{{ view.test_tool_result|safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pk-tabs inspect-tabs">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
<button role="tab" aria-selected="true" aria-controls="inspect-variables" id="tab-variables" tabindex="0">{% trans "Variables" %}</button>
|
||||
{% if view.formdef.workflow.roles %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-functions" id="tab-functions" tabindex="-1">{% trans "Functions" %}</button>
|
||||
{% endif %}
|
||||
{% if has_tracing %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-timeline" id="tab-timeline" tabindex="-1">{% trans "Actions Tracing" %}</button>
|
||||
{% endif %}
|
||||
{% if has_markers_stack %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-markers" id="tab-markers" tabindex="-1">{% trans "Markers Stack" %}</button>
|
||||
{% endif %}
|
||||
{% if has_relations %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-relations" id="tab-relations" tabindex="-1">{% trans "Related Forms/Cards" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
<div class="pk-tabs inspect-tabs">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
<button role="tab" aria-selected="true" aria-controls="inspect-variables" id="tab-variables" tabindex="0">{% trans "Variables" %}</button>
|
||||
{% if view.formdef.workflow.roles %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-functions" id="tab-functions" tabindex="-1">{% trans "Functions" %}</button>
|
||||
{% endif %}
|
||||
{% if has_tracing %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-timeline" id="tab-timeline" tabindex="-1">{% trans "Actions Tracing" %}</button>
|
||||
{% endif %}
|
||||
{% if has_markers_stack %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-markers" id="tab-markers" tabindex="-1">{% trans "Markers Stack" %}</button>
|
||||
{% endif %}
|
||||
{% if has_relations %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-relations" id="tab-relations" tabindex="-1">{% trans "Related Forms/Cards" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
|
||||
<div id="inspect-variables" role="tabpanel" tabindex="0" aria-labelledby="tab-variables">
|
||||
<ul class="form-inspector biglist">
|
||||
{{ view.inspect_variables|safe }}
|
||||
</ul>
|
||||
</div>
|
||||
<div id="inspect-variables" role="tabpanel" tabindex="0" aria-labelledby="tab-variables">
|
||||
<ul class="form-inspector biglist">
|
||||
{{ view.inspect_variables|safe }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if view.formdef.workflow.roles %}
|
||||
<div id="inspect-functions" role="tabpanel" tabindex="0" aria-labelledby="tab-functions" hidden>
|
||||
<ul class="form-inspector biglist">
|
||||
{{ view.inspect_functions|safe }}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if view.formdef.workflow.roles %}
|
||||
<div id="inspect-functions" role="tabpanel" tabindex="0" aria-labelledby="tab-functions" hidden>
|
||||
<ul class="form-inspector biglist">
|
||||
{{ view.inspect_functions|safe }}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if has_tracing %}
|
||||
<div id="inspect-timeline" role="tabpanel" tabindex="0" aria-labelledby="tab-timeline" hidden>
|
||||
<div class="pk-attention">
|
||||
<p>{% blocktrans %}
|
||||
Beware actions, links and details do not represent the workflow as it was
|
||||
at the time it was run but as it is now. There can be inconsistencies.
|
||||
{% endblocktrans %}</p>
|
||||
</div>
|
||||
<ul class="form-inspector biglist">
|
||||
{{ view.inspect_tracing|safe }}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if has_tracing %}
|
||||
<div id="inspect-timeline" role="tabpanel" tabindex="0" aria-labelledby="tab-timeline" hidden>
|
||||
<div class="pk-attention">
|
||||
<p>{% blocktrans trimmed %}
|
||||
Beware actions, links and details do not represent the workflow as it was
|
||||
at the time it was run but as it is now. There can be inconsistencies.
|
||||
{% endblocktrans %}</p>
|
||||
</div>
|
||||
<ul class="form-inspector biglist">
|
||||
{{ view.inspect_tracing|safe }}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if has_markers_stack %}
|
||||
<div id="inspect-markers" role="tabpanel" tabindex="0" aria-labelledby="tab-markers" hidden>
|
||||
<ul class="form-inspector biglist">
|
||||
{{ view.inspect_markers_stack|safe }}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if has_markers_stack %}
|
||||
<div id="inspect-markers" role="tabpanel" tabindex="0" aria-labelledby="tab-markers" hidden>
|
||||
<ul class="form-inspector biglist">
|
||||
{{ view.inspect_markers_stack|safe }}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if has_relations %}
|
||||
<div id="inspect-relations" role="tabpanel" tabindex="0" aria-labelledby="tab-relations" hidden>
|
||||
<ul class="form-inspector biglist">
|
||||
{{ view.inspect_relations|safe }}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if has_relations %}
|
||||
<div id="inspect-relations" role="tabpanel" tabindex="0" aria-labelledby="tab-relations" hidden>
|
||||
<ul class="form-inspector biglist">
|
||||
{{ view.inspect_relations|safe }}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -5,83 +5,83 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
<div class="pk-tabs inspect-tabs inspect-form-tabs">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
<button role="tab" aria-selected="true" aria-controls="inspect-infos" id="tab-infos" tabindex="0">{% trans "Information" %}</button>
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-workflow" id="tab-workflow" tabindex="-1">{% trans "Workflow" %}</button>
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-options" id="tab-options" tabindex="-1">{% trans "Options" %}</button>
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-fields" id="tab-fields" tabindex="-1">{% trans "Fields" %}</button>
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
<div class="pk-tabs inspect-tabs inspect-form-tabs">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
<button role="tab" aria-selected="true" aria-controls="inspect-infos" id="tab-infos" tabindex="0">{% trans "Information" %}</button>
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-workflow" id="tab-workflow" tabindex="-1">{% trans "Workflow" %}</button>
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-options" id="tab-options" tabindex="-1">{% trans "Options" %}</button>
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-fields" id="tab-fields" tabindex="-1">{% trans "Fields" %}</button>
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
|
||||
<div id="inspect-infos" role="tabpanel" tabindex="0" aria-labelledby="tab-info">
|
||||
<ul>
|
||||
<li><span class="parameter">{% trans "Title" %}{% trans ":" %}</span> {{ formdef.name|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Description" %}{% trans ":" %}</span> {{ formdef.description|default:"-"|safe }}</li>
|
||||
<li><span class="parameter">{% trans "Keywords" %}{% trans ":" %}</span> {{ formdef.keywords|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Category" %}{% trans ":" %}</span> {% if formdef.category %}<a href="{{ formdef.category.get_admin_url }}">{{ formdef.category.name }}</a>{% else %}-{% endif %}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="inspect-infos" role="tabpanel" tabindex="0" aria-labelledby="tab-info">
|
||||
<ul>
|
||||
<li><span class="parameter">{% trans "Title" %}{% trans ":" %}</span> {{ formdef.name|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Description" %}{% trans ":" %}</span> {{ formdef.description|default:"-"|safe }}</li>
|
||||
<li><span class="parameter">{% trans "Keywords" %}{% trans ":" %}</span> {{ formdef.keywords|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Category" %}{% trans ":" %}</span> {% if formdef.category %}<a href="{{ formdef.category.get_admin_url }}">{{ formdef.category.name }}</a>{% else %}-{% endif %}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="inspect-workflow" role="tabpanel" tabindex="0" aria-labelledby="tab-workflow" hidden>
|
||||
<ul>
|
||||
<li><span class="parameter">{% trans "Workflow" %}{% trans ":" %}</span> <a href="{{ formdef.workflow.get_admin_url }}">{{ formdef.workflow.name }}</a></li>
|
||||
<li><span class="parameter">{% trans "Options" %}{% trans ":" %}</span> {% if not workflow_options %}-{% else %}<ul>
|
||||
{% for label, value in workflow_options.items %}
|
||||
{% if value == '__title__' or value == '__subtitle__' %}<li><strong>{{ label }}</strong></li>
|
||||
{% elif value == '__comment__' %}<li>{{ label }}</li>
|
||||
{% else %}
|
||||
<li>{{ label }} → {{ value|safe|default:"-" }}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>{% endif %}</li>
|
||||
{% for wf_role_id, wf_role_label, role_label in workflow_roles %}
|
||||
<li><span class="parameter">{{ wf_role_label }}{% trans ":" %}</span> {{ role_label|default:"-" }}</li>
|
||||
{% endfor %}
|
||||
<li><span class="parameter">{% trans "User Roles" %}{% trans ":" %}</span> {{ view.get_roles_label_and_auth_context|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Backoffice Submission Role" %}{% trans ":" %}</span> {{ backoffice_submission_roles|default:"-" }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="inspect-workflow" role="tabpanel" tabindex="0" aria-labelledby="tab-workflow" hidden>
|
||||
<ul>
|
||||
<li><span class="parameter">{% trans "Workflow" %}{% trans ":" %}</span> <a href="{{ formdef.workflow.get_admin_url }}">{{ formdef.workflow.name }}</a></li>
|
||||
<li><span class="parameter">{% trans "Options" %}{% trans ":" %}</span> {% if not workflow_options %}-{% else %}<ul>
|
||||
{% for label, value in workflow_options.items %}
|
||||
{% if value == '__title__' or value == '__subtitle__' %}<li><strong>{{ label }}</strong></li>
|
||||
{% elif value == '__comment__' %}<li>{{ label }}</li>
|
||||
{% else %}
|
||||
<li>{{ label }} → {{ value|safe|default:"-" }}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>{% endif %}</li>
|
||||
{% for wf_role_id, wf_role_label, role_label in workflow_roles %}
|
||||
<li><span class="parameter">{{ wf_role_label }}{% trans ":" %}</span> {{ role_label|default:"-" }}</li>
|
||||
{% endfor %}
|
||||
<li><span class="parameter">{% trans "User Roles" %}{% trans ":" %}</span> {{ view.get_roles_label_and_auth_context|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Backoffice Submission Role" %}{% trans ":" %}</span> {{ backoffice_submission_roles|default:"-" }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="inspect-options" role="tabpanel" tabindex="0" aria-labelledby="tab-options" hidden>
|
||||
<ul>
|
||||
<li><span class="parameter">{% trans "Confirmation Page" %}{% trans ":" %}</span> {{ formdef.confirmation|yesno }}</li>
|
||||
<li><span class="parameter">{% trans "Limit to one form" %}{% trans ":" %}</span> {{ formdef.only_allow_one|yesno }}</li>
|
||||
{% if formdef.roles %}
|
||||
<li><span class="parameter">{% trans "Display to unlogged users" %}{% trans ":" %}</span> {{ formdef.always_advertise|yesno }}</li>
|
||||
{% endif %}
|
||||
<li><span class="parameter">{% trans "Include button to download all files" %}{% trans ":" %}</span> {{ formdef.include_download_all_button|yesno }}</li>
|
||||
<li><span class="parameter">{% trans "Skip from per user view" %}{% trans ":" %}</span> {{ formdef.skip_from_360_view|yesno }}</li>
|
||||
<li><span class="parameter">{% trans "Tracking codes" %}{% trans ":" %}</span> {{ formdef.enable_tracking_codes|yesno }}</li>
|
||||
{% if formdef.enable_tracking_codes %}
|
||||
<li><span class="parameter">{% trans "Fields to check after entering the tracking code" %}{% trans ":" %}</span> {{ tracking_code_verify_fields_labels|default:"-" }}</li>
|
||||
{% endif %}
|
||||
<li><span class="parameter">{% trans "Lifespan of drafts (in days)" %}{% trans ":" %}</span> {{ formdef.drafts_lifespan|default_if_none:_('default value') }}</li>
|
||||
<li><span class="parameter">{% trans "Templates" %}</span>
|
||||
<ul>
|
||||
<li><span class="parameter">{% trans "Digest" %}{% trans ":" %}</span> {{ formdef.default_digest_template|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Lateral Block" %}{% trans ":" %}</span> {{ formdef.lateral_template|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Submission Lateral Block" %}{% trans ":" %}</span> {{ formdef.submission_lateral_template|default:"-" }}</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><span class="parameter">{% trans "Disable access to form" %}{% trans ":" %}</span> {{ formdef.disabled|yesno }}</li>
|
||||
<li><span class="parameter">{% trans "Redirection when disabled" %}{% trans ":" %}</span> {{ formdef.disabled_redirection|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Publication date" %}{% trans ":" %}</span> {{ formdef.publication_date|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Expiration date" %}{% trans ":" %}</span> {{ formdef.expiration_date|default:"-" }}</li>
|
||||
<div id="inspect-options" role="tabpanel" tabindex="0" aria-labelledby="tab-options" hidden>
|
||||
<ul>
|
||||
<li><span class="parameter">{% trans "Confirmation Page" %}{% trans ":" %}</span> {{ formdef.confirmation|yesno }}</li>
|
||||
<li><span class="parameter">{% trans "Limit to one form" %}{% trans ":" %}</span> {{ formdef.only_allow_one|yesno }}</li>
|
||||
{% if formdef.roles %}
|
||||
<li><span class="parameter">{% trans "Display to unlogged users" %}{% trans ":" %}</span> {{ formdef.always_advertise|yesno }}</li>
|
||||
{% endif %}
|
||||
<li><span class="parameter">{% trans "Include button to download all files" %}{% trans ":" %}</span> {{ formdef.include_download_all_button|yesno }}</li>
|
||||
<li><span class="parameter">{% trans "Skip from per user view" %}{% trans ":" %}</span> {{ formdef.skip_from_360_view|yesno }}</li>
|
||||
<li><span class="parameter">{% trans "Tracking codes" %}{% trans ":" %}</span> {{ formdef.enable_tracking_codes|yesno }}</li>
|
||||
{% if formdef.enable_tracking_codes %}
|
||||
<li><span class="parameter">{% trans "Fields to check after entering the tracking code" %}{% trans ":" %}</span> {{ tracking_code_verify_fields_labels|default:"-" }}</li>
|
||||
{% endif %}
|
||||
<li><span class="parameter">{% trans "Lifespan of drafts (in days)" %}{% trans ":" %}</span> {{ formdef.drafts_lifespan|default_if_none:_('default value') }}</li>
|
||||
<li><span class="parameter">{% trans "Templates" %}</span>
|
||||
<ul>
|
||||
<li><span class="parameter">{% trans "Digest" %}{% trans ":" %}</span> {{ formdef.default_digest_template|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Lateral Block" %}{% trans ":" %}</span> {{ formdef.lateral_template|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Submission Lateral Block" %}{% trans ":" %}</span> {{ formdef.submission_lateral_template|default:"-" }}</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><span class="parameter">{% trans "Disable access to form" %}{% trans ":" %}</span> {{ formdef.disabled|yesno }}</li>
|
||||
<li><span class="parameter">{% trans "Redirection when disabled" %}{% trans ":" %}</span> {{ formdef.disabled_redirection|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Publication date" %}{% trans ":" %}</span> {{ formdef.publication_date|default:"-" }}</li>
|
||||
<li><span class="parameter">{% trans "Expiration date" %}{% trans ":" %}</span> {{ formdef.expiration_date|default:"-" }}</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="inspect-fields" role="tabpanel" tabindex="0" aria-labelledby="tab-fields" hidden>
|
||||
<div class="pk-information page-field-counters"><p>
|
||||
{% blocktrans count page_count=formdef.page_count %}{{ page_count }} page{% plural %}{{ page_count }} pages{% endblocktrans %},
|
||||
{% blocktrans count fields_count=formdef.fields|count %}{{ fields_count }} field{% plural %}{{ fields_count }} fields{% endblocktrans %}.
|
||||
</p></div>
|
||||
{% for field in formdef.fields %}
|
||||
{% include "wcs/backoffice/includes/inspect-field.html" with path=formdef.get_admin_url|add:"fields/" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="inspect-fields" role="tabpanel" tabindex="0" aria-labelledby="tab-fields" hidden>
|
||||
<div class="pk-information page-field-counters"><p>
|
||||
{% blocktrans count page_count=formdef.page_count %}{{ page_count }} page{% plural %}{{ page_count }} pages{% endblocktrans %},
|
||||
{% blocktrans count fields_count=formdef.fields|count %}{{ fields_count }} field{% plural %}{{ fields_count }} fields{% endblocktrans %}.
|
||||
</p></div>
|
||||
{% for field in formdef.fields %}
|
||||
{% include "wcs/backoffice/includes/inspect-field.html" with path=formdef.get_admin_url|add:"fields/" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,45 +4,45 @@
|
|||
{% block appbar-title %}{% trans "Forms" %}{% endblock %}
|
||||
|
||||
{% block appbar-actions %}
|
||||
{% if has_roles %}
|
||||
{% if is_global_accessible_forms %}
|
||||
<a href="data-sources/">{% trans "Data sources" %}</a>
|
||||
<a href="blocks/">{% trans "Fields blocks" %}</a>
|
||||
{% if is_global_accessible_categories %}
|
||||
<a href="categories/">{% trans "Categories" %}</a>
|
||||
{% if has_roles %}
|
||||
{% if is_global_accessible_forms %}
|
||||
<a href="data-sources/">{% trans "Data sources" %}</a>
|
||||
<a href="blocks/">{% trans "Fields blocks" %}</a>
|
||||
{% if is_global_accessible_categories %}
|
||||
<a href="categories/">{% trans "Categories" %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<a rel="popup" href="import">{% trans "Import" %}</a>
|
||||
<a rel="popup" href="new">{% trans "New Form" %}</a>
|
||||
{% endif %}
|
||||
<a rel="popup" href="import">{% trans "Import" %}</a>
|
||||
<a rel="popup" href="new">{% trans "New Form" %}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if not has_roles %}
|
||||
<p>{% trans "You first have to define roles." %}</p>
|
||||
{% elif objects %}
|
||||
{% for category in categories %}
|
||||
{% if category.objects %}
|
||||
<div class="section">
|
||||
{% if category.name %}<h2>{{ category.name }}</h2>{% endif %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for item in category.objects %}
|
||||
<li {% if item.disabled %}class="disabled"{% endif %}><a href="{{ item.id }}/">{{ item.name }}
|
||||
{% if item.disabled and item.disabled_redirection %}
|
||||
<span class="extra-info">- {% trans "redirection" %}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% if not has_roles %}
|
||||
<p>{% trans "You first have to define roles." %}</p>
|
||||
{% elif objects %}
|
||||
{% for category in categories %}
|
||||
{% if category.objects %}
|
||||
<div class="section">
|
||||
{% if category.name %}<h2>{{ category.name }}</h2>{% endif %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for item in category.objects %}
|
||||
<li {% if item.disabled %}class="disabled"{% endif %}><a href="{{ item.id }}/">{{ item.name }}
|
||||
{% if item.disabled and item.disabled_redirection %}
|
||||
<span class="extra-info">- {% trans "redirection" %}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="infonotice">
|
||||
{% block no-objects %}
|
||||
{% trans "There are no forms defined." %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="infonotice">
|
||||
{% block no-objects %}
|
||||
{% trans "There are no forms defined." %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block appbar-title %}{{ action.name }} -
|
||||
{% if ids|length == 1 %}
|
||||
{{ formdata.formdef.item_name }} - {{ formdata.id_display }}
|
||||
{% else %}
|
||||
{% blocktrans with len=ids|length item_name=formdata.formdef.item_name_plural %}{{ len }} selected {{ item_name }}{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% if ids|length == 1 %}
|
||||
{{ formdata.formdef.item_name }} - {{ formdata.id_display }}
|
||||
{% else %}
|
||||
{% blocktrans with len=ids|length item_name=formdata.formdef.item_name_plural %}{{ len }} selected {{ item_name }}{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include "wcs/includes/global-interactive-action.html" %}
|
||||
{% include "wcs/includes/global-interactive-action.html" %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="inspect-field inspect-field--{{ field.key }} {% if forloop.first %}inspect-field--first{% endif %}"
|
||||
data-field-id="{{ field.id }}">
|
||||
<h4><a href="{{ path|default:"fields/" }}{{ field.id }}/">{{ field.ellipsized_label }}</a>
|
||||
<span class="inspect-field-type">-
|
||||
{% if field.key == 'block' %}<a href="{{ field.block.get_admin_url }}inspect">{% endif %}
|
||||
{{ field.get_type_label }}
|
||||
{% if field.key == 'block' %}</a>{% endif %}
|
||||
</span>
|
||||
</h4>
|
||||
{{ field.get_parameters_view|safe }}
|
||||
data-field-id="{{ field.id }}">
|
||||
<h4><a href="{{ path|default:"fields/" }}{{ field.id }}/">{{ field.ellipsized_label }}</a>
|
||||
<span class="inspect-field-type">-
|
||||
{% if field.key == 'block' %}<a href="{{ field.block.get_admin_url }}inspect">{% endif %}
|
||||
{{ field.get_type_label }}
|
||||
{% if field.key == 'block' %}</a>{% endif %}
|
||||
</span>
|
||||
</h4>
|
||||
{{ field.get_parameters_view|safe }}
|
||||
</div>
|
||||
|
|
|
@ -5,57 +5,57 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
<div class="pk-tabs logged-error-tabs">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
<button role="tab" aria-selected="true" aria-controls="panel-general" id="tab-general" tabindex="0">{% trans "General" %}</button>
|
||||
{% for tab in tabs %}
|
||||
<button role="tab" aria-selected="false" aria-controls="panel-{{ tab.slug }}" id="tab-{{ tab.slug }}" tabindex="-1">{{ tab.label }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
<div class="pk-tabs logged-error-tabs">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
<button role="tab" aria-selected="true" aria-controls="panel-general" id="tab-general" tabindex="0">{% trans "General" %}</button>
|
||||
{% for tab in tabs %}
|
||||
<button role="tab" aria-selected="false" aria-controls="panel-{{ tab.slug }}" id="tab-{{ tab.slug }}" tabindex="-1">{{ tab.label }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
|
||||
<div id="panel-general" role="tabpanel" tabindex="0" aria-labelledby="tab-general">
|
||||
<ul>
|
||||
<li>{% trans "First occurence:" %} {{ error.first_occurence_timestamp }}</li>
|
||||
<li>{% trans "Latest occurence:" %} {{ error.latest_occurence_timestamp }}</li>
|
||||
<li>{% trans "Count:" %} {{ error.formatted_occurences_count }}</li>
|
||||
{% if formdef %}
|
||||
<li>{{ formdef.verbose_name }}{% trans ":" %} <a href="{{ formdef.get_admin_url }}">{{ formdef.name }}</a>
|
||||
(<a href="{{ formdef.get_admin_url }}inspect">{% trans "inspector" %}</a>)</li>
|
||||
{% endif %}
|
||||
{% if workflow %}
|
||||
<li>{% trans "Workflow:" %} <a href="{{ workflow.get_admin_url }}">{{ workflow.name }}</a>
|
||||
(<a href="{{ workflow.get_admin_url }}inspect">{% trans "inspector" %}</a>)
|
||||
{% if status %}
|
||||
<ul>
|
||||
<li>{% trans "Status:" %} <a href="{{ workflow.get_admin_url }}status/{{ status.id }}/">{{ status.name }}</a></li>
|
||||
{% if status_item %}
|
||||
<li>{% trans "Action:" %} <a href="{{ workflow.get_admin_url }}status/{{ status.id }}/items/{{ status_item.id }}/">{% trans status_item.description %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if error.expression or error.expression_type %}
|
||||
<li>{{ view.error_expression_type_label }}{% trans ":" %} <code>{{ error.expression }}</code></li>
|
||||
{% endif %}
|
||||
{% if error.exception_class or error.exception_message %}
|
||||
<li>{% trans "Error message:" %} <code>{{ error.exception_class }}: {{ error.exception_message }}</code></li>
|
||||
{% endif %}
|
||||
{% if formdata %}
|
||||
<li>{% trans "Data:" %} <a href="{{ formdata.get_backoffice_url }}">{{ formdata.get_display_name }}</a>
|
||||
(<a href="{{ formdata.get_backoffice_url }}inspect">{% trans "inspector" %}</a>)</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
<div id="panel-general" role="tabpanel" tabindex="0" aria-labelledby="tab-general">
|
||||
<ul>
|
||||
<li>{% trans "First occurence:" %} {{ error.first_occurence_timestamp }}</li>
|
||||
<li>{% trans "Latest occurence:" %} {{ error.latest_occurence_timestamp }}</li>
|
||||
<li>{% trans "Count:" %} {{ error.formatted_occurences_count }}</li>
|
||||
{% if formdef %}
|
||||
<li>{{ formdef.verbose_name }}{% trans ":" %} <a href="{{ formdef.get_admin_url }}">{{ formdef.name }}</a>
|
||||
(<a href="{{ formdef.get_admin_url }}inspect">{% trans "inspector" %}</a>)</li>
|
||||
{% endif %}
|
||||
{% if workflow %}
|
||||
<li>{% trans "Workflow:" %} <a href="{{ workflow.get_admin_url }}">{{ workflow.name }}</a>
|
||||
(<a href="{{ workflow.get_admin_url }}inspect">{% trans "inspector" %}</a>)
|
||||
{% if status %}
|
||||
<ul>
|
||||
<li>{% trans "Status:" %} <a href="{{ workflow.get_admin_url }}status/{{ status.id }}/">{{ status.name }}</a></li>
|
||||
{% if status_item %}
|
||||
<li>{% trans "Action:" %} <a href="{{ workflow.get_admin_url }}status/{{ status.id }}/items/{{ status_item.id }}/">{% trans status_item.description %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if error.expression or error.expression_type %}
|
||||
<li>{{ view.error_expression_type_label }}{% trans ":" %} <code>{{ error.expression }}</code></li>
|
||||
{% endif %}
|
||||
{% if error.exception_class or error.exception_message %}
|
||||
<li>{% trans "Error message:" %} <code>{{ error.exception_class }}: {{ error.exception_message }}</code></li>
|
||||
{% endif %}
|
||||
{% if formdata %}
|
||||
<li>{% trans "Data:" %} <a href="{{ formdata.get_backoffice_url }}">{{ formdata.get_display_name }}</a>
|
||||
(<a href="{{ formdata.get_backoffice_url }}inspect">{% trans "inspector" %}</a>)</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% for tab in tabs %}
|
||||
<div id="panel-{{ tab.slug }}" role="tabpanel" tabindex="0" aria-labelledby="tab-{{ tab.slug }}" hidden>
|
||||
{{ tab.content.getvalue|safe }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% for tab in tabs %}
|
||||
<div id="panel-{{ tab.slug }}" role="tabpanel" tabindex="0" aria-labelledby="tab-{{ tab.slug }}" hidden>
|
||||
{{ tab.content.getvalue|safe }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
{% block appbar-title %}{% trans "Logged Errors" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for error in errors %}
|
||||
<li><a href="{{ error.id }}/">{{ error.summary }}
|
||||
{% if error.exception_class or error.exception_message %}
|
||||
<span class="extra-info">- {{error.exception_class}} ({{error.exception_message}})</span>
|
||||
{% endif %}
|
||||
</a><span class="badge">{{ error.formatted_occurences_count }}</span></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{{ pagination_links|safe }}
|
||||
<ul class="objects-list single-links">
|
||||
{% for error in errors %}
|
||||
<li><a href="{{ error.id }}/">{{ error.summary }}
|
||||
{% if error.exception_class or error.exception_message %}
|
||||
<span class="extra-info">- {{error.exception_class}} ({{error.exception_message}})</span>
|
||||
{% endif %}
|
||||
</a><span class="badge">{{ error.formatted_occurences_count }}</span></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{{ pagination_links|safe }}
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,37 +4,37 @@
|
|||
{% block appbar-title %}{% trans "Mail Template" %} - {{ mail_template.name }}{% endblock %}
|
||||
|
||||
{% block appbar-actions %}
|
||||
{% if not mail_template.is_readonly %}
|
||||
<a href="edit">{% trans "Edit" %}</a>
|
||||
{% endif %}
|
||||
{% if not mail_template.is_readonly %}
|
||||
<a href="edit">{% trans "Edit" %}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if mail_template.description %}
|
||||
<div class="bo-block">{{ mail_template.description }}</div>
|
||||
{% endif %}
|
||||
{% if mail_template.description %}
|
||||
<div class="bo-block">{{ mail_template.description }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if mail_template.subject and mail_template.body %}
|
||||
<div class="section">
|
||||
<h3 class="mail-subject"><strong>{% trans "Subject:" %}</strong> <span>{{ mail_template.subject }}</span></h3>
|
||||
<div class="mail-body">{{ mail_template.body }}</div>
|
||||
</div>
|
||||
{% if mail_template.subject and mail_template.body %}
|
||||
<div class="section">
|
||||
<h3 class="mail-subject"><strong>{% trans "Subject:" %}</strong> <span>{{ mail_template.subject }}</span></h3>
|
||||
<div class="mail-body">{{ mail_template.body }}</div>
|
||||
</div>
|
||||
|
||||
{% for workflow in mail_template.get_places_of_use %}
|
||||
{% if forloop.first %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Usage in workflows" %}</h3>
|
||||
<ul class="objects-list single-links">
|
||||
{% endif %}
|
||||
<li><a href="{{ workflow.get_admin_url }}">{{ workflow.name }}</a></li>
|
||||
{% if forloop.last %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for workflow in mail_template.get_places_of_use %}
|
||||
{% if forloop.first %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Usage in workflows" %}</h3>
|
||||
<ul class="objects-list single-links">
|
||||
{% endif %}
|
||||
<li><a href="{{ workflow.get_admin_url }}">{{ workflow.name }}</a></li>
|
||||
{% if forloop.last %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% else %}
|
||||
<div class="infonotice">{% trans "This mail template still needs to be configured." %}</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="infonotice">{% trans "This mail template still needs to be configured." %}</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,34 +4,34 @@
|
|||
{% block appbar-title %}{% trans "Mail Templates" %}{% endblock %}
|
||||
|
||||
{% block appbar-actions %}
|
||||
<a href="categories/">{% trans "Categories" %}</a>
|
||||
<a rel="popup" href="import">{% trans "Import" %}</a>
|
||||
<a rel="popup" href="new">{% trans "New mail template" %}</a>
|
||||
<a href="categories/">{% trans "Categories" %}</a>
|
||||
<a rel="popup" href="import">{% trans "Import" %}</a>
|
||||
<a rel="popup" href="new">{% trans "New mail template" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if categories %}
|
||||
{% for category in categories %}
|
||||
{% if category.mail_templates %}
|
||||
<div class="section">
|
||||
<h2>{{ category.name }}</h2>
|
||||
{% if categories %}
|
||||
{% for category in categories %}
|
||||
{% if category.mail_templates %}
|
||||
<div class="section">
|
||||
<h2>{{ category.name }}</h2>
|
||||
<ul class="objects-list single-links">
|
||||
{% for mail_template in category.mail_templates %}
|
||||
<li><a href="{{ mail_template.id }}/">{{ mail_template.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% elif mail_templates %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for mail_template in category.mail_templates %}
|
||||
<li><a href="{{ mail_template.id }}/">{{ mail_template.name }}</a></li>
|
||||
{% for mail_template in mail_templates %}
|
||||
<li><a href="{{ mail_template.id }}/">{{ mail_template.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="infonotice">
|
||||
{% trans "There are no mail templates defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% elif mail_templates %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for mail_template in mail_templates %}
|
||||
<li><a href="{{ mail_template.id }}/">{{ mail_template.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class="infonotice">
|
||||
{% trans "There are no mail templates defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<head><title>{% trans 'Popup closing...' %}</title></head>
|
||||
<body>
|
||||
<script type="text/javascript"
|
||||
id="popup-response-constants"
|
||||
src="{% static "/js/popup_response.js" %}"
|
||||
data-popup-response="{{ popup_response_data }}">
|
||||
id="popup-response-constants"
|
||||
src="{% static "/js/popup_response.js" %}"
|
||||
data-popup-response="{{ popup_response_data }}">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
{% block appbar-title %}{% trans "Executing task..." %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="section">
|
||||
<dl class="job-status">
|
||||
<dt>{{ job.label }}</dt>
|
||||
<dd><span class="afterjob" id="{{ job.id }}">{% trans job.status %}</span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section">
|
||||
<dl class="job-status">
|
||||
<dt>{{ job.label }}</dt>
|
||||
<dd><span class="afterjob" id="{{ job.id }}">{% trans job.status %}</span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="done" style="display: none">
|
||||
<a {% for attr in job.done_button_attributes.items %}{{ attr.0 }}="{{ attr.1 }}"{% endfor %}
|
||||
class="button" href="{{ job.done_action_url }}">{{ job.done_action_label }}</a>
|
||||
</div>
|
||||
<div class="done" style="display: none">
|
||||
<a {% for attr in job.done_button_attributes.items %}{{ attr.0 }}="{{ attr.1 }}"{% endfor %}
|
||||
class="button" href="{{ job.done_action_url }}">{{ job.done_action_label }}</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,52 +4,52 @@
|
|||
{% block appbar-title %}{% trans "Import" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if error %}
|
||||
<p>{% trans "Error:" %} {{ error }}</p>
|
||||
{% else %}
|
||||
<p>{% trans "Imported successfully:" %}</p>
|
||||
<ul>
|
||||
{% if results.formdefs %}
|
||||
<li>{% blocktrans count counter=results.formdefs %}1 form{% plural %}{{ counter }} forms{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.carddefs %}
|
||||
<li>{% blocktrans count counter=results.carddefs %}1 card{% plural %}{{ counter }} cards{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.blockdefs %}
|
||||
<li>{% blocktrans count counter=results.blockdefs %}1 fields block{% plural %}{{ counter }} fields blocks{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.workflows %}
|
||||
<li>{% blocktrans count counter=results.workflows %}1 workflow{% plural %}{{ counter }} workflows{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.roles %}
|
||||
<li>{% blocktrans count counter=results.roles %}1 role{% plural %}{{ counter }} roles{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.categories %}
|
||||
<li>{% blocktrans count counter=results.categories %}1 category{% plural %}{{ counter }} categories{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.carddef_categories %}
|
||||
<li>{% blocktrans count counter=results.carddef_categories %}1 card category{% plural %}{{ counter }} card categories{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.workflow_categories %}
|
||||
<li>{% blocktrans count counter=results.workflow_categories %}1 workflow category{% plural %}{{ counter }} workflow categories{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.datasources %}
|
||||
<li>{% blocktrans count counter=results.datasources %}1 data source{% plural %}{{ counter }} data sources{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.mail_templates %}
|
||||
<li>{% blocktrans count counter=results.mail_templates %}1 mail template{% plural %}{{ counter }} mail templates{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.wscalls %}
|
||||
<li>{% blocktrans count counter=results.wscalls %}1 webservice call{% plural %}{{ counter }} webservice calls{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.apiaccess %}
|
||||
<li>{% blocktrans count counter=results.apiaccess %}1 API access{% plural %}{{ counter }} API accesses{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.settings %}
|
||||
<li>{% trans "Settings" %}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if error %}
|
||||
<p>{% trans "Error:" %} {{ error }}</p>
|
||||
{% else %}
|
||||
<p>{% trans "Imported successfully:" %}</p>
|
||||
<ul>
|
||||
{% if results.formdefs %}
|
||||
<li>{% blocktrans count counter=results.formdefs %}1 form{% plural %}{{ counter }} forms{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.carddefs %}
|
||||
<li>{% blocktrans count counter=results.carddefs %}1 card{% plural %}{{ counter }} cards{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.blockdefs %}
|
||||
<li>{% blocktrans count counter=results.blockdefs %}1 fields block{% plural %}{{ counter }} fields blocks{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.workflows %}
|
||||
<li>{% blocktrans count counter=results.workflows %}1 workflow{% plural %}{{ counter }} workflows{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.roles %}
|
||||
<li>{% blocktrans count counter=results.roles %}1 role{% plural %}{{ counter }} roles{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.categories %}
|
||||
<li>{% blocktrans count counter=results.categories %}1 category{% plural %}{{ counter }} categories{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.carddef_categories %}
|
||||
<li>{% blocktrans count counter=results.carddef_categories %}1 card category{% plural %}{{ counter }} card categories{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.workflow_categories %}
|
||||
<li>{% blocktrans count counter=results.workflow_categories %}1 workflow category{% plural %}{{ counter }} workflow categories{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.datasources %}
|
||||
<li>{% blocktrans count counter=results.datasources %}1 data source{% plural %}{{ counter }} data sources{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.mail_templates %}
|
||||
<li>{% blocktrans count counter=results.mail_templates %}1 mail template{% plural %}{{ counter }} mail templates{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.wscalls %}
|
||||
<li>{% blocktrans count counter=results.wscalls %}1 webservice call{% plural %}{{ counter }} webservice calls{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.apiaccess %}
|
||||
<li>{% blocktrans count counter=results.apiaccess %}1 API access{% plural %}{{ counter }} API accesses{% endblocktrans %}</li>
|
||||
{% endif %}
|
||||
{% if results.settings %}
|
||||
<li>{% trans "Settings" %}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<p><a href=".">{% trans "Back" %}</a></p>
|
||||
<p><a href=".">{% trans "Back" %}</a></p>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,89 +1,89 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
<div id="appbar">
|
||||
<h2>{% trans "History" %}</h2>
|
||||
</div>
|
||||
<div id="appbar">
|
||||
<h2>{% trans "History" %}</h2>
|
||||
</div>
|
||||
|
||||
{{ publisher.get_request.session.display_message|safe }}
|
||||
{{ publisher.get_request.session.display_message|safe }}
|
||||
|
||||
{% with snapshots=view.snapshots %}
|
||||
{% if snapshots %}
|
||||
<div class="section">
|
||||
<form action="compare" method="get">
|
||||
{% if snapshots|length > 1 %}
|
||||
<p><button>{% trans "Show differences" %}</button></p>
|
||||
{% endif %}
|
||||
<table class="main snapshots-table">
|
||||
<thead>
|
||||
<th>{% trans "Identifier" %}</th>
|
||||
<th>{% trans "Compare" %}</th>
|
||||
<th colspan="2">{% trans 'Date' %}</th>
|
||||
<th colspan="3">{% trans "Description" %}</th>
|
||||
<th>{% trans 'User' %}</th>
|
||||
<th colspan="2">{% trans 'Actions' %}</th>
|
||||
</thead>
|
||||
<tbody class="snapshots-list">
|
||||
{% for snapshot in snapshots %}
|
||||
<tr data-day="{{ snapshot.timestamp|date:"Y-m-d" }}" class="{% if snapshot.new_day %}new-day{% elif snapshot.label %}has-label{% else %}collapsed{% endif %}">
|
||||
<td>
|
||||
<span class="counter">#{{ snapshot.id }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{% if snapshots|length > 1 %}
|
||||
{% if not forloop.last %}<input type="radio" name="version1" value="{{ snapshot.id }}" {% if forloop.first %}checked="checked"{% endif %} />{% else %} {% endif %}
|
||||
{% if not forloop.first %}<input type="radio" name="version2" value="{{ snapshot.id }}" {% if forloop.counter == 2 %}checked="checked"{% endif %}/>{% else %} {% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td colspan="2">
|
||||
{{ snapshot.timestamp }}
|
||||
{% if snapshot.new_day and snapshot.day_other_count %} — <a class="reveal"
|
||||
href="#day-{{ snapshot.timestamp|date:"Y-m-d"}}">
|
||||
{% if snapshot.day_other_count >= 50 %}<strong>{% endif %}
|
||||
{% blocktrans trimmed count counter=snapshot.day_other_count %}
|
||||
1 other this day
|
||||
{% plural %}
|
||||
{{ counter }} others
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="label" colspan="3">
|
||||
{% if snapshot.label %}<strong>{{ snapshot.label }}</strong>{% elif snapshot.comment %}{{ snapshot.comment }}{% endif %}
|
||||
</td>
|
||||
<td>{% if snapshot.user_id %}{{ snapshot.user }}{% endif %}</td>
|
||||
<td colspan="2">
|
||||
<a href="{{snapshot.id}}/view/">{% trans "View" %}</a>
|
||||
—
|
||||
<a data-popup href="{{snapshot.id}}/restore">{% trans "Restore" %}</a>
|
||||
—
|
||||
<a href="{{snapshot.id}}/export">{% trans "Export" %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<ul class="objects-list snapshots-list">
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="infonotice"><p>{% trans "No changes history" %}</p></div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% with snapshots=view.snapshots %}
|
||||
{% if snapshots %}
|
||||
<div class="section">
|
||||
<form action="compare" method="get">
|
||||
{% if snapshots|length > 1 %}
|
||||
<p><button>{% trans "Show differences" %}</button></p>
|
||||
{% endif %}
|
||||
<table class="main snapshots-table">
|
||||
<thead>
|
||||
<th>{% trans "Identifier" %}</th>
|
||||
<th>{% trans "Compare" %}</th>
|
||||
<th colspan="2">{% trans 'Date' %}</th>
|
||||
<th colspan="3">{% trans "Description" %}</th>
|
||||
<th>{% trans 'User' %}</th>
|
||||
<th colspan="2">{% trans 'Actions' %}</th>
|
||||
</thead>
|
||||
<tbody class="snapshots-list">
|
||||
{% for snapshot in snapshots %}
|
||||
<tr data-day="{{ snapshot.timestamp|date:"Y-m-d" }}" class="{% if snapshot.new_day %}new-day{% elif snapshot.label %}has-label{% else %}collapsed{% endif %}">
|
||||
<td>
|
||||
<span class="counter">#{{ snapshot.id }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{% if snapshots|length > 1 %}
|
||||
{% if not forloop.last %}<input type="radio" name="version1" value="{{ snapshot.id }}" {% if forloop.first %}checked="checked"{% endif %} />{% else %} {% endif %}
|
||||
{% if not forloop.first %}<input type="radio" name="version2" value="{{ snapshot.id }}" {% if forloop.counter == 2 %}checked="checked"{% endif %}/>{% else %} {% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td colspan="2">
|
||||
{{ snapshot.timestamp }}
|
||||
{% if snapshot.new_day and snapshot.day_other_count %} — <a class="reveal"
|
||||
href="#day-{{ snapshot.timestamp|date:"Y-m-d"}}">
|
||||
{% if snapshot.day_other_count >= 50 %}<strong>{% endif %}
|
||||
{% blocktrans trimmed count counter=snapshot.day_other_count %}
|
||||
1 other this day
|
||||
{% plural %}
|
||||
{{ counter }} others
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="label" colspan="3">
|
||||
{% if snapshot.label %}<strong>{{ snapshot.label }}</strong>{% elif snapshot.comment %}{{ snapshot.comment }}{% endif %}
|
||||
</td>
|
||||
<td>{% if snapshot.user_id %}{{ snapshot.user }}{% endif %}</td>
|
||||
<td colspan="2">
|
||||
<a href="{{snapshot.id}}/view/">{% trans "View" %}</a>
|
||||
—
|
||||
<a data-popup href="{{snapshot.id}}/restore">{% trans "Restore" %}</a>
|
||||
—
|
||||
<a href="{{snapshot.id}}/export">{% trans "Export" %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<ul class="objects-list snapshots-list">
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="infonotice"><p>{% trans "No changes history" %}</p></div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('tr.new-day a.reveal').on('click', function() {
|
||||
var day = $(this).parents('tr.new-day').data('day');
|
||||
$('.snapshots-list tr[data-day="' + day + '"]:not(.new-day)').toggleClass('collapsed');
|
||||
return false;
|
||||
});
|
||||
$('input[name="version1"]').on('click', function() {
|
||||
var next = $(this).parent('tr').next();
|
||||
$('input[name="version2"]', next).prop('checked', true);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('tr.new-day a.reveal').on('click', function() {
|
||||
var day = $(this).parents('tr.new-day').data('day');
|
||||
$('.snapshots-list tr[data-day="' + day + '"]:not(.new-day)').toggleClass('collapsed');
|
||||
return false;
|
||||
});
|
||||
$('input[name="version1"]').on('click', function() {
|
||||
var next = $(this).parent('tr').next();
|
||||
$('input[name="version2"]', next).prop('checked', true);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,31 +3,31 @@
|
|||
|
||||
{% block appbar-title %}{% trans "Compare snapshots" %}{% if has_inspect %} ({% if mode == 'xml' %}{% trans "XML" %}{% else %}{% trans "Inspect" %}{% endif %}){% endif %}{% endblock %}
|
||||
{% block appbar-actions %}
|
||||
{% if has_inspect %}
|
||||
<a href="?version1={{ snapshot1.id }}&version2={{ snapshot2.id }}&mode=inspect">{% trans "Compare inspect" %}</a>
|
||||
<a href="?version1={{ snapshot1.id }}&version2={{ snapshot2.id }}&mode=xml">{% trans "Compare XML" %}</a>
|
||||
{% endif %}
|
||||
{% if has_inspect %}
|
||||
<a href="?version1={{ snapshot1.id }}&version2={{ snapshot2.id }}&mode=inspect">{% trans "Compare inspect" %}</a>
|
||||
<a href="?version1={{ snapshot1.id }}&version2={{ snapshot2.id }}&mode=xml">{% trans "Compare XML" %}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p class="snapshot-description">{{ fromdesc|safe }} ➔ {{ todesc|safe }}</p>
|
||||
<div class="diff">
|
||||
{% if mode == 'xml' %}
|
||||
{{ diff_serialization|safe }}
|
||||
{% else %}
|
||||
<div class="{{ tab_class_names }}">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
{% for tab in tabs %}{{ tab|safe }}{% endfor %}
|
||||
{{ tab_list|safe }}
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
{% for attrs, panel in panels %}
|
||||
<div{% for k, v in attrs.items %} {{ k }}="{{ v }}"{% endfor %}>
|
||||
{{ panel|safe }}
|
||||
<p class="snapshot-description">{{ fromdesc|safe }} ➔ {{ todesc|safe }}</p>
|
||||
<div class="diff">
|
||||
{% if mode == 'xml' %}
|
||||
{{ diff_serialization|safe }}
|
||||
{% else %}
|
||||
<div class="{{ tab_class_names }}">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
{% for tab in tabs %}{{ tab|safe }}{% endfor %}
|
||||
{{ tab_list|safe }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
{% for attrs, panel in panels %}
|
||||
<div{% for k, v in attrs.items %} {{ k }}="{{ v }}"{% endfor %}>
|
||||
{{ panel|safe }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,66 +3,66 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
{% block appbar %}
|
||||
<div id="appbar" class="highlight">
|
||||
<h2>{% trans "Studio" %}</h2>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
<div id="studio">
|
||||
<div class="fx-grid--t3">
|
||||
<div class="fx-grid--t2">
|
||||
{% if user.can_go_in_backoffice_forms %}
|
||||
<a class="button button-paragraph size--1-1" href="../forms/">{% trans "Forms" context "studio" %}
|
||||
<p>{% trans "Forms are typically used to collect user demands." %}</p>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if user.can_go_in_backoffice_cards %}
|
||||
<a class="button button-paragraph size--1-1" href="../cards/">{% trans "Cards" context "studio" %}
|
||||
<p>{% trans "Cards are used to store list of structured data." %}</p>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if user.can_go_in_backoffice_workflows %}
|
||||
<a class="button button-paragraph size--1-1" href="../workflows/">{% trans "Workflows" context "studio" %}
|
||||
<p>{% trans "Workflows are used to add custom behaviours or actions to forms and cards." %}</p>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% for link, label in extra_links %}
|
||||
<a class="button button-paragraph" href="{{ link }}">{{ label }}</a>
|
||||
{% endfor %}
|
||||
{% block appbar %}
|
||||
<div id="appbar" class="highlight">
|
||||
<h2>{% trans "Studio" %}</h2>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
<div class="paragraph">
|
||||
<h3>{% trans "Recent changes" context "studio" %}</h3>
|
||||
<ul class="recent-changes">
|
||||
{% for obj in recent_objects %}
|
||||
<li><a href="{{ obj.get_admin_url }}">{{ obj.name }} ({{ obj.verbose_name }})</a>
|
||||
<span class="timestamp">{{ obj.snapshot_timestamp }}</span></li>
|
||||
<div id="studio">
|
||||
<div class="fx-grid--t3">
|
||||
<div class="fx-grid--t2">
|
||||
{% if user.can_go_in_backoffice_forms %}
|
||||
<a class="button button-paragraph size--1-1" href="../forms/">{% trans "Forms" context "studio" %}
|
||||
<p>{% trans "Forms are typically used to collect user demands." %}</p>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if user.can_go_in_backoffice_cards %}
|
||||
<a class="button button-paragraph size--1-1" href="../cards/">{% trans "Cards" context "studio" %}
|
||||
<p>{% trans "Cards are used to store list of structured data." %}</p>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if user.can_go_in_backoffice_workflows %}
|
||||
<a class="button button-paragraph size--1-1" href="../workflows/">{% trans "Workflows" context "studio" %}
|
||||
<p>{% trans "Workflows are used to add custom behaviours or actions to forms and cards." %}</p>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% for link, label in extra_links %}
|
||||
<a class="button button-paragraph" href="{{ link }}">{{ label }}</a>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if show_all_changes %}
|
||||
<p><a class="all-changes pk-button" href="all-changes/">{% trans "See all changes" %}</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="errors-and-deprecations">
|
||||
<div class="paragraph recent-errors {% if not recent_errors %}no-recent-errors{% endif %}">
|
||||
<h3>{% trans "Recent errors" context "studio" %}</h3>
|
||||
{% if recent_errors %}
|
||||
<ul>
|
||||
{% for error in recent_errors %}
|
||||
<li><a href="logged-errors/{{ error.id }}/">{{ error.wbr_summary|safe|truncatechars_html:150 }}</a></li>
|
||||
<div class="paragraph">
|
||||
<h3>{% trans "Recent changes" context "studio" %}</h3>
|
||||
<ul class="recent-changes">
|
||||
{% for obj in recent_objects %}
|
||||
<li><a href="{{ obj.get_admin_url }}">{{ obj.name }} ({{ obj.verbose_name }})</a>
|
||||
<span class="timestamp">{{ obj.snapshot_timestamp }}</span></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p><a class="logged-errors-all pk-button" href="logged-errors/">{% trans "See all errors" context "studio" %}</a></p>
|
||||
{% else %}
|
||||
<p>{% trans "No errors, congratulations!" %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<p><a class="button button-paragraph" href="deprecations/">{% trans "Deprecations Report" %}</a></p>
|
||||
</div>
|
||||
{% if show_all_changes %}
|
||||
<p><a class="all-changes pk-button" href="all-changes/">{% trans "See all changes" %}</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="errors-and-deprecations">
|
||||
<div class="paragraph recent-errors {% if not recent_errors %}no-recent-errors{% endif %}">
|
||||
<h3>{% trans "Recent errors" context "studio" %}</h3>
|
||||
{% if recent_errors %}
|
||||
<ul>
|
||||
{% for error in recent_errors %}
|
||||
<li><a href="logged-errors/{{ error.id }}/">{{ error.wbr_summary|safe|truncatechars_html:150 }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p><a class="logged-errors-all pk-button" href="logged-errors/">{% trans "See all errors" context "studio" %}</a></p>
|
||||
{% else %}
|
||||
<p>{% trans "No errors, congratulations!" %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<p><a class="button button-paragraph" href="deprecations/">{% trans "Deprecations Report" %}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
{{script|safe}}
|
||||
</html>
|
||||
<body>
|
||||
<div id="workflow-fullscreen-schema">
|
||||
{{ view.graphviz|safe }}
|
||||
<div class="full-screen-link"><a download href="schema.svg">{% trans "Download" %}</a></div>
|
||||
</div>
|
||||
<div id="workflow-fullscreen-schema">
|
||||
{{ view.graphviz|safe }}
|
||||
<div class="full-screen-link"><a download href="schema.svg">{% trans "Download" %}</a></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -5,100 +5,100 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
<div class="pk-tabs inspect-tabs inspect-workflow-tabs">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
<button role="tab" aria-selected="true" aria-controls="inspect-statuses" id="tab-statuses" tabindex="0">{% trans "Statuses" %}</button>
|
||||
{% if workflow.global_actions %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-global-actions" id="tab-global-actions" tabindex="-1">{% trans "Global Actions" %}</button>
|
||||
{% endif %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-functions" id="tab-functions" tabindex="-1">{% trans "Functions" %}</button>
|
||||
{% if workflow.variables_formdef %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-variables" id="tab-variables" tabindex="-1">{% trans "Workflow Variables" %}</button>
|
||||
{% endif %}
|
||||
{% if workflow.backoffice_fields_formdef %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-fields" id="tab-fields" tabindex="-1">{% trans "Backoffice Fields" %}</button>
|
||||
{% endif %}
|
||||
{% if workflow.criticality_levels %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-criticality" id="tab-criticality" tabindex="-1">{% trans "Criticality Levels" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
<div class="pk-tabs inspect-tabs inspect-workflow-tabs">
|
||||
<div class="pk-tabs--tab-list" role="tablist">
|
||||
<button role="tab" aria-selected="true" aria-controls="inspect-statuses" id="tab-statuses" tabindex="0">{% trans "Statuses" %}</button>
|
||||
{% if workflow.global_actions %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-global-actions" id="tab-global-actions" tabindex="-1">{% trans "Global Actions" %}</button>
|
||||
{% endif %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-functions" id="tab-functions" tabindex="-1">{% trans "Functions" %}</button>
|
||||
{% if workflow.variables_formdef %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-variables" id="tab-variables" tabindex="-1">{% trans "Workflow Variables" %}</button>
|
||||
{% endif %}
|
||||
{% if workflow.backoffice_fields_formdef %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-fields" id="tab-fields" tabindex="-1">{% trans "Backoffice Fields" %}</button>
|
||||
{% endif %}
|
||||
{% if workflow.criticality_levels %}
|
||||
<button role="tab" aria-selected="false" aria-controls="inspect-criticality" id="tab-criticality" tabindex="-1">{% trans "Criticality Levels" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="pk-tabs--container">
|
||||
|
||||
<div id="inspect-statuses" role="tabpanel" tabindex="0" aria-labelledby="tab-statuses">
|
||||
<div class="pk-information"><p>
|
||||
{% blocktrans count status_count=workflow.possible_status|count %}{{ status_count }} status{% plural %}{{ status_count }} statuses{% endblocktrans %}.
|
||||
</p></div>
|
||||
<nav class="inspect--quicknav"><span class="inspect--jumpto">{% trans "Jump to:" %}</span><ul class="inspect--quicklinks">
|
||||
{% for status in workflow.possible_status %}
|
||||
<li><a class="button" href="#status-{{ status.id }}">{{ status.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul></nav>
|
||||
<div class="expanded-statuses">
|
||||
{% for status in workflow.possible_status %}
|
||||
<div class="section status">
|
||||
<h3 id="status-{{ status.id }}"
|
||||
><a href="{{ workflow.get_admin_url }}status/{{ status.id }}/" class="inspect-status--link">
|
||||
<span class="inspect-status--colour" style="background-color: #{{ status.colour|default:"fff" }}"></span>
|
||||
{{ status.name }}</a></h3>
|
||||
{% if status.backoffice_info_text %}<div>{{ status.backoffice_info_text|safe }}</div>{% endif %}
|
||||
{% for item in status.items %}
|
||||
<h4><a href="{{ workflow.get_admin_url }}status/{{ status.id }}/items/{{ item.id }}/">{{ item.description }}</a></h4>
|
||||
{{ item.get_parameters_view|safe }}
|
||||
{% empty %}
|
||||
<p>{% trans "No actions in this status." %}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="inspect-statuses" role="tabpanel" tabindex="0" aria-labelledby="tab-statuses">
|
||||
<div class="pk-information"><p>
|
||||
{% blocktrans count status_count=workflow.possible_status|count %}{{ status_count }} status{% plural %}{{ status_count }} statuses{% endblocktrans %}.
|
||||
</p></div>
|
||||
<nav class="inspect--quicknav"><span class="inspect--jumpto">{% trans "Jump to:" %}</span><ul class="inspect--quicklinks">
|
||||
{% for status in workflow.possible_status %}
|
||||
<li><a class="button" href="#status-{{ status.id }}">{{ status.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul></nav>
|
||||
<div class="expanded-statuses">
|
||||
{% for status in workflow.possible_status %}
|
||||
<div class="section status">
|
||||
<h3 id="status-{{ status.id }}"
|
||||
><a href="{{ workflow.get_admin_url }}status/{{ status.id }}/" class="inspect-status--link">
|
||||
<span class="inspect-status--colour" style="background-color: #{{ status.colour|default:"fff" }}"></span>
|
||||
{{ status.name }}</a></h3>
|
||||
{% if status.backoffice_info_text %}<div>{{ status.backoffice_info_text|safe }}</div>{% endif %}
|
||||
{% for item in status.items %}
|
||||
<h4><a href="{{ workflow.get_admin_url }}status/{{ status.id }}/items/{{ item.id }}/">{{ item.description }}</a></h4>
|
||||
{{ item.get_parameters_view|safe }}
|
||||
{% empty %}
|
||||
<p>{% trans "No actions in this status." %}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inspect-global-actions" role="tabpanel" tabindex="0" aria-labelledby="tab-global-actions" hidden>
|
||||
<nav class="inspect--quicknav"><span class="inspect--jumpto">{% trans "Jump to:" %}</span><ul class="inspect--quicklinks">
|
||||
{% for action in workflow.global_actions %}
|
||||
<li><a class="button" href="#action-{{ action.id }}">{{ action.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul></nav>
|
||||
<div class="expanded-statuses">
|
||||
{% for action in workflow.global_actions %}
|
||||
<div class="section global-action">
|
||||
<h3><a id="action-{{ action.id }}" href="{{ workflow.get_admin_url }}global-actions/{{ action.id }}/">{{ action.name }}</a></h3>
|
||||
<h4>{% trans "Triggers" %}</h4>
|
||||
<ul>{% for trigger in action.triggers %}<li>{{ trigger.render_as_line }}</li>{% endfor %}</ul>
|
||||
{% for item in action.items %}
|
||||
<h4><a href="{{ workflow.get_admin_url }}global-actions/{{ action.id }}/items/{{ item.id }}/">{{ item.description }}</a></h4>
|
||||
{{ item.get_parameters_view|safe }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="inspect-global-actions" role="tabpanel" tabindex="0" aria-labelledby="tab-global-actions" hidden>
|
||||
<nav class="inspect--quicknav"><span class="inspect--jumpto">{% trans "Jump to:" %}</span><ul class="inspect--quicklinks">
|
||||
{% for action in workflow.global_actions %}
|
||||
<li><a class="button" href="#action-{{ action.id }}">{{ action.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul></nav>
|
||||
<div class="expanded-statuses">
|
||||
{% for action in workflow.global_actions %}
|
||||
<div class="section global-action">
|
||||
<h3><a id="action-{{ action.id }}" href="{{ workflow.get_admin_url }}global-actions/{{ action.id }}/">{{ action.name }}</a></h3>
|
||||
<h4>{% trans "Triggers" %}</h4>
|
||||
<ul>{% for trigger in action.triggers %}<li>{{ trigger.render_as_line }}</li>{% endfor %}</ul>
|
||||
{% for item in action.items %}
|
||||
<h4><a href="{{ workflow.get_admin_url }}global-actions/{{ action.id }}/items/{{ item.id }}/">{{ item.description }}</a></h4>
|
||||
{{ item.get_parameters_view|safe }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inspect-functions" role="tabpanel" tabindex="0" aria-labelledby="tab-functions" hidden>
|
||||
<ul>
|
||||
{% for label in workflow.roles.values %}
|
||||
<li>{{ label }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div id="inspect-functions" role="tabpanel" tabindex="0" aria-labelledby="tab-functions" hidden>
|
||||
<ul>
|
||||
{% for label in workflow.roles.values %}
|
||||
<li>{{ label }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="inspect-variables" role="tabpanel" tabindex="0" aria-labelledby="tab-variables" hidden>
|
||||
{% for field in workflow.variables_formdef.fields %}
|
||||
{% include "wcs/backoffice/includes/inspect-field.html" with path=workflow.get_admin_url|add:"variables/fields/" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="inspect-variables" role="tabpanel" tabindex="0" aria-labelledby="tab-variables" hidden>
|
||||
{% for field in workflow.variables_formdef.fields %}
|
||||
{% include "wcs/backoffice/includes/inspect-field.html" with path=workflow.get_admin_url|add:"variables/fields/" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div id="inspect-fields" role="tabpanel" tabindex="0" aria-labelledby="tab-fields" hidden>
|
||||
{% for field in workflow.backoffice_fields_formdef.fields %}
|
||||
{% include "wcs/backoffice/includes/inspect-field.html" with path=workflow.get_admin_url|add:"backoffice-fields/fields/" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="inspect-fields" role="tabpanel" tabindex="0" aria-labelledby="tab-fields" hidden>
|
||||
{% for field in workflow.backoffice_fields_formdef.fields %}
|
||||
{% include "wcs/backoffice/includes/inspect-field.html" with path=workflow.get_admin_url|add:"backoffice-fields/fields/" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div id="inspect-criticality" role="tabpanel" tabindex="0" aria-labelledby="tab-criticality" hidden>
|
||||
<ul>
|
||||
{% for level in workflow.criticality_levels %}<li>{{ level.name }}</li>{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div id="inspect-criticality" role="tabpanel" tabindex="0" aria-labelledby="tab-criticality" hidden>
|
||||
<ul>
|
||||
{% for level in workflow.criticality_levels %}<li>{{ level.name }}</li>{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div> <!-- pk-tabs-container -->
|
||||
</div> <!-- pk-tabs -->
|
||||
</div> <!-- pk-tabs-container -->
|
||||
</div> <!-- pk-tabs -->
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,111 +4,111 @@
|
|||
{% block appbar-title %}{{ status.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ block.super }}
|
||||
{{ block.super }}
|
||||
|
||||
{% if status.get_visibility_restricted_roles %}
|
||||
<div class="bo-block">
|
||||
{% trans "This status is hidden from the user." %}
|
||||
{% if not workflow.is_readonly %}
|
||||
(<a href="display" rel="popup">{% trans "change" %}</a>)
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if status.get_visibility_restricted_roles %}
|
||||
<div class="bo-block">
|
||||
{% trans "This status is hidden from the user." %}
|
||||
{% if not workflow.is_readonly %}
|
||||
(<a href="display" rel="popup">{% trans "change" %}</a>)
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not status.items %}
|
||||
<div class="infonotice">
|
||||
{% trans "There are not yet any items in this status." %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% spaceless %}
|
||||
<div class="bo-block">
|
||||
{% if workflow.is_readonly %}
|
||||
<ul id="items-list" class="biglist sortable readonly">
|
||||
{% if not status.items %}
|
||||
<div class="infonotice">
|
||||
{% trans "There are not yet any items in this status." %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="hint">{% trans "Use drag and drop with the handles to reorder items." %}</p>
|
||||
<ul id="items-list" class="biglist sortable">
|
||||
{% spaceless %}
|
||||
<div class="bo-block">
|
||||
{% if workflow.is_readonly %}
|
||||
<ul id="items-list" class="biglist sortable readonly">
|
||||
{% else %}
|
||||
<p class="hint">{% trans "Use drag and drop with the handles to reorder items." %}</p>
|
||||
<ul id="items-list" class="biglist sortable">
|
||||
{% endif %}
|
||||
{% for item in status.items %}
|
||||
<li class="biglistitem" id="itemId_{{ item.id }}">
|
||||
<a href="items/{{ item.id }}/">{{ item.render_as_line }}</a>
|
||||
<p class="commands">
|
||||
{% with item.get_target_status_url as url %}
|
||||
{% if url %}<span class="jump"><a href="{{ url }}" title="{% trans "Go to Target" %}">{% trans "Go to Target" %}</a></span>{% endif %}
|
||||
{% endwith %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="edit"><a href="items/{{ item.id }}/" title="{% trans "Edit" %}">{% trans "Edit" %}</a></span>
|
||||
<span class="copy"><a href="items/{{ item.id }}/copy" rel="popup" title="{% trans "Copy" %}">{% trans "Copy" %}</a></span>
|
||||
<span class="remove"><a href="items/{{ item.id }}/delete" rel="popup" title="{% trans "Delete" %}">{% trans "Delete" %}</a></span>
|
||||
{% endif %}
|
||||
</p>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endspaceless %}
|
||||
{% endif %}
|
||||
{% for item in status.items %}
|
||||
<li class="biglistitem" id="itemId_{{ item.id }}">
|
||||
<a href="items/{{ item.id }}/">{{ item.render_as_line }}</a>
|
||||
<p class="commands">
|
||||
{% with item.get_target_status_url as url %}
|
||||
{% if url %}<span class="jump"><a href="{{ url }}" title="{% trans "Go to Target" %}">{% trans "Go to Target" %}</a></span>{% endif %}
|
||||
|
||||
{% with source_statuses=view.get_source_statuses %}
|
||||
{% if source_statuses %}
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Jumps" %}</h3>
|
||||
<p>{% trans "This status is reachable from the following status:" %}
|
||||
{% for source in source_statuses %}
|
||||
<a href="../{{ source.id }}/">{{ source.name }}</a>{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="edit"><a href="items/{{ item.id }}/" title="{% trans "Edit" %}">{% trans "Edit" %}</a></span>
|
||||
<span class="copy"><a href="items/{{ item.id }}/copy" rel="popup" title="{% trans "Copy" %}">{% trans "Copy" %}</a></span>
|
||||
<span class="remove"><a href="items/{{ item.id }}/delete" rel="popup" title="{% trans "Delete" %}">{% trans "Delete" %}</a></span>
|
||||
{% endif %}
|
||||
</p>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endspaceless %}
|
||||
{% endif %}
|
||||
|
||||
{% with source_statuses=view.get_source_statuses %}
|
||||
{% if source_statuses %}
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Jumps" %}</h3>
|
||||
<p>{% trans "This status is reachable from the following status:" %}
|
||||
{% for source in source_statuses %}
|
||||
<a href="../{{ source.id }}/">{{ source.name }}</a>{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<p><a href="../../">{% trans "Back to workflow main page" %}</a></p>
|
||||
|
||||
<p><a href="../../">{% trans "Back to workflow main page" %}</a></p>
|
||||
|
||||
<div class="bo-block">
|
||||
{{ view.graphviz|safe }}
|
||||
<div class="full-screen-link"><a download href="schema.svg">{% trans "Download" %}</a> -
|
||||
<a href="fullscreen">{% trans "Full Screen" %}</a></div>
|
||||
</div>
|
||||
<div class="bo-block">
|
||||
{{ view.graphviz|safe }}
|
||||
<div class="full-screen-link"><a download href="schema.svg">{% trans "Download" %}</a> -
|
||||
<a href="fullscreen">{% trans "Full Screen" %}</a></div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar-content %}
|
||||
{% if workflow.is_default %}
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
This is the default workflow, you cannot edit it but you can
|
||||
duplicate it to base your own workflow on it.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% elif workflow.is_readonly %}
|
||||
<div class="infonotice"><p>{% trans "This workflow is readonly." %}</p></div>
|
||||
{% else %}
|
||||
{% if workflow.is_default %}
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
This is the default workflow, you cannot edit it but you can
|
||||
duplicate it to base your own workflow on it.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% elif workflow.is_readonly %}
|
||||
<div class="infonotice"><p>{% trans "This workflow is readonly." %}</p></div>
|
||||
{% else %}
|
||||
|
||||
{% if status.is_endpoint %}
|
||||
<div class="infonotice">
|
||||
<p>
|
||||
{% if status.forced_endpoint %}
|
||||
{% trans "This status has been manually set to be considered as terminal." %}
|
||||
<br><a href="endpoint" rel="popup">{% trans "Unforce Terminal Status" %}</a>
|
||||
{% elif status.is_endpoint %}
|
||||
{% trans "This status has been automatically evaluated as being terminal." %}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if status.is_endpoint %}
|
||||
<div class="infonotice">
|
||||
<p>
|
||||
{% if status.forced_endpoint %}
|
||||
{% trans "This status has been manually set to be considered as terminal." %}
|
||||
<br><a href="endpoint" rel="popup">{% trans "Unforce Terminal Status" %}</a>
|
||||
{% elif status.is_endpoint %}
|
||||
{% trans "This status has been automatically evaluated as being terminal." %}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<ul id="sidebar-actions">
|
||||
<li><a href="edit" rel="popup">{% trans "Change Status Name" %}</a></li>
|
||||
<li><a href="display" rel="popup">{% trans "Change Display Settings" %}</a></li>
|
||||
{% if not status.forced_endpoint %}
|
||||
<li><a href="endpoint" rel="popup">{% trans "Force Terminal Status" %}</a></li>
|
||||
{% endif %}
|
||||
<li><a href="backoffice-info-text" rel="popup">{% trans "Change Backoffice Information Text" %}</a></li>
|
||||
<li><a href="delete" rel="popup">{% trans "Delete" %}</a></li>
|
||||
</ul>
|
||||
<div id="new-field">
|
||||
<h3>{% trans "New Action" %}</h3>
|
||||
{{ view.get_new_item_form.render|safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<ul id="sidebar-actions">
|
||||
<li><a href="edit" rel="popup">{% trans "Change Status Name" %}</a></li>
|
||||
<li><a href="display" rel="popup">{% trans "Change Display Settings" %}</a></li>
|
||||
{% if not status.forced_endpoint %}
|
||||
<li><a href="endpoint" rel="popup">{% trans "Force Terminal Status" %}</a></li>
|
||||
{% endif %}
|
||||
<li><a href="backoffice-info-text" rel="popup">{% trans "Change Backoffice Information Text" %}</a></li>
|
||||
<li><a href="delete" rel="popup">{% trans "Delete" %}</a></li>
|
||||
</ul>
|
||||
<div id="new-field">
|
||||
<h3>{% trans "New Action" %}</h3>
|
||||
{{ view.get_new_item_form.render|safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,184 +4,184 @@
|
|||
{% block appbar-title %}{{ workflow.name }}{% endblock %}
|
||||
|
||||
{% block appbar-actions %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<a rel="popup" href="category">{% trans "change category" %}</a>
|
||||
<a rel="popup" href="edit">{% trans "change title" %}</a>
|
||||
{% endif %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<a rel="popup" href="category">{% trans "change category" %}</a>
|
||||
<a rel="popup" href="edit">{% trans "change title" %}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ view.last_modification_block|safe }}
|
||||
{{ view.last_modification_block|safe }}
|
||||
|
||||
<div class="splitcontent-left">
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Possible Status" %}</h3>
|
||||
{% if not workflow.possible_status %}
|
||||
<p>{% trans "There are not yet any status defined in this workflow." %}</p>
|
||||
{% else %}
|
||||
{% if workflow.is_readonly %}
|
||||
<ul id="status-list" class="biglist">
|
||||
{% else %}
|
||||
<p class="hint">{% trans "Use drag and drop with the handles to reorder status." %}</p>
|
||||
<ul id="status-list" class="biglist sortable">
|
||||
{% endif %}
|
||||
{% spaceless %}
|
||||
{% for status in workflow.possible_status %}
|
||||
<li class="biglistitem {% if status.get_visibility_restricted_roles %}hidden-status{% endif %}"
|
||||
id="itemId_{{ status.id }}">
|
||||
<a href="status/{{ status.id }}/" {% if status.colour %}style="border-color: #{{status.colour}}"{% endif %}
|
||||
>{{ status.name }}</a></li>
|
||||
{% endfor %}
|
||||
{% endspaceless %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="splitcontent-left">
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Possible Status" %}</h3>
|
||||
{% if not workflow.possible_status %}
|
||||
<p>{% trans "There are not yet any status defined in this workflow." %}</p>
|
||||
{% else %}
|
||||
{% if workflow.is_readonly %}
|
||||
<ul id="status-list" class="biglist">
|
||||
{% else %}
|
||||
<p class="hint">{% trans "Use drag and drop with the handles to reorder status." %}</p>
|
||||
<ul id="status-list" class="biglist sortable">
|
||||
{% endif %}
|
||||
{% spaceless %}
|
||||
{% for status in workflow.possible_status %}
|
||||
<li class="biglistitem {% if status.get_visibility_restricted_roles %}hidden-status{% endif %}"
|
||||
id="itemId_{{ status.id }}">
|
||||
<a href="status/{{ status.id }}/" {% if status.colour %}style="border-color: #{{status.colour}}"{% endif %}
|
||||
>{{ status.name }}</a></li>
|
||||
{% endfor %}
|
||||
{% endspaceless %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="splitcontent-right">
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Workflow Functions" %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="change">(<a rel="popup" href="functions/new">{% trans "add function" %}</a>)</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<ul id="roles-list" class="biglist">
|
||||
{% for workflow_role in view.workflow.get_sorted_functions %}
|
||||
<li class="biglistitem">
|
||||
{% if not workflow.is_readonly %}
|
||||
<a rel="popup" href="functions/{{ workflow_role.0|slice:"1:" }}">{{ workflow_role.1 }}</a>
|
||||
{% else %}
|
||||
<a>{{ workflow_role.1 }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="splitcontent-right">
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Workflow Functions" %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="change">(<a rel="popup" href="functions/new">{% trans "add function" %}</a>)</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<ul id="roles-list" class="biglist">
|
||||
{% for workflow_role in view.workflow.get_sorted_functions %}
|
||||
<li class="biglistitem">
|
||||
{% if not workflow.is_readonly %}
|
||||
<a rel="popup" href="functions/{{ workflow_role.0|slice:"1:" }}">{{ workflow_role.1 }}</a>
|
||||
{% else %}
|
||||
<a>{{ workflow_role.1 }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if not workflow.is_default %}
|
||||
<div class="bo-block variables-fields">
|
||||
<h3>{% trans "Workflow Variables" %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="change">(<a href="variables/">{% trans "change" %}</a>)</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% if workflow.variables_formdef %}
|
||||
<ul class="biglist">
|
||||
{% for field in workflow.variables_formdef.fields %}
|
||||
{% if field.varname %}
|
||||
<li><a href="variables/fields/{{ field.id }}">{{ field.ellipsized_label }}
|
||||
{% if '*' not in field.varname %}
|
||||
<code class="varname">{{ "{{" }} form_option_{{ field.varname }} }}</code>
|
||||
{% endif %}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if not workflow.is_default %}
|
||||
<div class="bo-block variables-fields">
|
||||
<h3>{% trans "Workflow Variables" %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="change">(<a href="variables/">{% trans "change" %}</a>)</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% if workflow.variables_formdef %}
|
||||
<ul class="biglist">
|
||||
{% for field in workflow.variables_formdef.fields %}
|
||||
{% if field.varname %}
|
||||
<li><a href="variables/fields/{{ field.id }}">{{ field.ellipsized_label }}
|
||||
{% if '*' not in field.varname %}
|
||||
<code class="varname">{{ "{{" }} form_option_{{ field.varname }} }}</code>
|
||||
{% endif %}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Global Actions" %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="change">(<a rel="popup" href="global-actions/new">{% trans "add global action" %}</a>)</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% if workflow.is_readonly %}
|
||||
<ul class="biglist">
|
||||
{% else %}
|
||||
<ul id="status-list" class="biglist sortable" data-order-function="update_actions_order">
|
||||
{% endif %}
|
||||
{% for action in workflow.global_actions %}
|
||||
<li class="biglistitem" id="itemId_{{ action.id }}"><a href="global-actions/{{ action.id }}/">{{ action.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Global Actions" %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="change">(<a rel="popup" href="global-actions/new">{% trans "add global action" %}</a>)</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% if workflow.is_readonly %}
|
||||
<ul class="biglist">
|
||||
{% else %}
|
||||
<ul id="status-list" class="biglist sortable" data-order-function="update_actions_order">
|
||||
{% endif %}
|
||||
{% for action in workflow.global_actions %}
|
||||
<li class="biglistitem" id="itemId_{{ action.id }}"><a href="global-actions/{{ action.id }}/">{{ action.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Criticality Levels" %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="change">(<a rel="popup" href="criticality-levels/new">{% trans "add criticality level" %}</a>)</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% if workflow.is_readonly %}
|
||||
<ul class="biglist">
|
||||
{% else %}
|
||||
<ul class="biglist sortable criticality-levels" data-order-function="update_criticality_levels_order">
|
||||
{% endif %}
|
||||
{% spaceless %}
|
||||
{% for level in workflow.criticality_levels %}
|
||||
<li class="biglistitem" id="itemId_{{ level.id }}"
|
||||
{% if level.colour %}style="border-left-color: #{{ level.colour }}"{% endif %}>
|
||||
<a rel="popup" href="criticality-levels/{{ level.id }}">{{ level.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endspaceless %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Criticality Levels" %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="change">(<a rel="popup" href="criticality-levels/new">{% trans "add criticality level" %}</a>)</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% if workflow.is_readonly %}
|
||||
<ul class="biglist">
|
||||
{% else %}
|
||||
<ul class="biglist sortable criticality-levels" data-order-function="update_criticality_levels_order">
|
||||
{% endif %}
|
||||
{% spaceless %}
|
||||
{% for level in workflow.criticality_levels %}
|
||||
<li class="biglistitem" id="itemId_{{ level.id }}"
|
||||
{% if level.colour %}style="border-left-color: #{{ level.colour }}"{% endif %}>
|
||||
<a rel="popup" href="criticality-levels/{{ level.id }}">{{ level.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endspaceless %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="bo-block backoffice-fields">
|
||||
<h3>{% trans "Backoffice Fields" %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="change">(<a href="backoffice-fields/">{% trans "change" %}</a>)</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% if workflow.backoffice_fields_formdef %}
|
||||
<ul class="biglist">
|
||||
{% for field in workflow.backoffice_fields_formdef.fields %}
|
||||
<li><a href="backoffice-fields/fields/{{ field.id }}">{{ field.ellipsized_label }}
|
||||
{% if field.varname %}
|
||||
<code class="varname">{{ "{{" }} form_var_{{ field.varname }} }}</code>
|
||||
{% endif %}
|
||||
</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %} {# not workflow.is_default #}
|
||||
</div>
|
||||
<div class="bo-block backoffice-fields">
|
||||
<h3>{% trans "Backoffice Fields" %}
|
||||
{% if not workflow.is_readonly %}
|
||||
<span class="change">(<a href="backoffice-fields/">{% trans "change" %}</a>)</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% if workflow.backoffice_fields_formdef %}
|
||||
<ul class="biglist">
|
||||
{% for field in workflow.backoffice_fields_formdef.fields %}
|
||||
<li><a href="backoffice-fields/fields/{{ field.id }}">{{ field.ellipsized_label }}
|
||||
{% if field.varname %}
|
||||
<code class="varname">{{ "{{" }} form_var_{{ field.varname }} }}</code>
|
||||
{% endif %}
|
||||
</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %} {# not workflow.is_default #}
|
||||
</div>
|
||||
|
||||
<br style="clear:both;"/>
|
||||
<br style="clear:both;"/>
|
||||
|
||||
{% if workflow.possible_status %}
|
||||
<div class="bo-block">
|
||||
{{ view.graphviz|safe }}
|
||||
<div class="full-screen-link"><a download href="schema.svg">{% trans "Download" %}</a> -
|
||||
{% if workflow.possible_status %}
|
||||
<div class="bo-block">
|
||||
{{ view.graphviz|safe }}
|
||||
<div class="full-screen-link"><a download href="schema.svg">{% trans "Download" %}</a> -
|
||||
<a href="fullscreen">{% trans "Full Screen" %}</a></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% with formdefs=workflow.formdefs carddefs=workflow.carddefs mail_templates=workflow.mail_templates %}
|
||||
{% if formdefs or carddefs or mail_templates %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Usage" %}</h3>
|
||||
<div>
|
||||
{% if formdefs %}
|
||||
<p>{% trans "This workflow is used for the following forms:" %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for formdef in formdefs %}
|
||||
<li><a href="{{ formdef.get_admin_url }}">{{ formdef.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if carddefs %}
|
||||
<p>{% trans "This workflow is used for the following card models:" %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for carddef in carddefs %}
|
||||
<li><a href="{{ carddef.get_admin_url }}">{{ carddef.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if mail_templates %}
|
||||
<p>{% trans "The following mail templates are used in this workflow:" %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for mail_template in mail_templates %}
|
||||
<li><a href="{{ mail_template.get_admin_url }}">{{ mail_template.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% with formdefs=workflow.formdefs carddefs=workflow.carddefs mail_templates=workflow.mail_templates %}
|
||||
{% if formdefs or carddefs or mail_templates %}
|
||||
<div class="section">
|
||||
<h3>{% trans "Usage" %}</h3>
|
||||
<div>
|
||||
{% if formdefs %}
|
||||
<p>{% trans "This workflow is used for the following forms:" %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for formdef in formdefs %}
|
||||
<li><a href="{{ formdef.get_admin_url }}">{{ formdef.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if carddefs %}
|
||||
<p>{% trans "This workflow is used for the following card models:" %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for carddef in carddefs %}
|
||||
<li><a href="{{ carddef.get_admin_url }}">{{ carddef.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if mail_templates %}
|
||||
<p>{% trans "The following mail templates are used in this workflow:" %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for mail_template in mail_templates %}
|
||||
<li><a href="{{ mail_template.get_admin_url }}">{{ mail_template.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,44 +1,44 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
<div id="appbar">
|
||||
<h2>{% trans "Webservice Call" %} - {{ wscall.name }}</h2>
|
||||
{% if not wscall.is_readonly %}
|
||||
<span class="actions">
|
||||
<a href="edit">{% trans "Edit" %}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="appbar">
|
||||
<h2>{% trans "Webservice Call" %} - {{ wscall.name }}</h2>
|
||||
{% if not wscall.is_readonly %}
|
||||
<span class="actions">
|
||||
<a href="edit">{% trans "Edit" %}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if wscall.description %}
|
||||
<div class="bo-block">{{ wscall.description }}</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Parameters" %}</h3>
|
||||
<ul>
|
||||
{% if wscall.request.url %}<li>{% trans "URL:" %} {{ wscall.request.url }}</li>{% endif %}
|
||||
{% if wscall.request.request_signature_key %}<li>{% trans "Request Signature Key:" %} {{ wscall.request.request_signature_key }}</li>{% endif %}
|
||||
{% if wscall.request.qs_data %}
|
||||
<li>{% trans "Query string data:" %}
|
||||
<ul>
|
||||
{% for k, v in wscall.request.qs_data.items %}
|
||||
<li>{% blocktrans %}{{ k }}:{% endblocktrans %} {{ v }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% if wscall.description %}
|
||||
<div class="bo-block">{{ wscall.description }}</div>
|
||||
{% endif %}
|
||||
<li>{% trans "Method:" %} {% if wscall.request.method == 'POST' %}POST{% else %}GET{% endif %}</li>
|
||||
{% if wscall.request.timeout %}
|
||||
<li>{% trans "Timeout:" %} {{ wscall.request.timeout }}s</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="bo-block">
|
||||
<ul>
|
||||
<li>{% trans "Notify on errors:" %} {{ wscall.notify_on_errors|yesno }}</li>
|
||||
<li>{% trans "Record on errors:" %} {{ wscall.record_on_errors|yesno }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bo-block">
|
||||
<h3>{% trans "Parameters" %}</h3>
|
||||
<ul>
|
||||
{% if wscall.request.url %}<li>{% trans "URL:" %} {{ wscall.request.url }}</li>{% endif %}
|
||||
{% if wscall.request.request_signature_key %}<li>{% trans "Request Signature Key:" %} {{ wscall.request.request_signature_key }}</li>{% endif %}
|
||||
{% if wscall.request.qs_data %}
|
||||
<li>{% trans "Query string data:" %}
|
||||
<ul>
|
||||
{% for k, v in wscall.request.qs_data.items %}
|
||||
<li>{% blocktrans %}{{ k }}:{% endblocktrans %} {{ v }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>{% trans "Method:" %} {% if wscall.request.method == 'POST' %}POST{% else %}GET{% endif %}</li>
|
||||
{% if wscall.request.timeout %}
|
||||
<li>{% trans "Timeout:" %} {{ wscall.request.timeout }}s</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="bo-block">
|
||||
<ul>
|
||||
<li>{% trans "Notify on errors:" %} {{ wscall.notify_on_errors|yesno }}</li>
|
||||
<li>{% trans "Record on errors:" %} {{ wscall.record_on_errors|yesno }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,20 +4,20 @@
|
|||
{% block appbar-title %}{% trans "Webservice Calls" %}{% endblock %}
|
||||
|
||||
{% block appbar-actions %}
|
||||
<a rel="popup" href="import">{% trans "Import" %}</a>
|
||||
<a href="new">{% trans "New webservice call" %}</a>
|
||||
<a rel="popup" href="import">{% trans "Import" %}</a>
|
||||
<a href="new">{% trans "New webservice call" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if wscalls %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for wscall in wscalls %}
|
||||
<li><a href="{{ wscall.id }}/">{{ wscall.name }} ({{ wscall.slug }})</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class="infonotice">
|
||||
{% trans "There are no webservice calls defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if wscalls %}
|
||||
<ul class="objects-list single-links">
|
||||
{% for wscall in wscalls %}
|
||||
<li><a href="{{ wscall.id }}/">{{ wscall.name }} ({{ wscall.slug }})</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class="infonotice">
|
||||
{% trans "There are no webservice calls defined." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,26 +3,26 @@
|
|||
|
||||
{% block body %}
|
||||
|
||||
{% block form-side %}
|
||||
{{ form_side|default:"" }}
|
||||
{{ publisher.get_request.session.display_message|safe }}
|
||||
{% endblock %}
|
||||
{% block form-side %}
|
||||
{{ form_side|default:"" }}
|
||||
{{ publisher.get_request.session.display_message|safe }}
|
||||
{% endblock %}
|
||||
|
||||
{% block form-main %}
|
||||
{% block form-main %}
|
||||
|
||||
{% block drafts-recall %}{% include "wcs/includes/drafts-recall.html" %}{% endblock %}
|
||||
{% block drafts-recall %}{% include "wcs/includes/drafts-recall.html" %}{% endblock %}
|
||||
|
||||
{% block backoffice-only-one-info %}
|
||||
{% if not view.edit_mode and page_no == 1 and publisher.get_request.is_in_backoffice and user_has_already_one_such_form %}
|
||||
<div class="warningnotice">
|
||||
{% blocktrans %}
|
||||
This form is limited to one per user and the associated user has already one.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block backoffice-only-one-info %}
|
||||
{% if not view.edit_mode and page_no == 1 and publisher.get_request.is_in_backoffice and user_has_already_one_such_form %}
|
||||
<div class="warningnotice">
|
||||
{% blocktrans trimmed %}
|
||||
This form is limited to one per user and the associated user has already one.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{{ html_form.render|safe }}
|
||||
{% endblock %}
|
||||
{{ html_form.render|safe }}
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,53 +1,53 @@
|
|||
{% load i18n %}
|
||||
<div class="section foldable {% if view.should_fold_history %}folded{% endif %}" id="evolution-log">
|
||||
{% block log-section-title %}
|
||||
<h2>{% trans "Log" %}</h2>
|
||||
{% endblock %}
|
||||
<div>
|
||||
<ul id="evolutions">
|
||||
{% for evolution in formdata.get_visible_evolution_parts %}
|
||||
{% with status=evolution.get_status display_parts=evolution.display_parts %}
|
||||
<li class="{% if evolution.who == '_submitter' %}msg-in{% elif evolution.who %}msg-out{% else %}msg-system{% endif %}
|
||||
{% if status.is_endpoint %}endpoint{% endif %}
|
||||
{{ status.extra_css_class|default:"" }}">
|
||||
<span class="item {% if not evolution.status %}no-status-change{% endif %}" style="background: #{{ status.colour }}; color: {{ status.get_contrast_color}}"></span>
|
||||
<div>
|
||||
{% if evolution.status %}
|
||||
<div class="evolution-metadata">
|
||||
<span class="status">{{evolution.get_status_label}}
|
||||
{% if status.get_visibility_restricted_roles %}
|
||||
<span title="{% trans "This status is not visible to users" %}" class="visibility-off"></span>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="time">{{evolution.datetime}}
|
||||
{% if evolution.last_jump_datetime and user.is_admin %}
|
||||
<span class="last-jump">({% trans "last check:" %} {{ evolution.last_jump_datetime }})</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="msg">
|
||||
{% if evolution.who and include_authors %}
|
||||
<span class="user">{{evolution.get_author_name|default_if_none:""}}
|
||||
<span>{% if evolution.get_author_qualification %}({{evolution.get_author_qualification}}){% endif %}</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if not evolution.status %}
|
||||
<span class="time">{{evolution.datetime}}</span>
|
||||
{% endif %}
|
||||
{% if evolution.comment %}
|
||||
<div class="comment">
|
||||
{{evolution.comment|linebreaks}}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for part in display_parts %}
|
||||
{{part|safe}}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% block log-section-title %}
|
||||
<h2>{% trans "Log" %}</h2>
|
||||
{% endblock %}
|
||||
<div>
|
||||
<ul id="evolutions">
|
||||
{% for evolution in formdata.get_visible_evolution_parts %}
|
||||
{% with status=evolution.get_status display_parts=evolution.display_parts %}
|
||||
<li class="{% if evolution.who == '_submitter' %}msg-in{% elif evolution.who %}msg-out{% else %}msg-system{% endif %}
|
||||
{% if status.is_endpoint %}endpoint{% endif %}
|
||||
{{ status.extra_css_class|default:"" }}">
|
||||
<span class="item {% if not evolution.status %}no-status-change{% endif %}" style="background: #{{ status.colour }}; color: {{ status.get_contrast_color}}"></span>
|
||||
<div>
|
||||
{% if evolution.status %}
|
||||
<div class="evolution-metadata">
|
||||
<span class="status">{{evolution.get_status_label}}
|
||||
{% if status.get_visibility_restricted_roles %}
|
||||
<span title="{% trans "This status is not visible to users" %}" class="visibility-off"></span>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="time">{{evolution.datetime}}
|
||||
{% if evolution.last_jump_datetime and user.is_admin %}
|
||||
<span class="last-jump">({% trans "last check:" %} {{ evolution.last_jump_datetime }})</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="msg">
|
||||
{% if evolution.who and include_authors %}
|
||||
<span class="user">{{evolution.get_author_name|default_if_none:""}}
|
||||
<span>{% if evolution.get_author_qualification %}({{evolution.get_author_qualification}}){% endif %}</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if not evolution.status %}
|
||||
<span class="time">{{evolution.datetime}}</span>
|
||||
{% endif %}
|
||||
{% if evolution.comment %}
|
||||
<div class="comment">
|
||||
{{evolution.comment|linebreaks}}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for part in display_parts %}
|
||||
{{part|safe}}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
{% block sidepage %}{% endblock %}
|
||||
|
||||
{% block main-content %}
|
||||
{% block form-side %}
|
||||
{{ form_side|default:"" }}
|
||||
{{ publisher.get_request.session.display_message|safe }}
|
||||
{% endblock %}
|
||||
{% block form-side %}
|
||||
{{ form_side|default:"" }}
|
||||
{{ publisher.get_request.session.display_message|safe }}
|
||||
{% endblock %}
|
||||
|
||||
{{ html_form.render|safe }}
|
||||
{{ html_form.render|safe }}
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}{% endblock %}
|
||||
|
|
|
@ -1,41 +1,41 @@
|
|||
{% load i18n %}
|
||||
<div id="side">
|
||||
{% if view.has_draft_support and data %}
|
||||
{# display tracking code box if they are enabled and there's some data #}
|
||||
{# (e.g. the user is not on a insufficient authenticiation context page). #}
|
||||
{% if view.has_draft_support and data %}
|
||||
{# display tracking code box if they are enabled and there's some data #}
|
||||
{# (e.g. the user is not on a insufficient authenticiation context page). #}
|
||||
|
||||
{% block tracking-code-box %}
|
||||
{% with get_tracking_code as tracking_code %}
|
||||
{% if tracking_code or is_recalled_draft %}
|
||||
<div id="tracking-code" {% if is_recalled_draft %}class="has-discard-button"{% endif %}>
|
||||
{% if view.formdef.enable_tracking_codes %}
|
||||
{% add_javascript "popup.js" %}
|
||||
{% block tracking-code %}
|
||||
<div class="tracking-code-part">
|
||||
<h3>{% trans "Tracking code" %}</h3>
|
||||
<a data-popup href="code/{{ tracking_code }}/">{{ tracking_code }}</a>
|
||||
{% standard_text "tracking-code-short-text" %}
|
||||
</div>
|
||||
{% block tracking-code-box %}
|
||||
{% with get_tracking_code as tracking_code %}
|
||||
{% if tracking_code or is_recalled_draft %}
|
||||
<div id="tracking-code" {% if is_recalled_draft %}class="has-discard-button"{% endif %}>
|
||||
{% if view.formdef.enable_tracking_codes %}
|
||||
{% add_javascript "popup.js" %}
|
||||
{% block tracking-code %}
|
||||
<div class="tracking-code-part">
|
||||
<h3>{% trans "Tracking code" %}</h3>
|
||||
<a data-popup href="code/{{ tracking_code }}/">{{ tracking_code }}</a>
|
||||
{% standard_text "tracking-code-short-text" %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_recalled_draft %}
|
||||
{% block recalled-draft %}
|
||||
<form action="removedraft" method="POST">
|
||||
<input type="hidden" name="magictoken" value="{{ magictoken }}">
|
||||
<button class="form-discard-draft">{% trans "Discard Draft" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endblock %} {# tracking-code-box #}
|
||||
{% endif %}
|
||||
|
||||
{% block steps %}
|
||||
{{ step }}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_recalled_draft %}
|
||||
{% block recalled-draft %}
|
||||
<form action="removedraft" method="POST">
|
||||
<input type="hidden" name="magictoken" value="{{ magictoken }}">
|
||||
<button class="form-discard-draft">{% trans "Discard Draft" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endblock %} {# tracking-code-box #}
|
||||
{% endif %}
|
||||
|
||||
{% block steps %}
|
||||
{{ step }}
|
||||
{% endblock %}
|
||||
|
||||
</div> <!-- #side -->
|
||||
|
|
|
@ -2,40 +2,40 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
{% block session-message %}
|
||||
{{session_message|safe}}
|
||||
{% endblock %}
|
||||
{% block session-message %}
|
||||
{{session_message|safe}}
|
||||
{% endblock %}
|
||||
|
||||
{% with workflow_messages=view.workflow_messages %}
|
||||
{% if workflow_messages %}
|
||||
{% with workflow_messages=view.workflow_messages %}
|
||||
{% if workflow_messages %}
|
||||
{{ workflow_messages|safe }}
|
||||
{% else %}
|
||||
<div id="receipt-intro">
|
||||
{{ view.recorded_message|safe }}
|
||||
{% if mine %}
|
||||
{{ view.get_handling_role_info_text|safe }}
|
||||
{% endif %}
|
||||
{% if mine and formdata.formdef.enable_tracking_codes and formdata.tracking_code %}
|
||||
<p id="tracking-code">
|
||||
{% trans "You can get back to this page using the following tracking code:" %}
|
||||
<a href="../code/{{ formdata.tracking_code }}/" data-popup>{{ formdata.tracking_code }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{{ view.receipt|safe }}
|
||||
{{ view.history|safe }}
|
||||
|
||||
{% with workflow_messages=view.bottom_workflow_messages %}
|
||||
{% if workflow_messages or workflow_form %}<span id="action-zone"></span>{% endif %}
|
||||
{{ workflow_messages|safe }}
|
||||
{% else %}
|
||||
<div id="receipt-intro">
|
||||
{{ view.recorded_message|safe }}
|
||||
{% if mine %}
|
||||
{{ view.get_handling_role_info_text|safe }}
|
||||
{% endif %}
|
||||
{% if mine and formdata.formdef.enable_tracking_codes and formdata.tracking_code %}
|
||||
<p id="tracking-code">
|
||||
{% trans "You can get back to this page using the following tracking code:" %}
|
||||
<a href="../code/{{ formdata.tracking_code }}/" data-popup>{{ formdata.tracking_code }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% if workflow_form %}
|
||||
{{ view.actions_workflow_messages|safe }}
|
||||
{{ workflow_form.render|safe }}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{{ view.receipt|safe }}
|
||||
{{ view.history|safe }}
|
||||
|
||||
{% with workflow_messages=view.bottom_workflow_messages %}
|
||||
{% if workflow_messages or workflow_form %}<span id="action-zone"></span>{% endif %}
|
||||
{{ workflow_messages|safe }}
|
||||
{% endwith %}
|
||||
{% if workflow_form %}
|
||||
{{ view.actions_workflow_messages|safe }}
|
||||
{{ workflow_form.render|safe }}
|
||||
{% endif %}
|
||||
|
||||
<div class="back-home-button">
|
||||
<a href="{{ publisher.get_root_url }}">{% trans "Back Home" %}</a>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<div id="steps" class="steps-{{page_labels|length}}">
|
||||
<ol>
|
||||
{% for page_label in page_labels %}
|
||||
{% spaceless %}
|
||||
<li class="{% if forloop.first %}first{% endif %}
|
||||
{% if forloop.last %}last{% endif %}
|
||||
{% if forloop.counter == current_page_no %}current{% endif %}
|
||||
{% if forloop.counter < current_page_no %}step-before{% endif %}
|
||||
{% if forloop.counter > current_page_no %}step-after{% endif %}" >
|
||||
<span class="marker">{{ forloop.counter }}</span>
|
||||
<span class="label">{{ page_label }}</span>
|
||||
</li>
|
||||
{% endspaceless %}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
<ol>
|
||||
{% for page_label in page_labels %}
|
||||
{% spaceless %}
|
||||
<li class="{% if forloop.first %}first{% endif %}
|
||||
{% if forloop.last %}last{% endif %}
|
||||
{% if forloop.counter == current_page_no %}current{% endif %}
|
||||
{% if forloop.counter < current_page_no %}step-before{% endif %}
|
||||
{% if forloop.counter > current_page_no %}step-after{% endif %}" >
|
||||
<span class="marker">{{ forloop.counter }}</span>
|
||||
<span class="label">{{ page_label }}</span>
|
||||
</li>
|
||||
{% endspaceless %}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{% extends template_base %}
|
||||
|
||||
{% block body %}
|
||||
<div class="form-validation">
|
||||
{{ form_side|default:"" }}
|
||||
<div class="infonotice">
|
||||
{% standard_text "check-before-submit" %}
|
||||
</div>
|
||||
{{ html_form.render|safe }}
|
||||
</div>
|
||||
<div class="form-validation">
|
||||
{{ form_side|default:"" }}
|
||||
<div class="infonotice">
|
||||
{% standard_text "check-before-submit" %}
|
||||
</div>
|
||||
{{ html_form.render|safe }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends template_base %}
|
||||
|
||||
{% block body %}
|
||||
{% include "wcs/includes/global-interactive-action.html" %}
|
||||
{% include "wcs/includes/global-interactive-action.html" %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
{% if not view.preview_mode and view.initial_drafts %}
|
||||
{% with view.initial_drafts|length as drafts_length %}
|
||||
<div class="drafts-recall">
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
You already started to fill this form. You can continue it or submit a new
|
||||
one.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% if drafts_length == 1 %}
|
||||
<p><a class="pk-button" href="{{view.initial_drafts.0.internal_id}}/">{% trans "Continue with draft" %}</a></p>
|
||||
{% elif drafts_length > 1 %}
|
||||
<ul>
|
||||
{% for draft in view.initial_drafts %}
|
||||
<li><a href="{{draft.internal_id}}/">{% trans "continue with draft from " %} {{draft.receipt_date}}
|
||||
{{draft.receipt_time}}</a>, {% blocktrans with page_no=draft.page_no|add:1 %}on page {{page_no}}{% endblocktrans %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
You already started to fill this form. You can continue it or submit a new
|
||||
one.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% if drafts_length == 1 %}
|
||||
<p><a class="pk-button" href="{{view.initial_drafts.0.internal_id}}/">{% trans "Continue with draft" %}</a></p>
|
||||
{% elif drafts_length > 1 %}
|
||||
<ul>
|
||||
{% for draft in view.initial_drafts %}
|
||||
<li><a href="{{draft.internal_id}}/">{% trans "continue with draft from " %} {{draft.receipt_date}}
|
||||
{{draft.receipt_time}}</a>, {% blocktrans with page_no=draft.page_no|add:1 %}on page {{page_no}}{% endblocktrans %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% if workflow_messages %}
|
||||
<div class="workflow-messages">
|
||||
{% for message in workflow_messages %}{{ message|safe }}{% endfor %}
|
||||
{% for message in workflow_messages %}{{ message|safe }}{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ html_form.render|safe }}
|
||||
|
|
Loading…
Reference in New Issue