kopia lustrzana https://github.com/wagtail/wagtail
Further tidy up following code review
Co-Authored-By: Thibaud Colas <thibaudcolas@gmail.com>pull/7618/head
rodzic
b74c942c2f
commit
247bfe883f
|
@ -6,7 +6,6 @@
|
|||
}
|
||||
|
||||
.c-dropdown__button {
|
||||
border: 0;
|
||||
padding-left: 0.3rem;
|
||||
}
|
||||
|
||||
|
@ -87,7 +86,6 @@
|
|||
max-width: 160px;
|
||||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1411,7 +1411,7 @@ Hooks for registering and customising bulk actions. See :ref:`here <custom_bulk_
|
|||
from wagtail.core import hooks
|
||||
|
||||
|
||||
@hooks.register('register_bulk_action')
|
||||
@hooks.register("register_bulk_action")
|
||||
class CustomBulkAction(BulkAction):
|
||||
display_name = _("Custom Action")
|
||||
action_type = "action"
|
||||
|
@ -1440,7 +1440,7 @@ Hooks for registering and customising bulk actions. See :ref:`here <custom_bulk_
|
|||
|
||||
from wagtail.core import hooks
|
||||
|
||||
@hooks.register('before_bulk_action)
|
||||
@hooks.register("before_bulk_action")
|
||||
def hook_func(request, action_type, objects, action_class_instance):
|
||||
...
|
||||
|
||||
|
@ -1458,7 +1458,7 @@ Hooks for registering and customising bulk actions. See :ref:`here <custom_bulk_
|
|||
|
||||
from wagtail.core import hooks
|
||||
|
||||
@hooks.register('after_bulk_action)
|
||||
@hooks.register("after_bulk_action")
|
||||
def hook_func(request, action_type, objects, action_class_instance):
|
||||
...
|
||||
|
||||
|
|
|
@ -17,4 +17,4 @@
|
|||
{% block extra_css %}
|
||||
{{ block.super }}
|
||||
{{ form.media.css }}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% load i18n wagtailadmin_tags %}
|
||||
<th class="bulk-actions-filter-checkbox" data-bulk-action-parent-id="{{ parent.id }}">
|
||||
<th class="bulk-actions-filter-checkbox" data-bulk-action-parent-id="{{ parent.id }}" aria-label="{% trans 'Select row' %}">
|
||||
<div>
|
||||
{% trans "Select all" as aria_label %}
|
||||
<input data-bulk-action-select-all-checkbox type="checkbox" aria-label="{{aria_label}}" />
|
||||
|
|
|
@ -18,7 +18,7 @@ ordering: the current sort parameter
|
|||
|
||||
<tr class="table-headers">
|
||||
{% if show_ordering_column %}
|
||||
<th class="ord{% if orderable and ordering == 'ord' %} ord--active{% endif %}">
|
||||
<th class="ord{% if orderable and ordering == 'ord' %} ord--active{% endif %}">
|
||||
{% if orderable %}
|
||||
{% if ordering == "ord" %}
|
||||
<a href="{% url 'wagtailadmin_explore' parent_page.id %}" title="{% trans 'Disable ordering of child pages' %}">
|
||||
|
@ -32,10 +32,11 @@ ordering: the current sort parameter
|
|||
{% endif %}
|
||||
</th>
|
||||
{% else %}
|
||||
{% include 'wagtailadmin/bulk_actions/select_all_checkbox_cell.html' with parent=parent_page show_filters=True %}
|
||||
{% include 'wagtailadmin/bulk_actions/select_all_checkbox_cell.html' with parent=parent_page show_filters=True %}
|
||||
{% endif %}
|
||||
<th class="title">
|
||||
{% trans 'Page' %}
|
||||
{% trans 'Title' as title_label %}
|
||||
{% page_table_header_label label=title_label sortable=sortable sort_field='title' parent_page_title=parent_page.title %}
|
||||
</th>
|
||||
{% if show_parent %}
|
||||
<th class="parent">
|
||||
|
@ -56,8 +57,9 @@ ordering: the current sort parameter
|
|||
{% page_table_header_label label=type_label sortable=0 parent_page_title=parent_page.title %}
|
||||
{% endif %}
|
||||
</th>
|
||||
<th class="status" colspan="2">
|
||||
<th class="status">
|
||||
{% trans 'Status' as status_label %}
|
||||
{% page_table_header_label label=status_label sortable=sortable sort_field='live' parent_page_title=parent_page.title %}
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
|
@ -103,7 +103,7 @@ def index(request, parent_page_id=None):
|
|||
'do_paginate': do_paginate,
|
||||
'locale': None,
|
||||
'translations': [],
|
||||
'show_ordering_column': 'ordering' in request.GET.dict()
|
||||
'show_ordering_column': request.GET.get('ordering') == 'ord'
|
||||
}
|
||||
|
||||
if getattr(settings, 'WAGTAIL_I18N_ENABLED', False) and not parent_page.is_root():
|
||||
|
|
|
@ -167,7 +167,7 @@ def bulk_action_filters():
|
|||
yield Button(
|
||||
_('All'),
|
||||
'?filters=',
|
||||
attrs={'title': _("All pages"), 'data': {'bulk-action-filter': _("")}},
|
||||
attrs={'title': _("All pages"), 'data': {'bulk-action-filter': ""}},
|
||||
priority=10
|
||||
)
|
||||
|
||||
|
|
|
@ -15,11 +15,14 @@
|
|||
<h2>{% trans "Latest images" %}</h2>
|
||||
{% endif %}
|
||||
|
||||
{# Used below for the checkbox aria_labelledby #}
|
||||
<p class="visuallyhidden" id="select-image-label">{% trans "Select image" %}</p>
|
||||
|
||||
<ul class="listing horiz images">
|
||||
{% for image in images %}
|
||||
<li>
|
||||
<div class="bulk-action-checkbox-container">
|
||||
{% include "wagtailadmin/bulk_actions/listing_checkbox_cell.html" with obj_type="image" obj=image aria_labelledby_prefix="image_" aria_labelledby=image.pk|unlocalize aria_labelledby_suffix="_title" %}
|
||||
{% include "wagtailadmin/bulk_actions/listing_checkbox_cell.html" with obj_type="image" obj=image aria_labelledby_prefix="select-image-label image_" aria_labelledby=image.pk|unlocalize aria_labelledby_suffix="_title" %}
|
||||
</div>
|
||||
<a class="image-choice" title="{% if collections %}{{ image.collection.name }} » {% endif %}{{ image.title }}" href="{% url 'wagtailimages:edit' image.id %}">
|
||||
<figure>
|
||||
|
|
|
@ -9,16 +9,16 @@
|
|||
{% endblock header %}
|
||||
|
||||
{% block items_with_access %}
|
||||
{% if items %}
|
||||
<p>{% trans "Are you sure you want to change the active state for these users?" %}</p>
|
||||
<ul>
|
||||
{% for user in items %}
|
||||
<li>
|
||||
<a href="{% url 'wagtailusers_users:edit' user.item.pk %}" target="_blank" rel="noopener noreferrer">{{user.item|user_display_name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if items %}
|
||||
<p>{% trans "Are you sure you want to change the active state for these users?" %}</p>
|
||||
<ul>
|
||||
{% for user in items %}
|
||||
<li>
|
||||
<a href="{% url 'wagtailusers_users:edit' user.item.pk %}" target="_blank" rel="noopener noreferrer">{{user.item|user_display_name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock items_with_access %}
|
||||
|
||||
{% block items_with_no_access %}
|
||||
|
|
Ładowanie…
Reference in New Issue