148 lines
9.1 KiB
HTML
148 lines
9.1 KiB
HTML
{% extends "wcs/backoffice.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block appbar %}{% endblock %}
|
|
|
|
{% 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>
|
|
{% if custom_views %}
|
|
<button role="tab" aria-selected="false" aria-controls="inspect-customviews" id="tab-customviews" tabindex="-1">{% trans "Custom views" %}</button>
|
|
{% endif %}
|
|
{% if deprecations.report_lines %}
|
|
<button role="tab" aria-selected="false" aria-controls="inspect-deprecations" id="tab-deprecations" tabindex="-1">{% trans "Deprecations" %}</button>
|
|
{% endif %}
|
|
</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-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 "Management sidebar elements" %}{% trans ":" %}</span>
|
|
<ul>
|
|
{% for label in formdef.management_sidebar_items_labels %} <li>{{ label }}</li>{% endfor %}
|
|
</ul>
|
|
</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.get_drafts_lifespan }}</li>
|
|
<li><span class="parameter">{% trans "Maximum number of drafts per user" %}{% trans ":" %}</span> {{ formdef.get_drafts_max_per_user }}</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>
|
|
|
|
<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 id="inspect-customviews" role="tabpanel" tabindex="0" aria-labelledby="tab-customviews" hidden>
|
|
<div>
|
|
{% for custom_view in custom_views %}
|
|
<h4>{{ custom_view.title }}</h4>
|
|
<ul>
|
|
<li>
|
|
<span class='parameter'>{% trans "Visibility" %}{% trans ":" %}</span>
|
|
{% if custom_view.visibility == 'any' %}
|
|
{% trans "to any users" %}
|
|
{% elif custom_view.visibility == 'datasource' %}
|
|
{% trans "as data source" %}
|
|
{% elif custom_view.visibility == 'role' %}
|
|
{% trans "to role" %} ({{ custom_view.role|default:'-' }})
|
|
{% endif %}</li>
|
|
<li><span class='parameter'>{% trans "Default view" %}{% trans ":" %}</span> {{ custom_view.is_default|yesno }}</li>
|
|
<li><span class='parameter'>{% trans "Digest" %}{% trans ":" %}</span> {{ custom_view.digest_template|default:'-' }}</li>
|
|
<li><span class='parameter'>{% trans "Columns" %}{% trans ":" %}</span> {{ custom_view.columns|default:'-' }}</li>
|
|
<li><span class='parameter'>{% trans "Filters" %}{% trans ":" %}</span> {{ custom_view.filters|default:'-' }}</li>
|
|
<li><span class='parameter'>{% trans "Order by" %}{% trans ":" %}</span> {{ custom_view.order_by|default:'-' }}</li>
|
|
{% if custom_view.visibility == 'datasource' %}
|
|
<li><span class='parameter'>{% trans "Group by" %}{% trans ":" %}</span> {{ custom_view.group_by|default:'-' }}</li>
|
|
{% endif %}
|
|
</ul>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
{% if deprecations %}
|
|
<div id="inspect-deprecations" role="tabpanel" tabindex="0" aria-labelledby="tab-deprecations" hidden>
|
|
{% regroup deprecations.report_lines by category as category_report_lines %}
|
|
{% for category in category_report_lines %}
|
|
<h4>{{ deprecation_titles|get:category.grouper }}</h4>
|
|
<div class="section--{{ category.grouper }}">
|
|
<ul>
|
|
{% for report_line in category.list %}
|
|
<li class="{{ report_line.css_class|default:"" }}"><a href="{{ report_line.url }}"
|
|
>{{ report_line.location_label }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block sidebar-content %}
|
|
{{ view.snapshot_info_inspect_block|safe }}
|
|
{% endblock %}
|