Remove all menu-{section_name} classnames on the <body> element and menu item <li>s.

These were introduced in 9d7d016b7c to support menu item highlighting, but this mechanism was superseded by #1186. There's no sign of any code still using these classnames, and any code that relies on them would be liable to fail on non-English-language sites anyhow (since the menu item name is derived from the label by default, and the label is a translatable string).
pull/1565/head
Matt Westcott 2015-07-30 23:19:12 +01:00
rodzic 1005e2885f
commit a679d4f7f5
46 zmienionych plików z 6 dodań i 47 usunięć

Wyświetl plik

@ -156,7 +156,7 @@ The available hooks are:
Add an item to the Wagtail admin menu. The callable passed to this hook must return an instance of ``wagtail.wagtailadmin.menu.MenuItem``. New items can be constructed from the ``MenuItem`` class by passing in a ``label`` which will be the text in the menu item, and the URL of the admin page you want the menu item to link to (usually by calling ``reverse()`` on the admin view you've set up). Additionally, the following keyword arguments are accepted:
:name: an internal name used to identify the menu item; defaults to the slugified form of the label. Also applied as a CSS class to the wrapping ``<li>``, as ``"menu-{name}"``.
:name: an internal name used to identify the menu item; defaults to the slugified form of the label.
:classnames: additional classnames applied to the link, used to give it an icon
:attrs: additional HTML attributes to apply to the link
:order: an integer which determines the item's position in the menu

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% trans "Search Terms" %}{% endblock %}
{% block bodyclass %}menu-editorspicks{% endblock %}
{% block extra_js %}
<script>

Wyświetl plik

