Initial commit
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
{% extends 'wagtailadmin/bulk_actions/confirmation/base.html' %}
|
||||
{% load i18n wagtailusers_tags wagtailadmin_tags %}
|
||||
|
||||
{% block titletag %}
|
||||
{% if items|length == 1 %}
|
||||
{% blocktrans trimmed with snippet_type_name=model_opts.verbose_name %}Delete {{ snippet_type_name }}{% endblocktrans %} - {{ items.0.item }}
|
||||
{% else %}
|
||||
{{ items|length }} {{ model_opts.verbose_name_plural|capfirst }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
{% trans "Delete " as delete_str %}
|
||||
{% if items|length == 1 %}
|
||||
{% include "wagtailadmin/shared/header.html" with title=delete_str subtitle=items.0.item icon=header_icon only %}
|
||||
{% else %}
|
||||
{% include "wagtailadmin/shared/header.html" with title=delete_str subtitle=model_opts.verbose_name_plural|capfirst icon=header_icon only %}
|
||||
{% endif %}
|
||||
{% endblock header %}
|
||||
|
||||
{% block items_with_access %}
|
||||
{% if items %}
|
||||
{% if items|length == 1 %}
|
||||
<div class="usagecount">
|
||||
<a href="{{ items.0.usage_url }}">{% blocktrans trimmed count usage_count=items.0.usage_count %}Used {{ usage_count }} time{% plural %}Used {{ usage_count }} times{% endblocktrans %}</a>
|
||||
</div>
|
||||
<p>{% blocktrans trimmed with snippet_type_name=model_opts.verbose_name %}Are you sure you want to delete this {{ snippet_type_name }}?{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
<p>{% blocktrans trimmed with snippet_type_name=model_opts.verbose_name_plural count=items|length %}Are you sure you want to delete {{ count }} {{ snippet_type_name }}?{% endblocktrans %}</p>
|
||||
<ul>
|
||||
{% for snippet in items %}
|
||||
<li>
|
||||
<a href="{{ snippet.edit_url }}" target="_blank" rel="noreferrer">{{ snippet.item }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock items_with_access %}
|
||||
|
||||
|
||||
{% block items_with_no_access %}
|
||||
{% if items_with_no_access|length == 1 %}
|
||||
{% blocktrans with snippet_type_name=model_opts.verbose_name trimmed asvar no_access_msg %}
|
||||
You don't have permission to delete this {{ snippet_type_name }}
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans with snippet_plural_name=model_opts.verbose_name_plural trimmed asvar no_access_msg %}
|
||||
You don't have permission to delete these {{ snippet_plural_name }}
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% include 'wagtailsnippets/bulk_actions/list_items_with_no_access.html' with items=items_with_no_access no_access_msg=no_access_msg %}
|
||||
{% endblock items_with_no_access %}
|
||||
|
||||
{% block form_section %}
|
||||
{% if items %}
|
||||
{% trans 'Yes, delete' as action_button_text %}
|
||||
{% trans "No, don't delete" as no_action_button_text %}
|
||||
{% include 'wagtailadmin/bulk_actions/confirmation/form.html' with action_button_class="serious" %}
|
||||
{% else %}
|
||||
{% include 'wagtailadmin/bulk_actions/confirmation/go_back.html' %}
|
||||
{% endif %}
|
||||
{% endblock form_section %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% extends 'wagtailadmin/bulk_actions/confirmation/list_items_with_no_access.html' %}
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
{% block per_item %}
|
||||
{{ item }}
|
||||
{% endblock per_item %}
|
||||
11
env/lib/python3.10/site-packages/wagtail/snippets/templates/wagtailsnippets/chooser/results.html
vendored
Normal file
11
env/lib/python3.10/site-packages/wagtail/snippets/templates/wagtailsnippets/chooser/results.html
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends "wagtailadmin/generic/chooser/results.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block no_search_results_message %}
|
||||
<p role="alert">{% blocktrans trimmed %}Sorry, no snippets match "<em>{{ search_query }}</em>"{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block no_items_message %}
|
||||
{% url add_url_name as wagtailsnippets_create_snippet_url %}
|
||||
<p>{% blocktrans trimmed with snippet_type_name=snippet_type_name %}You haven't created any {{ snippet_type_name }} snippets. Why not <a href="{{ wagtailsnippets_create_snippet_url }}" target="_blank" rel="noreferrer">create one now</a>?{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,5 @@
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
<button type="submit" class="button action-save {% if is_revision %}warning{% endif %}" disabled>
|
||||
{% if icon_name %}{% icon name=icon_name %}{% endif %}
|
||||
{% trans 'Locked' %}
|
||||
</button>
|
||||
@@ -0,0 +1,11 @@
|
||||
{% load wagtailadmin_tags %}
|
||||
|
||||
{% if show_menu %}
|
||||
{% dropdown_button button=default_menu_item toggle_icon="arrow-up" keep_mounted=True %}
|
||||
{% for item in rendered_menu_items %}
|
||||
{{ item }}
|
||||
{% endfor %}
|
||||
{% enddropdown_button %}
|
||||
{% elif default_menu_item %}
|
||||
{{ default_menu_item }}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% load wagtailadmin_tags %}
|
||||
{% if url %}
|
||||
<a class="button{% if classname %} {{ classname }}{% endif %}{% if is_revision %} warning{% endif %}" href="{{ url }}">{% if icon_name %}{% icon name=icon_name %}{% endif %}{{ label }}</a>
|
||||
{% else %}
|
||||
<button type="submit" name="{{ name }}" value="{{ label }}" class="button{% if classname %} {{ classname }}{% endif %}{% if is_revision %} warning{% endif %}">{% if icon_name %}{% icon name=icon_name %}{% endif %}{{ label }}</button>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,16 @@
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
<button
|
||||
type="submit"
|
||||
name="{{ name }}"
|
||||
value="{{ name }}"
|
||||
class="button action-save button-longrunning{% if is_revision %} warning{% endif %}"
|
||||
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 'Publishing…' %}"
|
||||
>
|
||||
{% icon name=icon_name classname="button-longrunning__icon" %}
|
||||
{% icon name="spinner" %}
|
||||
<em data-w-progress-target="label">{% if is_revision %}{% trans 'Publish this version' %}{% else %}{% trans 'Publish' %}{% endif %}</em>
|
||||
</button>
|
||||
@@ -0,0 +1,30 @@
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
<button
|
||||
type="submit"
|
||||
class="button action-save button-longrunning{% if is_revision %} warning{% endif %}"
|
||||
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…' %}"
|
||||
>
|
||||
{% if draftstate_enabled %}
|
||||
{% icon name="draft" classname="button-longrunning__icon" %}
|
||||
{% else %}
|
||||
{% icon name=icon_name classname="button-longrunning__icon" %}
|
||||
{% endif %}
|
||||
{% icon name="spinner" %}
|
||||
<em data-w-progress-target="label">
|
||||
{% if is_revision %}
|
||||
{% if draftstate_enabled %}
|
||||
{% trans 'Replace current draft' %}
|
||||
{% else %}
|
||||
{% trans 'Replace current revision' %}
|
||||
{% endif %}
|
||||
{% elif draftstate_enabled %}
|
||||
{% trans 'Save draft' %}
|
||||
{% else %}
|
||||
{% trans 'Save' %}
|
||||
{% endif %}
|
||||
</em>
|
||||
</button>
|
||||
@@ -0,0 +1,4 @@
|
||||
{% load wagtailadmin_tags %}
|
||||
<button class="button" data-workflow-action-name="{{ name }}" {% if launch_modal %}data-workflow-action-modal-url="{{ url }}"{% endif %}>
|
||||
{% if icon_name %}{% icon name=icon_name %}{% endif %}{{ label }}
|
||||
</button>
|
||||
32
env/lib/python3.10/site-packages/wagtail/snippets/templates/wagtailsnippets/snippets/create.html
vendored
Normal file
32
env/lib/python3.10/site-packages/wagtail/snippets/templates/wagtailsnippets/snippets/create.html
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
{% extends "wagtailadmin/generic/create.html" %}
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
{% block slim_header %}
|
||||
{% comment %}
|
||||
We can't use the `only` keyword yet, because the SnippetStatusSidePanel still rely on some
|
||||
context variables from the view. As a result, we can't reuse the include from the generic
|
||||
template and have to copy it here without the `only` keyword.
|
||||
{% endcomment %}
|
||||
{% include 'wagtailadmin/shared/headers/slim_header.html' with breadcrumbs_items=breadcrumbs_items side_panels=side_panels history_url=history_url buttons=header_buttons %}
|
||||
{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
<footer class="footer">
|
||||
<nav class="actions actions--primary footer__container" aria-label="{% trans 'Actions' %}">
|
||||
{{ action_menu.render_html }}
|
||||
</nav>
|
||||
</footer>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{{ block.super }}
|
||||
|
||||
<script>
|
||||
// Set wagtailConfig.ACTIVE_CONTENT_LOCALE if this is a translated page
|
||||
// This value may be used by JS widgets on the form
|
||||
{% if locale %}
|
||||
window.wagtailConfig = window.wagtailConfig || {};
|
||||
window.wagtailConfig.ACTIVE_CONTENT_LOCALE = '{{ locale.language_code|escapejs }}';
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1 @@
|
||||
{% extends "wagtailadmin/generic/confirm_delete.html" %}
|
||||
37
env/lib/python3.10/site-packages/wagtail/snippets/templates/wagtailsnippets/snippets/edit.html
vendored
Normal file
37
env/lib/python3.10/site-packages/wagtail/snippets/templates/wagtailsnippets/snippets/edit.html
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends "wagtailadmin/generic/edit.html" %}
|
||||
{% load wagtailadmin_tags i18n %}
|
||||
{% block bodyclass %}{{ block.super }} {% if locked_for_user %}content-locked{% endif %}{% endblock %}
|
||||
|
||||
{% block slim_header %}
|
||||
{% comment %}
|
||||
We can't use the `only` keyword yet, because the SnippetStatusSidePanel still rely on some
|
||||
context variables from the view. As a result, we can't reuse the include from the generic
|
||||
template and have to copy it here without the `only` keyword.
|
||||
{% endcomment %}
|
||||
{% include 'wagtailadmin/shared/headers/slim_header.html' with breadcrumbs_items=breadcrumbs_items side_panels=side_panels history_url=history_url buttons=header_buttons %}
|
||||
{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
<footer class="footer">
|
||||
<nav class="actions actions--primary footer__container" aria-label="{% trans 'Actions' %}">
|
||||
{{ action_menu.render_html }}
|
||||
</nav>
|
||||
</footer>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{{ block.super }}
|
||||
|
||||
<script>
|
||||
// Set wagtailConfig.ACTIVE_CONTENT_LOCALE if this is a translated page
|
||||
// This value may be used by JS widgets on the form
|
||||
{% if locale %}
|
||||
window.wagtailConfig = window.wagtailConfig || {};
|
||||
window.wagtailConfig.ACTIVE_CONTENT_LOCALE = '{{ locale.language_code|escapejs }}';
|
||||
{% endif %}
|
||||
</script>
|
||||
|
||||
{% if workflow_enabled %}
|
||||
{% include "wagtailadmin/shared/_workflow_init.html" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1 @@
|
||||
{% extends 'wagtailadmin/generic/listing.html' %}
|
||||
15
env/lib/python3.10/site-packages/wagtail/snippets/templates/wagtailsnippets/snippets/index.html
vendored
Normal file
15
env/lib/python3.10/site-packages/wagtail/snippets/templates/wagtailsnippets/snippets/index.html
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends "wagtailadmin/generic/index.html" %}
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script>
|
||||
window.wagtailConfig.BULK_ACTION_ITEM_TYPE = 'SNIPPET';
|
||||
</script>
|
||||
<script defer src="{% versioned_static 'wagtailadmin/js/bulk-actions.js' %}"></script>
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block bulk_actions %}
|
||||
{% trans "Select all snippets in listing" as select_all_text %}
|
||||
{% include 'wagtailadmin/bulk_actions/footer.html' with select_all_obj_text=select_all_text app_label=model_opts.app_label model_name=model_opts.model_name objects=page_obj %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1 @@
|
||||
{% extends "wagtailadmin/generic/index_results.html" %}
|
||||
@@ -0,0 +1,2 @@
|
||||
{% load wagtailadmin_tags %}
|
||||
{% component table %}
|
||||
@@ -0,0 +1 @@
|
||||
{% extends "wagtailadmin/generic/listing.html" %}
|
||||
Reference in New Issue
Block a user