Restore the valign='top' style

pull/10592/head
Matt Westcott 2023-06-22 19:05:28 +01:00 zatwierdzone przez Sage Abdullah
rodzic 7a9c9449bb
commit 6c818f1695
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: EB1A33CC51CC0217
5 zmienionych plików z 19 dodań i 2 usunięć

Wyświetl plik

@ -106,6 +106,10 @@ ul.listing {
border: 0;
}
&.align-top td {
vertical-align: top;
}
&.chooser {
tbody .parent-page {
font-size: 1.15em;

Wyświetl plik

@ -1,4 +1,4 @@
{% load l10n %}
<td id="page_{{ page.pk|unlocalize }}_title" class="title" valign="top" data-listing-page-title>
<td id="page_{{ page.pk|unlocalize }}_title" class="title" data-listing-page-title>
{% include "wagtailadmin/pages/listing/_page_title_explore.html" with page=instance %}
</td>

Wyświetl plik

@ -326,13 +326,23 @@ class Table(Component):
classname = "listing"
header_row_classname = ""
def __init__(self, columns, data, template_name=None, base_url=None, ordering=None):
def __init__(
self,
columns,
data,
template_name=None,
base_url=None,
ordering=None,
classname=None,
):
self.columns = OrderedDict([(column.name, column) for column in columns])
self.data = data
if template_name:
self.template_name = template_name
self.base_url = base_url
self.ordering = ordering
if classname is not None:
self.classname = classname
def get_context_data(self, parent_context):
context = super().get_context_data(parent_context)

Wyświetl plik

@ -123,6 +123,7 @@ class BaseListingView(WagtailAdminTemplateMixin, BaseListView):
results_template_name = "wagtailadmin/generic/listing_results.html"
results_only = False # If true, just render the results as an HTML fragment
table_class = Table
table_classname = None
columns = [Column("__str__", label=_("Title"))]
index_url_name = None
page_kwarg = "p"
@ -153,6 +154,7 @@ class BaseListingView(WagtailAdminTemplateMixin, BaseListView):
self.columns,
object_list,
ordering=self.get_ordering(),
classname=self.table_classname,
**kwargs,
)

Wyświetl plik

@ -45,6 +45,7 @@ class ContentTypeUseView(BaseListingView):
Column("type", label=_("Type"), accessor="page_type_display_name", width="12%"),
PageStatusColumn("status", label=_("Status"), width="12%"),
]
table_classname = "listing align-top"
def get(self, request, *, content_type_app_name, content_type_model_name):
try: