kopia lustrzana https://github.com/wagtail/wagtail
Merge 2aa64753bd
into 7c6187f06c
commit
4c6e34ba03
|
@ -223,6 +223,10 @@ ul.listing {
|
|||
|
||||
.title {
|
||||
word-break: break-word;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: theme('spacing.2');
|
||||
|
||||
.title-wrapper,
|
||||
h2 {
|
||||
|
@ -231,6 +235,7 @@ ul.listing {
|
|||
gap: theme('spacing.2');
|
||||
margin: 0;
|
||||
vertical-align: middle;
|
||||
align-items: center;
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
|
@ -242,11 +247,6 @@ ul.listing {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icon-folder {
|
||||
margin: 3px 0.3em 0 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
|
||||
.actions {
|
||||
|
@ -265,36 +265,6 @@ ul.listing {
|
|||
}
|
||||
}
|
||||
|
||||
&--inline-actions td.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-end: 2.5em;
|
||||
}
|
||||
|
||||
.w-status {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&--inline-actions .actions {
|
||||
display: inline-block;
|
||||
margin-top: 0;
|
||||
vertical-align: inherit;
|
||||
|
||||
li {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.button {
|
||||
vertical-align: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.moderate-actions form {
|
||||
float: inline-start;
|
||||
margin: 0 1em 1em 0;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
border-radius: 2px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
flex-shrink: 0;
|
||||
// stylelint-disable-next-line property-disallowed-list
|
||||
text-transform: uppercase;
|
||||
padding: 0 0.5em;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="title-wrapper">
|
||||
{% if page.is_site_root %}
|
||||
{% if perms.wagtailcore.add_site or perms.wagtailcore.change_site or perms.wagtailcore.delete_site %}
|
||||
<a href="{% url 'wagtailsites:index' %}" title="{% trans 'Sites menu' %}">{% icon name="site" classname="initial" %}</a>
|
||||
<a href="{% url 'wagtailsites:index' %}" title="{% trans 'Sites menu' %}" class="w-flex w-items-center">{% icon name="site" classname="initial" %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
without also reading out the buttons and indicators.
|
||||
{% endcomment %}
|
||||
{% fragment as page_title %}
|
||||
<span id="page_{{ page.pk|unlocalize|admin_urlquote }}_title">
|
||||
<span id="page_{{ page.pk|unlocalize|admin_urlquote }}_title" class="w-flex w-items-center w-gap-2">
|
||||
{% if not page.is_site_root and not page.is_leaf %}{% icon name="folder" classname="initial" %}{% endif %}
|
||||
{{ page.get_admin_display_title }}
|
||||
</span>
|
||||
|
|
|
@ -133,13 +133,15 @@ class TestPageExplorer(WagtailTestUtils, TestCase):
|
|||
def test_explore_root_shows_icon(self):
|
||||
response = self.client.get(reverse("wagtailadmin_explore_root"))
|
||||
self.assertEqual(response.status_code, 200)
|
||||
soup = self.get_soup(response.content)
|
||||
|
||||
# Administrator (or user with add_site permission) should see the
|
||||
# sites link with its icon
|
||||
self.assertContains(
|
||||
response,
|
||||
'<a href="/admin/sites/" title="Sites menu"><svg',
|
||||
)
|
||||
url = reverse("wagtailsites:index")
|
||||
link = soup.select_one(f'td a[href="{url}"]')
|
||||
self.assertIsNotNone(link)
|
||||
icon = link.select_one("svg use[href='#icon-site']")
|
||||
self.assertIsNotNone(icon)
|
||||
|
||||
def test_ordering(self):
|
||||
response = self.client.get(
|
||||
|
|
|
@ -518,7 +518,3 @@ class Table(Component):
|
|||
@cached_property
|
||||
def attrs(self):
|
||||
return self.table.get_row_attrs(self.instance)
|
||||
|
||||
|
||||
class InlineActionsTable(Table):
|
||||
classname = "listing listing--inline-actions"
|
||||
|
|
|
@ -16,7 +16,7 @@ from wagtail.admin.filters import (
|
|||
MultipleUserFilter,
|
||||
WagtailFilterSet,
|
||||
)
|
||||
from wagtail.admin.ui.tables import Column, DateColumn, InlineActionsTable, UserColumn
|
||||
from wagtail.admin.ui.tables import Column, DateColumn, UserColumn
|
||||
from wagtail.admin.utils import get_latest_str
|
||||
from wagtail.admin.views.generic.base import (
|
||||
BaseListingView,
|
||||
|
@ -197,7 +197,6 @@ class HistoryView(PermissionCheckedMixin, BaseObjectMixin, BaseListingView):
|
|||
is_searchable = False
|
||||
paginate_by = 20
|
||||
filterset_class = HistoryFilterSet
|
||||
table_class = InlineActionsTable
|
||||
history_url_name = None
|
||||
history_results_url_name = None
|
||||
edit_url_name = None
|
||||
|
|
Ładowanie…
Reference in New Issue