mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
[feat] Add resuable templates that can be extended to create confirmation templates
This commit is contained in:
parent
d5481b0df5
commit
de9d87056a
@ -0,0 +1,11 @@
|
||||
{% extends "wagtailadmin/base.html" %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
{% block header %}{% endblock header %}
|
||||
|
||||
<div class="nice-padding">
|
||||
{% block objects_with_access %}{% endblock %}
|
||||
{% block objects_with_no_access %}{% endblock %}
|
||||
{% block form_section %}{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
@ -0,0 +1,10 @@
|
||||
{% if objects %}
|
||||
<p>{{ no_access_msg }}</p>
|
||||
<ul>
|
||||
{% for object in objects %}
|
||||
<li>
|
||||
{% block per_object %}{% endblock per_object %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
@ -0,0 +1,10 @@
|
||||
{% extends 'wagtailadmin/bulk_actions/confirmation/list_objects_with_no_access.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block per_object %}
|
||||
{% if object.can_edit %}
|
||||
<a href="{% url 'wagtailadmin_pages:edit' object.page.id %}" target="_blank" rel="noopener noreferrer">{{ object.page.title }}</a>
|
||||
{% else %}
|
||||
{{ object.page.title }}
|
||||
{% endif %}
|
||||
{% endblock per_object %}
|
Loading…
Reference in New Issue
Block a user