Initial commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
{% test_collection_is_public collection as is_public %}
|
||||
|
||||
{% if not collection.is_root %}
|
||||
{% url 'wagtailadmin_collections:set_privacy' collection.id as privacy_url %}
|
||||
{% dialog icon_name='view' id='set-privacy' data_url=privacy_url title=_("Change privacy") message_status='info' message_heading=_("Privacy settings determine who is able to view documents in this collection.") %}
|
||||
{% enddialog %}
|
||||
|
||||
<div class="privacy-indicator {% if is_public %}public{% else %}private{% endif %}">
|
||||
{% trans "Privacy" %}
|
||||
<button type="button" data-a11y-dialog-show="set-privacy" class="button button-small button-secondary">
|
||||
{# labels are shown/hidden in CSS according to the 'private' / 'public' class on view-permission-indicator #}
|
||||
<span class="label-public" aria-label="{% trans 'Set collection privacy. Current status: Public' %}">
|
||||
{% icon name="view" classname="default" %}
|
||||
{% trans "Public" %}
|
||||
</span>
|
||||
<span class="label-private" aria-label="{% trans 'Set collection privacy. Current status: Private' %}">
|
||||
{% icon name="no-view" classname="default" %}
|
||||
{% trans "Private" %}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,19 @@
|
||||
{% extends "wagtailadmin/generic/confirm_delete.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block main_content %}
|
||||
<p>
|
||||
{% trans 'This collection cannot be deleted, because it is not empty. It contains:' %}
|
||||
</p>
|
||||
<ul>
|
||||
{% for item_type in collection_contents %}
|
||||
<li>
|
||||
{% if item_type.url %}
|
||||
<a href="{{ item_type.url }}">{{ item_type.count_text }}</a>
|
||||
{% else %}
|
||||
{{ item_type.count_text }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
11
env/lib/python3.10/site-packages/wagtail/admin/templates/wagtailadmin/collections/edit.html
vendored
Normal file
11
env/lib/python3.10/site-packages/wagtail/admin/templates/wagtailadmin/collections/edit.html
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends "wagtailadmin/generic/edit.html" %}
|
||||
{% load wagtailadmin_tags %}
|
||||
|
||||
{% block before_form %}
|
||||
{% include "wagtailadmin/collections/_privacy_switch.html" with collection=object collection_perms=collection_perms only %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{{ block.super }}
|
||||
<script src="{% versioned_static 'wagtailadmin/js/privacy-switch.js' %}"></script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,10 @@
|
||||
{% extends "wagtailadmin/generic/index_results.html" %}
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
{% block no_results_message %}
|
||||
<p>
|
||||
{% blocktrans trimmed with add_collection_url=add_url %}
|
||||
No collections have been created. Why not <a href="{{ add_collection_url }}">add one</a>?
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user