-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from cfpb/fix-breadcrumbs-211
Fix breadcrumbs in Wagtail 2.11, drop support for Wagtail < 2.11
- Loading branch information
Showing
7 changed files
with
17 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
{% load wagtailflags_admin %} | ||
{% load wagtailadmin_tags wagtailflags_admin %} | ||
|
||
{% if flag %} | ||
<ul class="breadcrumb flags-breadcrumb"> | ||
<li><a href="{% url 'wagtailflags:list' %}">Flags</a></li> | ||
<li>{{ title }}</li> | ||
<li><a href="{% url 'wagtailflags:list' %}"><span class="title">Flags</span>{% icon name="arrow-right" class_name="arrow_right_icon" %}</a></li> | ||
<li><a href="#"><span class="title">{{ title }}</span></a></li> | ||
</ul> | ||
|
||
{% if flag|deletable %} | ||
{% if wagtail_header_action %} | ||
{% url 'wagtailflags:delete_flag' flag.name as delete_link %} | ||
{# Wagtail 2.10 adds "action_*", which we need to enable the "Delete flag" button in the header. #} | ||
{% include "wagtailadmin/shared/header.html" with title=title action_icon="bin" action_text='Delete flag' action_url=delete_link %} | ||
{% endif %} | ||
{% url 'wagtailflags:delete_flag' flag.name as delete_link %} | ||
{% include "wagtailadmin/shared/header.html" with title=title action_icon="bin" action_text='Delete flag' action_url=delete_link %} | ||
{% else %} | ||
{% include "wagtailadmin/shared/header.html" with title=title icon=icon %} | ||
{% endif %} | ||
{% elif wagtail_header_action %} | ||
{# Wagtail 2.10 changes "add_*" in the shared admin header to "action_*" #} | ||
{% else %} | ||
{% url 'wagtailflags:create_flag' as add_link %} | ||
{% include "wagtailadmin/shared/header.html" with title=title action_icon=icon action_text='Add flag' action_url=add_link %} | ||
{% else %} | ||
{% include "wagtailadmin/shared/header.html" with title=title icon=icon add_text='Add flag' add_link='wagtailflags:create_flag' %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters