Initial commit

This commit is contained in:
2024-08-27 20:33:44 +02:00
commit 1f1832267d
14794 changed files with 1599592 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
{% load wagtailadmin_tags %}
<button type="button" id="comment-icon" data-annotation class="w-field__comment-button w-field__comment-button--reveal !w-hidden">
{% icon name='comment' %}
</button>
{{ comments_data|json_script:"comments-data" }}
<div id="comments-output" hidden></div>

View File

@@ -0,0 +1,2 @@
{% load wagtailadmin_tags i18n %}
{% include "wagtailadmin/shared/field.html" with show_label=False help_text=self.help_text %}

View File

@@ -0,0 +1,9 @@
{% load wagtailadmin_tags %}
{% if self.help_text %}
{% help_block status="info" %}{{ self.help_text }}{% endhelp_block %}
{% endif %}
{% field_row %}
{% for child in self.visible_children %}
{% include "wagtailadmin/panels/multi_field_panel_child.html" %}
{% endfor %}
{% endfield_row %}

View File

@@ -0,0 +1,6 @@
<fieldset>
{% if self.heading %}
<legend class="w-sr-only">{{ self.heading }}</legend>
{% endif %}
<div class="{{ self.classname }}">{{ self.content|safe }}</div>
</fieldset>

View File

