0
0
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:
Shohan 2021-07-21 00:59:21 +05:30 committed by Matt Westcott
parent d5481b0df5
commit de9d87056a
3 changed files with 31 additions and 0 deletions

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}