Adopted shared header for redirects listing view (#8849)

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
pull/8854/head
Paarth Agarwal 2022-07-16 03:05:11 +05:30 zatwierdzone przez GitHub
rodzic 8daf1554ae
commit d4b37357ab
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 16 dodań i 39 usunięć

Wyświetl plik

@ -56,6 +56,7 @@ Changelog
* Introduce new template fragment and block level enclosure tags for easier template composition (Thibaud Colas)
* Add a `classnames` template tag to easily build up classes from variables provided to a template (Paarth Agarwal)
* Migrate the dashboard (home) view header to the shared header template and update designs (Paarth Agarwal)
* Switch all report views and the redirects listing view to use Wagtails reusable header component (Paarth Agarwal)
* Update classes and styles for the shared header templates to align with UI guidelines (Paarth Agarwal)
* Clean up multiple eslint rules usage and configs to align better with the Wagtail coding guidelines (LB (Ben Johnston))
* Add inline toolbar for Draftail, to avoid clashing with the pages header (Thibaud Colas)
@ -67,7 +68,6 @@ Changelog
* Change rich text editor placeholder to follow the users focus on empty blocks (Thibaud Colas)
* Add rich text editor empty block highlight by showing their block type (Thibaud Colas)
* Make ModelAdmin InspectView footer actions consistent with other parts of the UI (Thibaud Colas)
* Switch all report views to use Wagtails reusable header component (Paarth Agarwal)
* Introduce a new auto-updating preview panel inside the page editor (Sage Abdullah)
* Add support for Twitter and other text-only embeds in Draftail embed previews (Iman Syed, Paarth Agarwal)
* Fix: Typo in `ResumeWorkflowActionFormatter` message (Stefan Hammer)

Wyświetl plik

@ -4,14 +4,14 @@
white-space: nowrap;
}
.redirects header .has-multiple-actions {
.redirects header .right {
display: flex;
}
.redirects header .has-multiple-actions .actionbutton {
.redirects header .right .actionbutton {
margin-inline-start: 10px;
}
.redirects header .has-multiple-actions .dropdown {
.redirects header .right .dropdown {
margin-inline-start: 10px;
}

Wyświetl plik

@ -83,7 +83,7 @@ Wagtails page preview is now available in a side panel within the page editor
* Update classes and styles for the shared header templates to align with UI guidelines (Paarth Agarwal)
* Clean up multiple eslint rules usage and configs to align better with the Wagtail coding guidelines (LB (Ben Johnston))
* Make ModelAdmin InspectView footer actions consistent with other parts of the UI (Thibaud Colas)
* Switch all report views to use Wagtails reusable header component (Paarth Agarwal)
* Switch all report views and the redirects listing view to use Wagtails reusable header component (Paarth Agarwal)
* Add support for Twitter and other text-only embeds in Draftail embed previews (Iman Syed, Paarth Agarwal)
### Bug fixes

Wyświetl plik

@ -26,41 +26,18 @@
{% url "wagtailredirects:report" as report_link %}
{% trans "Import redirects" as import_str %}
{% trans "Export redirects" as export_str %}
<header class="w-header w-header--hasform">
{% block breadcrumb %}{% endblock %}
<div class="row">
<div class="left">
<div class="col">
<h1 class="w-header__title">
{% icon class_name="w-header__glyph" name="redirect" %}
{{ redirects_str }}
</h1>
</div>
<form class="col search-form" action="{% url "wagtailredirects:index" %}{% if query_parameters %}?{{ query_parameters }}{% endif %}" method="get" novalidate role="search">
<ul class="fields">
{% for field in search_form %}
{% include "wagtailadmin/shared/field_as_li.html" with field=field field_classes="field-small iconfield" icon="search" %}
{% endfor %}
<li class="submit visuallyhidden"><input type="submit" value="Search" class="button" /></li>
</ul>
</form>
</div>
<div class="right has-multiple-actions">
<div class="actionbutton">
<a href="{{ add_link }}" class="button bicolor button--icon">{% icon name="plus" wrapped=1 %}{{ add_str }}</a>
</div>
<div class="dropdown dropdown-button match-width">
<a href="{{ import_link }}" class="button bicolor button--icon">{% icon name="doc-full-inverse" wrapped=1 %}{{ import_str }}</a>
<div class="dropdown-toggle">{% icon name="arrow-down" %}</div>
<ul>
<li><a class="button bicolor button--icon" href="{{ report_link }}">{% icon name="download" wrapped=1 %}{{ export_str }}</a></li>
</ul>
</div>
</div>
{% fragment as redirect_actions %}
<div class="dropdown dropdown-button match-width">
<a href="{{ import_link }}" class="button bicolor button--icon">{% icon name="doc-full-inverse" wrapped=1 %}{{ import_str }}</a>
<div class="dropdown-toggle">{% icon name="arrow-down" %}</div>
<ul>
<li><a class="button bicolor button--icon" href="{{ report_link }}">{% icon name="download" wrapped=1 %}{{ export_str }}</a></li>
</ul>
</div>
</header>
{% endfragment %}
{% include "wagtailadmin/shared/header.html" with title=redirects_str icon="redirect" search_url="wagtailredirects:index" query_parameters=query_parameters action_url=add_link action_text=add_str action_icon="plus" extra_actions=redirect_actions %}
{% else %}
{% include "wagtailadmin/shared/header.html" with title=redirects_str icon="redirect" search_url="wagtailredirects:index" %}
{% endif %}