@@ -0,0 +1,54 @@
{% load i18n l10n wagtailadmin_tags %}
{{ self.formset.management_form }}
{% if self.formset.non_form_errors %}
<div class="error-message">
{% for error in self.formset.non_form_errors %}
<span>{{ error|escape }}</span>
{% endfor %}
</div>
{% endif %}
{% if self.help_text %}
{% help_block status="info" %}{{ self.help_text }}{% endhelp_block %}
{% endif %}
<div id="id_{{ self.formset.prefix }}-FORMS">
{% comment %}
Child elements of this div will become orderable elements. Do not place additional
"furniture" elements here unless you intend them to be part of the child ordering.
{% endcomment %}
{% for child in self.children %}
{% include "wagtailadmin/panels/inline_panel_child.html" %}
{% endfor %}
</div>
<template id="id_{{ self.formset.prefix }}-EMPTY_FORM_TEMPLATE">
{% include "wagtailadmin/panels/inline_panel_child.html" with child=self.empty_child %}
</template>
{# Align with guiding line of the preceding child panel. #}
<div class="w-mb-4 -w-ml-4">
{% block add_button %}
<button type="button" class="button button-small button-secondary chooser__choose-button" id="id_{{ self.formset.prefix }}-ADD">
{% icon name=icon|default:"plus-inverse" %}{% blocktrans trimmed with label=self.label|lower %}Add {{ label }}{% endblocktrans %}
</button>
{% endblock %}
</div>
{% block js_init %}
<script>
(function() {
var panel = new InlinePanel({
formsetPrefix: "id_{{ self.formset.prefix }}",
emptyChildFormPrefix: "{{ self.empty_child.form.prefix }}",
canOrder: {% if can_order %}true{% else %}false{% endif %},
maxForms: {{ self.formset.max_num|unlocalize }}
});
})();
</script>
{% endblock %}

View File

@@ -0,0 +1,28 @@
{% load i18n wagtailadmin_tags %}
{% fragment as id %}inline_child_{{ child.form.prefix }}{% endfragment %}
{% fragment as panel_id %}{{ id }}-panel{% endfragment %}
<div data-inline-panel-child id="{{ id }}" data-contentpath-disabled>
{% fragment as header_controls %}
{% if can_order %}
<button type="button" class="button button--icon text-replace white" data-inline-panel-child-move-up title="{% trans 'Move up' %}">{% icon name="arrow-up" %}</button>
<button type="button" class="button button--icon text-replace white" data-inline-panel-child-move-down title="{% trans 'Move down' %}">{% icon name="arrow-down" %}</button>
{% endif %}
<button type="button" class="button button--icon text-replace white" id="{{ child.form.DELETE.id_for_label }}-button" title="{% trans 'Delete' %}">{% icon name="bin" %}</button>
{% endfragment %}
{% fragment as heading %}
{{ self.label }}<span data-inline-panel-child-count></span>
{% endfragment %}
{% panel id=panel_id heading=heading heading_size="label" heading_level="3" header_controls=header_controls %}
{% if child.form.non_field_errors %}
<ul>
{% for error in child.form.non_field_errors %}
<li class="error-message">
<span>{{ error|escape }}</span>
</li>
{% endfor %}
</ul>
{% endif %}
{{ child.render_form_content }}
{% endpanel %}
</div>

View File

@@ -0,0 +1,8 @@
{% load wagtailadmin_tags %}
{# Avoid semantic markup here. Children of this panel can either be fields, or other groups. #}
{% if self.help_text %}
{% help_block status="info" %}{{ self.help_text }}{% endhelp_block %}
{% endif %}
{% for child in self.visible_children %}
{% include "wagtailadmin/panels/multi_field_panel_child.html" %}
{% endfor %}

View File

@@ -0,0 +1,17 @@
{% load wagtailadmin_tags %}
<div class="{% classnames "w-panel__wrapper" child.classes %}" {% include "wagtailadmin/shared/attrs.html" with attrs=child.attrs %}>
{% if child.heading %}
{% fragment as label_content %}
{{ child.heading }}{% if child.is_required %}<span class="w-required-mark">*</span>{% endif %}
{% endfragment %}
{% if child.read_only %}
<h3 class="w-field__label" id="{{ child.id_for_label }}-label">{{ label_content }}</h3>
{% elif child.id_for_label %}
<label class="w-field__label" for="{{ child.id_for_label }}" id="{{ child.id_for_label }}-label">{{ label_content }}</label>
{% else %}
<h3 class="w-field__label">{{ label_content }}</h3>
{% endif %}
{% endif %}
{% component child %}
</div>

View File

@@ -0,0 +1,26 @@
{% extends "wagtailadmin/panels/inline_panel.html" %}
{% load i18n l10n wagtailadmin_tags %}
{% block add_button %}
<button type="button" class="button button-small button-secondary chooser__choose-button" id="id_{{ self.formset.prefix }}-OPEN_MODAL">
{% icon name=icon|default:"plus-inverse" %}{% blocktrans trimmed with label=self.label|lower %}Add {{ label }}{% endblocktrans %}
</button>
{% endblock %}
{% block js_init %}
{% with script_id="id_"|add:self.formset.prefix|add:"-CHOOSER_WIDGET" %}
{{ chooser_widget_definition|json_script:script_id }}
{% endwith %}
<script>
(function() {
var panel = new MultipleChooserPanel({
formsetPrefix: "id_{{ self.formset.prefix }}",
emptyChildFormPrefix: "{{ self.empty_child.form.prefix }}",
canOrder: {% if can_order %}true{% else %}false{% endif %},
maxForms: {{ self.formset.max_num|unlocalize }},
chooserFieldName: "{{ chooser_field_name }}",
});
})();
</script>
{% endblock %}

View File

@@ -0,0 +1,12 @@
{% load wagtailadmin_tags %}
<div class="w-form-width" {% include "wagtailadmin/shared/attrs.html" with attrs=self.attrs %}>
{% if self.help_text %}
{% help_block status="info" %}{{ self.help_text }}{% endhelp_block %}
{% endif %}
{% for child, identifier in self.visible_children_with_identifiers %}
{% panel id_prefix=self.prefix id=identifier classname=child.classes|join:' ' attrs=child.attrs heading=child.heading heading_size="label" icon=child.icon id_for_label=child.id_for_label is_required=child.is_required %}
{% component child %}
{% endpanel %}
{% endfor %}
</div>

View File

@@ -0,0 +1,32 @@
{% load i18n wagtailadmin_tags %}
{% blocktrans trimmed with model_name=model_opts.verbose_name asvar schedule_publishing_dialog_subtitle %}
Choose when this {{ model_name }} should go live and/or expire
{% endblocktrans%}
{% if page %}
{% page_permissions instance as page_perms %}
{% trans 'Choose when this page should go live and/or expire' as schedule_publishing_dialog_subtitle %}
{% if page_perms.can_publish %}
{% trans 'This publishing schedule will only take effect after you select the "Publish" option' as message_heading %}
{% else %}
{% trans "Anyone with editing permissions can create schedules" as message_heading %}
{% trans "But only those with publishing permissions can make them effective." as message_description %}
{% endif %}
{% endif %}
{% dialog id='schedule-publishing-dialog' dialog_root_selector='[data-edit-form]' classname=classname icon_name='calendar-alt' title=_("Set publishing schedule") subtitle=schedule_publishing_dialog_subtitle|capfirst message_icon_name='info' message_status='info' message_heading=message_heading message_description=message_description %}
{% include 'wagtailadmin/panels/multi_field_panel.html' %}
<button
type="submit"
class="button action-save button-longrunning"
data-controller="w-progress w-kbd"
data-action="w-progress#activate"
data-w-kbd-key-value="mod+s"
data-w-kbd-scope-value="global"
data-w-progress-active-value="{% trans 'Saving…' %}"
>
<em data-w-progress-target="label">{% trans 'Save schedule' %}</em>
</button>
{% enddialog %}

View File

@@ -0,0 +1,3 @@
<div class="w-field__textoutput" role="textbox" tabindex="0" aria-labelledby="{{ id_for_label }}-label"{% if help_text %} aria-describedby="{{ help_text_id }}"{% endif %} aria-readonly="true">
{{ display_value }}
</div>

View File

@@ -0,0 +1,37 @@
{% load wagtailadmin_tags i18n %}
{% if self.help_text %}
{% help_block status="info" %}{{ self.help_text }}{% endhelp_block %}
{% endif %}
<div class="w-tabs" data-tabs {% include "wagtailadmin/shared/attrs.html" with attrs=self.attrs %}>
<div class="w-tabs__wrapper">
<div role="tablist" class="w-tabs__list">
{% for child, identifier in self.visible_children_with_identifiers %}
{% if child.show_panel_furniture %}
{# If there's at least one child that shows the panel furniture, render the tab navigation #}
{% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with tab_id=identifier title=child.heading classname=child.classes|join:" " %}
{% endif %}
{% endfor %}
</div>
</div>
<div class="tab-content">
{% for child, identifier in self.visible_children_with_identifiers %}
{% if child.show_panel_furniture %}
<section
id="tab-{{ identifier }}"
class="{% classnames "w-tabs__panel" child.classes %}"
role="tabpanel"
aria-labelledby="tab-label-{{ identifier }}"
hidden
>
{{ child.render_html }}
</section>
{% else %}
{# If all of the children in the tab do not show the panel furniture, render them without the tab section #}
{{ child.render_html }}
{% endif %}
{% endfor %}
</div>
</div>