@ -2,7 +2,6 @@
{% load i18n %}
{% load wagtailadmin_tags %}
{% block bodyclass %}menu-explorer{% endblock %}
{% block titletag %}{% blocktrans with title=parent_page.title %}Create a page in {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans with title=page.title %}Delete {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-explorer{% endblock %}
{% block content %}
{% trans "Delete" as del_str %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans with title=page.title %}Move {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-explorer{% endblock %}
{% block content %}
{% trans "Move" as move_str %}
{% include "wagtailadmin/shared/header.html" with title=move_str subtitle=page_to_move.title icon="doc-empty-inverse" %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans with title=page.title%}Unpublish {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-explorer{% endblock %}
{% block content %}
{% trans "Unpublish" as unpublish_str %}
{% include "wagtailadmin/shared/header.html" with title=unpublish_str subtitle=page.title icon="doc-empty-inverse" %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% endblock %}
{% block bodyclass %}menu-explorer{% endblock %}
{% block content %}
{% trans "Pages using" as pages_str %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans with title=page.title %}Copy {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-explorer{% endblock %}
{% block content %}
{% trans "Copy" as copy_str %}
{% include "wagtailadmin/shared/header.html" with title=copy_str subtitle=page.title icon="doc-empty-inverse" %}

Wyświetl plik

@ -3,7 +3,7 @@
{% load i18n %}
{% block titletag %}{% blocktrans with page_type=content_type.model_class.get_verbose_name %}New {{ page_type }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-explorer page-editor create model-{{ content_type.model }}{% endblock %}
{% block bodyclass %}page-editor create model-{{ content_type.model }}{% endblock %}
{% block content %}

Wyświetl plik

@ -3,7 +3,7 @@
{% load gravatar %}
{% load i18n %}
{% block titletag %}{% blocktrans with title=page.title page_type=content_type.model_class.get_verbose_name %}Editing {{ page_type }}: {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-explorer page-editor model-{{ content_type.model }}{% endblock %}
{% block bodyclass %}page-editor model-{{ content_type.model }}{% endblock %}
{% block content %}
{% page_permissions page as page_perms %}

Wyświetl plik

@ -1,7 +1,7 @@
{% extends "wagtailadmin/base.html" %}
{% load wagtailadmin_tags static compress i18n %}
{% block titletag %}{% blocktrans with title=parent_page.title %}Exploring {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-explorer page-explorer {% if ordering == 'ord' %}reordering{% endif %}{% endblock %}
{% block bodyclass %}page-explorer {% if ordering == 'ord' %}reordering{% endif %}{% endblock %}
{% block content %}
<header class="merged no-border nice-padding no-v-padding">

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans with title=page_to_move.title %}Select a new parent page for {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-explorer{% endblock %}
{% block content %}
<header class="nice-padding">
<h1 class="icon icon-doc-empty-inverse">{% blocktrans with title=page_to_move.title %}Select a new parent page for <span>{{ title }}</span>{% endblocktrans %}</h1>

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% trans 'Search' %}{% endblock %}
{% block bodyclass %}menu-search{% endblock %}
{% block extra_js %}
<script>
window.headerSearch = {

Wyświetl plik

@ -1,3 +1,3 @@
<li class="menu-item menu-{{ name }}{% if active %} menu-active{% endif %}">
<li class="menu-item{% if active %} menu-active{% endif %}">
<a href="{{ url }}" class="{{ classnames }}"{{ attr_string }}>{{ label }}</a>
</li>

Wyświetl plik

@ -1,4 +1,4 @@
<li class="menu-item menu-{{ name }}{% if active %} menu-active{% endif %}">
<li class="menu-item{% if active %} menu-active{% endif %}">
<a href="#" class="submenu-trigger {{ classnames }}"{{ attr_string }}>{{ label }}</a>
<div class="nav-submenu">
<h2 class="{{ classnames }}">{{ label }}</h2>

Wyświetl plik

@ -2,7 +2,6 @@
{% load i18n %}
{% load wagtailimages_tags %}
{% block titletag %}{% trans "Add a document" %}{% endblock %}
{% block bodyclass %}menu-documents{% endblock %}
{% block extra_css %}
{% include "wagtailadmin/shared/tag_field_css.html" %}
{% endblock %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans with title=document.title %}Delete {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-documents{% endblock %}
{% block content %}
{% trans "Delete document" as del_str %}
{% include "wagtailadmin/shared/header.html" with title=del_str subtitle=document.title icon="doc-full-inverse" %}

Wyświetl plik

@ -2,7 +2,6 @@
{% load i18n %}
{% load wagtailimages_tags %}
{% block titletag %}{% blocktrans with title=document.title %}Editing {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-documents{% endblock %}
{% block extra_css %}
{% include "wagtailadmin/shared/tag_field_css.html" %}
{% endblock %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}Documents{% endblock %}
{% block bodyclass %}menu-documents{% endblock %}
{% block extra_js %}
<script>
window.headerSearch = {

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% trans "Forms" %}{% endblock %}
{% block bodyclass %}menu-forms{% endblock %}
{% block content %}
{% trans "Forms" as forms_str %}
{% trans "Pages" as select_form_str %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans with form_title=form_page.title|capfirst %}Submissions of {{ form_title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-forms{% endblock %}
{% block extra_js %}
{% include "wagtailadmin/shared/datetimepicker_translations.html" %}

Wyświetl plik

@ -2,7 +2,6 @@
{% load wagtailimages_tags %}
{% load i18n %}
{% block titletag %}{% trans "Add an image" %}{% endblock %}
{% block bodyclass %}menu-images{% endblock %}
{% block extra_css %}
{% include "wagtailadmin/shared/tag_field_css.html" %}
{% endblock %}

Wyświetl plik

@ -2,7 +2,6 @@
{% load wagtailimages_tags %}
{% load i18n %}
{% block titletag %}{% trans "Delete image" %}{% endblock %}
{% block bodyclass %}menu-images{% endblock %}
{% block content %}
{% trans "Delete image" as del_str %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load wagtailimages_tags compress static i18n %}
{% block titletag %}{% blocktrans with title=image.title %}Editing image {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-images{% endblock %}
{% block extra_css %}
{% include "wagtailadmin/shared/tag_field_css.html" %}

Wyświetl plik

@ -3,7 +3,6 @@
{% load i18n %}
{% block titletag %}{% trans "Images" %}{% endblock %}
{% block bodyclass %}menu-images{% endblock %}
{% block extra_js %}
<script>
window.headerSearch = {

Wyświetl plik

@ -3,8 +3,6 @@
{% block titletag %}{% blocktrans with title=image.title %}Editing image {{ title }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-images{% endblock %}
{% block content %}
{% trans "Generating URL" as title_str %}
{% include "wagtailadmin/shared/header.html" with title=title_str subtitle=image.title icon="image" %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load wagtailimages_tags i18n compress static %}
{% block titletag %}{% trans "Add multiple images" %}{% endblock %}
{% block bodyclass %}menu-images{% endblock %}
{% block extra_css %}
{% compress css %}
<link rel="stylesheet" href="{% static 'wagtailimages/css/add-multiple.css' %}" type="text/css" />

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% trans "Add redirect" %}{% endblock %}
{% block bodyclass %}menu-redirects{% endblock %}
{% block content %}
{% trans "Add redirect" as add_red_str %}
{% include "wagtailadmin/shared/header.html" with title=add_red_str icon="redirect" %}

Wyświetl plik

@ -1,6 +1,5 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block bodyclass %}menu-redirects{% endblock %}
{% block titletag %}{% blocktrans with title=redirect.title %}Delete redirect {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
{% trans "Delete" as delete_str %}

Wyświetl plik

@ -1,6 +1,5 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block bodyclass %}menu-redirects{% endblock %}
{% block titletag %}{% blocktrans with title=redirect.title %}Editing {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
{% trans "Editing" as editing_str %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% trans "Redirects" %}{% endblock %}
{% block bodyclass %}menu-redirects{% endblock %}
{% block extra_js %}
<script>

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% trans "Delete site" %}{% endblock %}
{% block bodyclass %}menu-site{% endblock %}
{% block content %}
{% trans "Delete site" as del_str %}

Wyświetl plik

@ -2,7 +2,6 @@
{% load i18n %}
{% block titletag %}{% trans "Add site" %} {{ site.hostname }}{% endblock %}
{% block bodyclass %}menu-sites{% endblock %}
{% block content %}

Wyświetl plik

@ -2,7 +2,6 @@
{% load i18n %}
{% block titletag %}{% trans "Editing" %} {{ site.hostname }}{% endblock %}
{% block bodyclass %}menu-sites{% endblock %}
{% block content %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans %}Delete {{ snippet_type_name}} - {{ instance }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-snippets{% endblock %}
{% block content %}
{% trans "Delete" as delete_str %}
{% include "wagtailadmin/shared/header.html" with title=delete_str subtitle=instance icon="snippet" %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans %}New {{ snippet_type_name}}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-snippets{% endblock %}
{% block content %}
{% trans "New" as new_str %}
{% include "wagtailadmin/shared/header.html" with title=new_str subtitle=snippet_type_name icon="snippet" %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans %}Editing {{ snippet_type_name}} - {{ instance }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-snippets{% endblock %}
{% block content %}
{% trans "Editing" as editing_str %}
{% include "wagtailadmin/shared/header.html" with title=editing_str subtitle=instance icon="snippet" usage_object=instance %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% trans "Snippets" %}{% endblock %}
{% block bodyclass %}menu-snippets{% endblock %}
{% block content %}
{% include "wagtailadmin/shared/header.html" with title="Snippets" icon="snippet" %}

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans with snippet_type_name_plural=snippet_type_name_plural|capfirst %}Snippets {{ snippet_type_name_plural }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-snippets{% endblock %}
{% block content %}
<header class="nice-padding">

Wyświetl plik

@ -1,7 +1,6 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% trans "Delete group" %}{% endblock %}
{% block bodyclass %}menu-groups{% endblock %}
{% block content %}
{% trans "Delete group" as del_str %}

Wyświetl plik

@ -2,7 +2,6 @@
{% load wagtailusers_tags wagtailimages_tags static compress i18n %}
{% block titletag %}{% trans "Add group" %}{% endblock %}
{% block bodyclass %}menu-groups{% endblock %}
{% block extra_css %}
{% compress css %}

Wyświetl plik

@ -2,7 +2,6 @@
{% load wagtailusers_tags wagtailimages_tags static compress i18n %}
{% block titletag %}{% trans "Editing" %} {{ group.name }}{% endblock %}
{% block bodyclass %}menu-groups{% endblock %}
{% block extra_css %}
{% compress css %}

Wyświetl plik

@ -2,7 +2,6 @@
{% load i18n %}
{% load gravatar %}
{% block titletag %}{% trans "groups" %}{% endblock %}
{% block bodyclass %}menu-groups{% endblock %}
{% block extra_js %}
<script>
window.headerSearch = {

Wyświetl plik

@ -2,7 +2,6 @@
{% load wagtailimages_tags %}
{% load i18n %}
{% block titletag %}{% trans "Add user" %}{% endblock %}
{% block bodyclass %}menu-users{% endblock %}
{% block content %}
{% trans "Add user" as add_user_str %}

Wyświetl plik

@ -2,7 +2,6 @@
{% load wagtailimages_tags %}
{% load i18n %}
{% block titletag %}{% trans "Editing" %} {{ user.get_username}}{% endblock %}
{% block bodyclass %}menu-users{% endblock %}
{% block content %}
{% trans "Editing" as editing_str %}

Wyświetl plik

@ -2,7 +2,6 @@
{% load i18n %}
{% load gravatar %}
{% block titletag %}{% trans "Users" %}{% endblock %}
{% block bodyclass %}menu-users{% endblock %}
{% block extra_js %}
<script>
window.headerSearch = {