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,24 @@
{% load i18n wagtailadmin_tags %}
{% if show_locale_controls %}
<div>
{% if locale_options %}
{% if selected_locale %}
{% include "wagtailadmin/shared/locale_selector.html" with translations=locale_options locale=selected_locale only %}
{% else %}
{% include "wagtailadmin/shared/locale_selector.html" with translations=locale_options locale=parent_page.locale only %}
{% endif %}
{% else %}
{% icon name="site" classname="default" %}
{{ parent_page.locale.get_display_name }}
{% endif %}
</div>
{% endif %}
{% querystring p=None as querystring_value %}
{% page_breadcrumbs parent_page 'wagtailadmin_choose_page_child' include_self=False is_expanded=True querystring_value=querystring_value %}
{% component table %}
{% url 'wagtailadmin_choose_page_child' parent_page.id as pagination_base_url %}
{% paginate pagination_page base_url=pagination_base_url classname="navigate-pages" %}

View File

@@ -0,0 +1,38 @@
{% load i18n wagtailadmin_tags %}
{% if allow_external_link or allow_email_link or allow_phone_link or allow_anchor_link or current == 'external' or current == 'email' or current == 'phone' or current == 'anchor' %}
<p class="link-types">
{% if current == 'internal' %}
<b>{% trans "Internal link" %}</b>
{% else %}
{% if parent_page_id %}
<a href="{% url 'wagtailadmin_choose_page_child' parent_page_id %}{% querystring p=None parent_page_id=None %}">{% trans "Internal link" %}</a>
{% else %}
<a href="{% url 'wagtailadmin_choose_page' %}{% querystring p=None parent_page_id=None %}">{% trans "Internal link" %}</a>
{% endif %}
{% endif %}
{% if current == 'external' %}
| <b>{% trans "External link" %}</b>
{% elif allow_external_link %}
| <a href="{% url 'wagtailadmin_choose_page_external_link' %}{% querystring p=None parent_page_id=parent_page_id %}">{% trans "External link" %}</a>
{% endif %}
{% if current == 'email' %}
| <b>{% trans "Email link" %}</b>
{% elif allow_email_link %}
| <a href="{% url 'wagtailadmin_choose_page_email_link' %}{% querystring p=None parent_page_id=parent_page_id %}">{% trans "Email link" %}</a>
{% endif %}
{% if current == 'phone' %}
| <b>{% trans "Phone link" %}</b>
{% elif allow_phone_link %}
| <a href="{% url 'wagtailadmin_choose_page_phone_link' %}{% querystring p=None parent_page_id=parent_page_id %}">{% trans "Phone link" %}</a>
{% endif %}
{% if current == 'anchor' %}
| <b>{% trans "Anchor link" %}</b>
{% elif allow_anchor_link %}
| <a href="{% url 'wagtailadmin_choose_page_anchor_link' %}{% querystring p=None parent_page_id=parent_page_id %}">{% trans "Anchor link" %}</a>
{% endif %}
</p>
{% endif %}

View File

@@ -0,0 +1,16 @@
{% load i18n wagtailadmin_tags %}
<h2 role="alert">
{% blocktrans trimmed count counter=pages.paginator.count %}
There is {{ counter }} match
{% plural %}
There are {{ counter }} matches
{% endblocktrans %}
</h2>
{% if pages %}
{% component table %}
{% url 'wagtailadmin_choose_page_search' as pagination_base_url %}
{% paginate pages base_url=pagination_base_url classname="navigate-pages" %}
{% endif %}

View File

@@ -0,0 +1,16 @@
{% load i18n wagtailadmin_tags %}
{% include "wagtailadmin/shared/header.html" with title=_("Add an anchor link") %}
<div class="nice-padding">
{% include 'wagtailadmin/chooser/_link_types.html' with current='anchor' %}
<form action="{% url 'wagtailadmin_choose_page_anchor_link' %}{% querystring %}" method="post" novalidate>
{% csrf_token %}
<ul class="fields">
{% for field in form %}
<li>{% formattedfield field %}</li>
{% endfor %}
<li><input type="submit" value="{% trans 'Insert anchor' %}" class="button" /></li>
</ul>
</form>
</div>

View File

@@ -0,0 +1,38 @@
{% load i18n wagtailadmin_tags %}
{% if page_types_restricted %}
{% trans "Choose" as choose_str %}
{% else %}
{% trans "Choose a page" as choose_str %}
{% endif %}
{% include "wagtailadmin/shared/header.html" with title=choose_str subtitle=page_type_names|join:", " search_url="wagtailadmin_choose_page_search" query_parameters="page_type="|add:page_type_string icon="doc-empty-inverse" search_disable_async=True %}
<div class="nice-padding">
{% include 'wagtailadmin/chooser/_link_types.html' with current='internal' %}
{% if page_types_restricted %}
<p class="help-block help-warning">
{% icon name='warning' %}
{% blocktrans trimmed with type=page_type_names|join:", " count counter=page_type_names|length %}
Only pages of type "{{ type }}" may be chosen for this field. Search results will exclude pages of other types.
{% plural %}
Only the following page types may be chosen for this field: {{ type }}. Search results will exclude pages of other types.
{% endblocktrans %}
</p>
{% endif %}
{% if is_multiple_choice %}
<form action="{% url 'wagtailadmin_choose_page_chosen_multiple' %}" method="GET" data-multiple-choice-form>
<div class="page-results">
{% include 'wagtailadmin/chooser/_browse_results.html' %}
</div>
<input type="submit" data-multiple-choice-submit value="{% trans 'Confirm selection' %}" class="button" />
</form>
{% else %}
<div class="page-results">
{% include 'wagtailadmin/chooser/_browse_results.html' %}
</div>
{% endif %}
</div>

