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,25 @@
{% extends "wagtailadmin/base.html" %}
{% load wagtailadmin_tags i18n %}
{% block titletag %}{{ header_title }}{% endblock %}
{% block content %}
{% block header %}
{% block slim_header %}
{% if breadcrumbs_items %}
{# Ensure all necessary variables are passed explicitly here #}
{% include "wagtailadmin/shared/headers/slim_header.html" with breadcrumbs_items=breadcrumbs_items side_panels=side_panels history_url=history_url title=header_title search_url=index_results_url search_form=search_form filters=filters buttons=header_buttons icon_name=header_icon only %}
{% endif %}
{% endblock %}
{% block main_header %}
{% if not breadcrumbs_items %}
{% include "wagtailadmin/shared/header.html" with title=page_title subtitle=page_subtitle icon=header_icon only %}
{% endif %}
{% endblock %}
{% endblock %}
<div class="nice-padding">
{% block main_content %}{% endblock %}
</div>
{% endblock %}

View File

@@ -0,0 +1,4 @@
{% load i18n l10n %}
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
<input type="checkbox" id="chooser-modal-select-{{ value|unlocalize }}" data-multiple-choice-select name="id" value="{{ value|unlocalize }}" title="{% blocktrans trimmed with title=instance %}Select {{ title }}{% endblocktrans %}">
</td>

View File

@@ -0,0 +1,67 @@
{% load i18n wagtailadmin_tags %}
{% include "wagtailadmin/shared/header.html" with title=page_title merged=1 subtitle=page_subtitle icon=header_icon %}
{% if creation_form %}
{{ creation_form.media.js }}
{{ creation_form.media.css }}
{% endif %}
{% comment %} Do not attach JavaScript behaviour (data-tabs) below if there are no actual tabs used {% endcomment %}
<div class="w-tabs" {% if creation_form %}data-tabs data-tabs-disable-url{% endif %}>
{% if creation_form %}
<div class="w-tabs__wrapper w-overflow-hidden">
<div role="tablist" class="w-tabs__list w-w-full">
{% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with tab_id='search' title=search_tab_label %}
{% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with tab_id=view.creation_tab_id title=creation_tab_label %}
</div>
</div>
{% else %}
{% comment %} Ensure layout still works as expected (gap under header from tabs wrapper) even if no tabs used {% endcomment %}
<div class="w-tabs__wrapper"></div>
{% endif %}
<div class="tab-content">
<section
id="tab-search"
class="w-tabs__panel"
role="tabpanel"
aria-labelledby="tab-label-search"
>
{% block filter_form %}
{% if filter_form.fields %}
<form data-chooser-modal-search action="{{ results_url }}" method="GET" novalidate>
{% for field in filter_form.hidden_fields %}{{ field }}{% endfor %}
{% if filter_form.visible_fields %}
<ul class="fields">
{% for field in filter_form.visible_fields %}
<li>{% formattedfield field %}</li>
{% endfor %}
</ul>
{% endif %}
</form>
{% endif %}
{% endblock %}
{% if is_multiple_choice %}
<form action="{{ chosen_multiple_url }}" method="GET" data-multiple-choice-form>
<div id="search-results" class="listing">
{% include view.results_template_name %}
</div>
<input type="submit" data-multiple-choice-submit value="{% trans 'Confirm selection' %}" class="button" />
</form>
{% else %}
<div id="search-results" class="listing">
{% include view.results_template_name %}
</div>
{% endif %}
</section>
{% if creation_form %}
{% include view.creation_form_template_name %}
{% endif %}
</div>
</div>

View File

@@ -0,0 +1,36 @@
{% load wagtailadmin_tags %}
<section
id="tab-{{ view.creation_tab_id }}"
class="w-tabs__panel"
role="tabpanel"
hidden
aria-labelledby="tab-label-{{ view.creation_tab_id }}"
>
{% include "wagtailadmin/shared/non_field_errors.html" with form=creation_form %}
<form data-chooser-modal-creation-form action="{{ create_action_url }}" method="POST" {% if creation_form.is_multipart %}enctype="multipart/form-data"{% endif %} novalidate>
{% csrf_token %}
{% for field in creation_form.hidden_fields %}{{ field }}{% endfor %}
<ul class="fields">
{% for field in creation_form.visible_fields %}
<li>{% formattedfield field %}</li>
{% endfor %}
<li>
{% if create_action_clicked_label %}
<button
type="submit"
class="button button-longrunning"
data-controller="w-progress"
data-action="w-progress#activate"
data-w-progress-active-value="{{ create_action_clicked_label }}"
>
{% icon name="spinner" %}
<em data-w-progress-target="label">{{ create_action_label }}</em>
</button>
{% else %}
<button type="submit" class="button">{{ create_action_label }}</button>
{% endif %}
</li>
</ul>
</form>
</section>

View File

@@ -0,0 +1,32 @@
{% load i18n wagtailadmin_tags %}
{% if results %}
{% if is_searching %}
{% block search_results_count %}
<h2 role="alert">
{% blocktrans trimmed count counter=results.paginator.count %}
There is {{ counter }} match
{% plural %}
There are {{ counter }} matches
{% endblocktrans %}
</h2>
{% endblock %}
{% else %}
{% block listing_title %}{% endblock %}
{% endif %}
{% block results_listing %}
{% component table %}
{% endblock %}
{% include "wagtailadmin/shared/pagination_nav.html" with items=results linkurl=results_pagination_url %}
{% else %}
{% if is_searching %}
{% block no_search_results_message %}
<p role="alert">{% blocktrans trimmed %}Sorry, there are no matches for "<em>{{ search_query }}</em>"{% endblocktrans %}</p>
{% endblock %}
{% else %}
{% block no_items_message %}
<p>{% trans "There are no results." %}</p>
{% endblock %}
{% endif %}
{% endif %}

View File

@@ -0,0 +1,16 @@
{% extends "wagtailadmin/generic/base.html" %}
{% load i18n %}
{% block main_content %}
{% if usage_url %}
{% include "wagtailadmin/shared/usage_summary.html" %}
{% endif %}
{% if not is_protected %}
<p>{{ view.confirmation_message }}</p>
<form action="{{ view.get_delete_url }}" method="POST">
{% csrf_token %}
<input type="submit" value="{% trans 'Yes, delete' %}" class="button serious" />
<a href="{{ view.get_success_url }}" class="button button-secondary">{% trans "No, don't delete" %}</a>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,31 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}{% blocktrans trimmed with title=object_display_title %}Unpublish {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
{% include "wagtailadmin/shared/header.html" with title=_("Unpublish") subtitle=object_display_title icon=header_icon %}
<div class="nice-padding">
{% if usage_url %}
{% include "wagtailadmin/shared/usage_summary.html" %}
{% endif %}
{% block confirmation_text %}
<p>
{% blocktrans trimmed with model_name=model_opts.verbose_name %}
Are you sure you want to unpublish this {{ model_name }}?
{% endblocktrans %}
</p>
{% endblock %}
<form action="{{ unpublish_url }}" method="POST">
{% csrf_token %}
{% block form_content %}
{% endblock %}
<div>
<button class="button" type="submit">{% trans 'Yes, unpublish it' %}</button>
<a href="{{ next_url }}" class="button button-secondary">{% trans "No, don't unpublish" %}</a>
</div>
</form>
</div>
{% endblock %}

View File

@@ -0,0 +1,31 @@
{% load i18n %}
{% blocktrans trimmed with model_name=model_opts.verbose_name asvar publish_title %}
Publish {{ model_name }}
{% endblocktrans %}
{% include "wagtailadmin/shared/header.html" with title=publish_title icon="clipboard-list" %}
<div class="nice-padding">
<p>
{% if needs_changes %}
{% blocktrans trimmed with model_name=model_opts.verbose_name %}
This {{ model_name }} was marked as needing changes at <strong>{{ task }}</strong> in <strong>{{ workflow }}</strong>.
{% endblocktrans %}
{% else %}
{% blocktrans trimmed with model_name=model_opts.verbose_name %}
This {{ model_name }} is currently at <strong>{{ task }}</strong> in <strong>{{ workflow }}</strong>.
{% endblocktrans %}
{% endif %}
</p>
<p>
{% blocktrans trimmed with model_name=model_opts.verbose_name %}
Publishing this {{ model_name }} will cancel the current workflow.
{% endblocktrans %}
</p>
<p>
{% blocktrans trimmed with model_name=model_opts.verbose_name %}
Would you still like to publish this {{ model_name }}?
{% endblocktrans %}
</p>
<button type="submit" class="button" data-confirm-cancellation>{% trans 'Publish' %}</button>
<button type="submit" class="button no" data-cancel-dialog>{% trans 'Cancel' %}</button>
</div>

View File

@@ -0,0 +1 @@
{% extends "wagtailadmin/generic/form.html" %}

View File

@@ -0,0 +1,9 @@
{% extends "wagtailadmin/generic/form.html" %}
{% load i18n %}
{% block actions %}
{{ block.super }}
{% if delete_url %}
<a href="{{ delete_url }}" class="button no">{{ delete_item_label }}</a>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,54 @@
{% extends "wagtailadmin/generic/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block bodyclass %}editor-view{% endblock %}
{% block main_header %}
{% if breadcrumbs_items %}
<div class="nice-padding w-mt-8">
<h2 class="w-relative w-h1" id="header-title">
{% icon classname="w-absolute w-top-1 -w-left-11 w-max-w-[1em] w-max-h-[1em]" name=header_icon %}
{{ page_subtitle }}
</h2>
</div>
{% else %}
{{ block.super }}
{% endif %}
{% endblock %}
{% block main_content %}
{% block before_form %}{% endblock %}
<form action="{{ action_url }}" method="POST" novalidate{% if form.is_multipart %} enctype="multipart/form-data"{% endif %} data-edit-form>
{% csrf_token %}
{% if panel %}
{{ panel.render_form_content }}
{% else %}
{% block hidden_fields %}
{% for field in form.hidden_fields %}{{ field }}{% endfor %}
{% endblock %}
<ul class="fields">
{% block visible_fields %}
{% for field in form.visible_fields %}
<li>{% formattedfield field %}</li>
{% endfor %}
{% endblock %}
</ul>
{% endif %}
{% block actions %}
<button type="submit" class="button">{{ submit_button_label }}</button>
{% endblock %}
</form>
{% endblock %}
{% block extra_js %}
{{ block.super }}
{{ media.js }}
{% include "wagtailadmin/pages/_editor_js.html" %}
{% endblock %}
{% block extra_css %}
{{ block.super }}
{{ media.css }}
{% endblock %}

View File

@@ -0,0 +1,27 @@
{% load i18n wagtailadmin_tags %}
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
<div class="w-flex w-items-center w-justify-between">
<div>
<div class="w-flex w-items-center w-gap-2">
{{ value }}
{% if status %}
{% status status classname="w-status--primary" %}
{% endif %}
</div>
{% if instance.comment %}
<div>{% trans "Comment" %}: <em>{{ instance.comment }}</em></div>
{% endif %}
</div>
{% if actions %}
{% dropdown toggle_icon="dots-horizontal" toggle_aria_label=_("Actions") %}
{% for action in actions %}
<a href="{{ action.url }}">{{ action.label }}</a>
{% endfor %}
{% enddropdown %}
{% endif %}
</div>
</td>

View File

@@ -0,0 +1 @@
{% extends "wagtailadmin/generic/index_results.html" %}

View File

@@ -0,0 +1,15 @@
{% extends "wagtailadmin/generic/listing.html" %}
{% load i18n wagtailadmin_tags %}
{% block main_header %}
{% fragment as extra_actions %}
{% block extra_actions %}
{% if view.list_export %}
{% include view.export_buttons_template_name %}
{% endif %}
{% endblock %}
{% endfragment %}
{% if not breadcrumbs_items %}
{% include "wagtailadmin/shared/header.html" with title=page_title subtitle=page_subtitle action_url=header_action_url action_text=header_action_label action_icon=header_action_icon extra_actions=extra_actions icon=header_icon search_url=search_url search_form=search_form search_results_url=index_results_url only %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,47 @@
{% extends "wagtailadmin/generic/listing_results.html" %}
{% load i18n wagtailadmin_tags %}
{% block before_results %}
{{ block.super }}
{% if is_searching and view.show_other_searches %}
<div class="nice-padding">
{% search_other %}
</div>
{% endif %}
{% if not object_list %}
{# pass, to allow the same logic as `if object_list and (is_searching or is_filtering)` #}
{% elif is_searching or is_filtering %}
<div class="nice-padding">
<h2 role="alert">
{% blocktrans trimmed count counter=items_count %}
There is {{ counter }} match
{% plural %}
There are {{ counter }} matches
{% endblocktrans %}
</h2>
</div>
{% endif %}
{% endblock %}
{% block no_results_message %}
{% fragment as no_results_message %}
{% if is_searching or is_filtering %}
{% blocktrans trimmed with model_name=model_opts.verbose_name_plural asvar no_results_text %}
No {{ model_name }} match your query.
{% endblocktrans %}
{% elif add_url %}
{% blocktrans trimmed with model_name=model_opts.verbose_name_plural asvar no_results_text %}
There are no {{ model_name }} to display. Why not <a href="{{ add_url }}">add one</a>?
{% endblocktrans %}
{% else %}
{% blocktrans trimmed with model_name=model_opts.verbose_name_plural asvar no_results_text %}
There are no {{ model_name }} to display.
{% endblocktrans %}
{% endif %}
{{ no_results_text|capfirst }}
{% endfragment %}
<p>{{ no_results_message }}</p>
{% endblock %}

View File

@@ -0,0 +1,40 @@
{% extends "wagtailadmin/generic/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block main_content %}
{% block fields_output %}
{% if fields %}
<dl>
{% for field in fields %}
<dt>{{ field.label }}</dt>
<dd>
{% if field.component %}
{% component field.component %}
{% else %}
{{ field.value }}
{% endif %}
</dd>
{% endfor %}
</dl>
{% endif %}
{% endblock %}
{% endblock %}
{% block content %}
{{ block.super }}
{% block footer %}
{% if edit_url or delete_url %}
<footer class="footer">
<div class="footer__container">
{% if edit_url %}
<a href="{{ edit_url }}" class="button">{% trans 'Edit' %}</a>
{% endif %}
{% if delete_url %}
<a href="{{ delete_url }}" class="button serious">{% trans 'Delete' %}</a>
{% endif %}
</div>
</footer>
{% endif %}
{% endblock %}
{% endblock %}

View File

@@ -0,0 +1,41 @@
{% extends "wagtailadmin/generic/base.html" %}
{% load i18n %}
{% block main_header %}
{% if not breadcrumbs_items %}
{% include "wagtailadmin/shared/header.html" with title=page_title subtitle=page_subtitle action_url=header_action_url action_text=header_action_label icon=header_icon only %}
{% endif %}
{% endblock %}
{% block content %}
{% block header %}
{{ block.super }}
{% endblock %}
{% block listing %}
<div class="{% if filters and not breadcrumbs_items %}filterable{% endif %}">
<div id="listing-results">
{% comment %}
This div will be replaced on AJAX refreshes.
Do not add page furniture here unless you intend it to disappear on AJAX refresh
{% endcomment %}
{% include view.results_template_name|default:"wagtailadmin/generic/listing_results.html" %}
</div>
{% if filters and not breadcrumbs_items %}
{% include "wagtailadmin/shared/filters.html" %}
{% endif %}
</div>
{% endblock %}
{% block bulk_actions %}{% endblock %}
{% endblock %}
{% block extra_js %}
{{ block.super }}
{{ media.js }}
{% endblock %}
{% block extra_css %}
{{ block.super }}
{{ media.css }}
{% endblock %}

View File

@@ -0,0 +1,38 @@
{% load wagtailadmin_tags i18n %}
{% block before_results %}
{% if view.active_filters %}
{% include "wagtailadmin/shared/active_filters.html" with active_filters=view.active_filters %}
{% endif %}
{% if render_filters_fragment %}
<template data-controller="w-teleport" data-w-teleport-target-value="#filters-drilldown" data-w-teleport-reset-value="true">
{% include "wagtailadmin/shared/headers/_filters.html" with filters=filters %}
</template>
{% endif %}
{% if render_buttons_fragment %}
<template data-controller="w-teleport" data-w-teleport-target-value="#w-slim-header-buttons" data-w-teleport-reset-value="true">
{% for button in header_buttons %}
{% component button %}
{% endfor %}
</template>
{% endif %}
{% endblock %}
{% if object_list %}
{% block results %}
{% component table %}
{% endblock %}
{% block pagination %}
{% if is_paginated %}
<div class="nice-padding">
{% include "wagtailadmin/shared/pagination_nav.html" with items=page_obj linkurl=index_url %}
</div>
{% endif %}
{% endblock %}
{% else %}
<div class="nice-padding w-mt-8">
{% block no_results_message %}<p>{% trans "There are no results." %}</p>{% endblock %}
</div>
{% endif %}

View File

@@ -0,0 +1,27 @@
{% load wagtailadmin_tags i18n %}
{% include "wagtailadmin/shared/non_field_errors.html" %}
<form action="{{ edit_action }}" method="POST" enctype="multipart/form-data" novalidate>
<ul class="fields">
{% csrf_token %}
{% for field in form %}
{% if field.is_hidden %}
{{ field }}
{% else %}
<li>{% formattedfield field %}</li>
{% endif %}
{% endfor %}
<li>
<button
type="submit"
class="button button-longrunning"
data-controller="w-progress"
data-action="w-progress#activate"
>
{% icon name="spinner" %}{% trans 'Update' %}
</button>
<a href="{{ delete_action }}" class="delete button no">{% trans "Delete" %}</a>
</li>
</ul>
</form>

View File

@@ -0,0 +1,23 @@
{% extends 'wagtailadmin/admin_base.html' %}
{% load i18n %}
{% block titletag %}{% trans 'Preview not available' %}{% endblock %}
{% block furniture %}
<div class="preview-error">
<header class="preview-error__header">
<h1 class="preview-error__title">{% trans 'Preview not available' %}</h1>
</header>
<p class="preview-error__details">
{% blocktrans trimmed %}
Preview cannot display due to validation errors.
<br />
Click save to highlight the relevant fields.
{% endblocktrans %}
</p>
</div>
{% endblock %}
{# Avoid loading all of Wagtails JavaScript for a fully static page. #}
{% block js %}
{% endblock %}

View File

@@ -0,0 +1,84 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}{% blocktrans trimmed with title=page_subtitle %}Comparing {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
{% include "wagtailadmin/shared/header.html" with title=_("Comparing") subtitle=page_subtitle icon=header_icon %}
<div class="nice-padding">
<p>
<a href="{{ history_url }}" class="button button-small">{{ history_label|capfirst }}</a>
<a href="{{ edit_url }}" class="button button-small button-secondary">{{ edit_label|capfirst }}</a>
</p>
<table class="listing">
<col width="15%" />
<col />
<thead>
<tr>
<th>{% trans "Fields" %}</th>
<th>{% trans "Changes" %}</th>
</tr>
</thead>
<tbody>
{% for comp in comparison %}
<tr>
<td class="title" valign="top">
<div class="title-wrapper">{{ comp.field_label }}:</div>
</td>
<td class="comparison{% if not comp.is_field %} no-padding{% endif %}">
{% if comp.is_field %}
{{ comp.htmldiff }}
{% elif comp.is_child_relation %}
{% for child_comp in comp.get_child_comparisons %}
<div class="comparison__child-object {% if child_comp.is_addition %}addition{% elif child_comp.is_deletion %}deletion{% endif %}">
{% with child_comp.get_position_change as move %}
{% if move %}
<div class="help-block help-info">
{% icon name='help' %}
<p>
{% if move > 0 %}
{% blocktrans trimmed count counter=move %}
Moved down 1 place.
{% plural %}
Moved down {{ counter }} places.
{% endblocktrans %}
{% elif move < 0 %}
{% blocktrans trimmed count counter=move|abs %}
Moved up 1 place.
{% plural %}
Moved up {{ counter }} places.
{% endblocktrans %}
{% endif %}
</p>
</div>
{% endif %}
{% endwith %}
<dl class="comparison__list">
{% for field_comp in child_comp.get_field_comparisons %}
<dt>{{ field_comp.field_label }}</dt>
<dd>{{ field_comp.htmldiff }}</dd>
{% endfor %}
</dl>
</div>
{% endfor %}
{% endif %}
</td>
</tr>
{% empty %}
<tr>
<td colspan="2" class="no-results-message">
<p>{% trans "There are no differences between these two versions" %}</p>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}