0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Override specific blocks in workflows and tasks index templates to reuse the slim header

This commit is contained in:
Sage Abdullah 2023-09-12 14:48:32 +01:00
parent b291c9b6c0
commit fc33e4a3d7
No known key found for this signature in database
GPG Key ID: EB1A33CC51CC0217
2 changed files with 7 additions and 3 deletions

View File

@ -1,7 +1,7 @@
{% extends "wagtailadmin/generic/index.html" %}
{% load i18n wagtailadmin_tags %}
{% block content %}
{% block main_header %}
{% fragment as workflow_actions %}
<a href="{% url "wagtailadmin_workflows:index" %}?show_disabled={% if showing_disabled %}false{% else %}true{% endif %}" class="button button-secondary button--icon w-inline-flex w-items-center w-gap-2">
{% if showing_disabled %}
@ -13,7 +13,9 @@
<a href="{% url view.add_url_name %}" class="button bicolor button--icon">{% icon name="plus" wrapped=1 %}{{ view.add_item_label }}</a>
{% endfragment %}
{% include "wagtailadmin/shared/header.html" with title=view.page_title icon=view.header_icon extra_actions=workflow_actions %}
{% endblock %}
{% block listing %}
<div class="nice-padding">
{% if workflows %}
<table class="listing">

View File

@ -1,7 +1,7 @@
{% extends "wagtailadmin/generic/index.html" %}
{% load i18n wagtailadmin_tags %}
{% block content %}
{% block main_header %}
{% fragment as workflow_actions %}
<a href="{% url "wagtailadmin_workflows:task_index" %}?show_disabled={% if showing_disabled %}false{% else %}true{% endif %}" class="button button-secondary button--icon w-inline-flex w-items-center w-gap-2">
{% if showing_disabled %}
@ -12,8 +12,10 @@
</a>
<a href="{% url view.add_url_name %}" class="button bicolor button--icon">{% icon name="plus" wrapped=1 %}{{ view.add_item_label }}</a>
{% endfragment %}
{% include "wagtailadmin/shared/header.html" with title=view.page_title icon=view.header_icon extra_actions=workflow_actions %}
{% include "wagtailadmin/shared/header.html" with title=page_title icon=header_icon extra_actions=workflow_actions %}
{% endblock %}
{% block listing %}
<div class="nice-padding">
{% if tasks %}
{% component table %}