View File

@@ -0,0 +1,21 @@
{% load i18n wagtailadmin_tags %}
{% trans "Convert to internal link" as convert_str %}
{% include "wagtailadmin/shared/header.html" with title=convert_str %}
<div class="nice-padding">
<p>
{% blocktrans trimmed %}
The URL you entered, <a target="_blank" rel="noreferrer" href="{{ submitted_url }}">{{ submitted_url }}</a>,
looks like it matches the internal page {{ page }}, which has the URL
<a target="_blank" rel="noreferrer" href="{{ internal_url }}">{{ internal_url }}</a>.
{% endblocktrans %}
</p>
<p>
{% blocktrans trimmed %}
Converting this to an internal link to {{ page }} would make the link automatically update if the underlying page changes its URL.
Would you like to do this?
{% endblocktrans %}
</p>
<button type="button" data-action-confirm class="button button-primary">{% trans 'Convert to internal link' %}</button>
<button type="button" data-action-deny class="button button-secondary">{% trans 'Use external link' %}</button>
</div>

View File

@@ -0,0 +1,16 @@
{% load i18n wagtailadmin_tags %}
{% include "wagtailadmin/shared/header.html" with title=_("Add an email link") %}
<div class="nice-padding">
{% include 'wagtailadmin/chooser/_link_types.html' with current='email' %}
<form action="{% url 'wagtailadmin_choose_page_email_link' %}{% querystring %}" method="post" novalidate>
{% csrf_token %}
<ul class="fields">
{% for field in form %}
<li>{% formattedfield field %}</li>
{% endfor %}
<li><input type="submit" value="{% trans 'Insert link' %}" class="button" /></li>
</ul>
</form>
</div>

View File

@@ -0,0 +1,16 @@
{% load i18n wagtailadmin_tags %}
{% include "wagtailadmin/shared/header.html" with title=_("Add an external link") %}
<div class="nice-padding">
{% include 'wagtailadmin/chooser/_link_types.html' with current='external' %}
<form action="{% url 'wagtailadmin_choose_page_external_link' %}{% querystring %}" method="post" novalidate>
{% csrf_token %}
<ul class="fields">
{% for field in form %}
<li>{% formattedfield field %}</li>
{% endfor %}
<li><input type="submit" value="{% trans 'Insert link' %}" class="button" /></li>
</ul>
</form>
</div>

View File

@@ -0,0 +1,16 @@
{% load i18n wagtailadmin_tags %}
{% include "wagtailadmin/shared/header.html" with title=_("Add a phone link") %}
<div class="nice-padding">
{% include 'wagtailadmin/chooser/_link_types.html' with current='phone' %}
<form action="{% url 'wagtailadmin_choose_page_phone_link' %}{% querystring %}" method="post" novalidate>
{% csrf_token %}
<ul class="fields">
{% for field in form %}
<li>{% formattedfield field %}</li>
{% endfor %}
<li><input type="submit" value="{% trans 'Insert link' %}" class="button" /></li>
</ul>
</form>
</div>

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 }}" {% if not instance.can_choose %}disabled{% endif %} title="{% blocktrans trimmed with title=instance %}Select {{ title }}{% endblocktrans %}">
</td>

View File

@@ -0,0 +1,6 @@
{% load i18n wagtailadmin_tags %}
<td class="{% if value.can_descend %}children{% endif %} {% if column.classname %}{{ column.classname }}{% endif %}">
{% if value.can_descend %}
<a href="{% url 'wagtailadmin_choose_page_child' value.id %}{% querystring p=None %}" class="navigate-pages" title="{% blocktrans trimmed with title=value.get_admin_display_title %}Explore subpages of '{{ title }}'{% endblocktrans %}" arial-label="{% trans 'Explore' %}">{% icon name="arrow-right" classname="default" %}</a>
{% endif %}
</td>

View File

@@ -0,0 +1,5 @@
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% if not value.is_root %}
{% include "wagtailadmin/shared/page_status_tag.html" with page=value %}
{% endif %}
</td>

View File

@@ -0,0 +1,21 @@
{% load l10n wagtailadmin_tags %}
{% load wagtailcore_tags %}
<td class="{% if column.classname %}{{ column.classname }} {% endif %}title">
<div class="title-wrapper">
{% if page.can_choose %}
{% if column.is_multiple_choice %}
<label for="chooser-modal-select-{{ page.id|unlocalize }}">{{ value }}</label>
{% else %}
<a class="choose-page" href="#{{ page.id|unlocalize }}" data-id="{{ page.id|unlocalize }}" data-title="{{ page.title }}" data-admin-title="{{ page.get_admin_display_title }}" data-url="{% pageurl page %}" data-parent-id="{{ page.get_parent.id|unlocalize }}" data-edit-url="{% url 'wagtailadmin_pages:edit' page.id %}">{{ value }}</a>
{% endif %}
{% else %}
{{ value }}
{% endif %}
{% if show_locale_labels %}
{% status page.locale.get_display_name classname="w-status--label" %}
{% endif %}
{% include "wagtailadmin/pages/listing/_privacy_indicator.html" with page=page %}
{% include "wagtailadmin/pages/listing/_locked_indicator.html" with page=page %}
</div>
</td>

View File

@@ -0,0 +1,7 @@
{% load wagtailadmin_tags %}
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% if value %}
<a href="{% url 'wagtailadmin_choose_page_child' value.id %}" class="navigate-parent">{{ value.get_admin_display_title }}</a>
{% if show_locale_labels %}{% status value.locale.get_display_name classname="w-status--label" %}{% endif %}
{% endif %}
</td>