kopia lustrzana https://github.com/wagtail/wagtail
Restore the valign='top' style
rodzic
7a9c9449bb
commit
6c818f1695
|
|
@ -106,6 +106,10 @@ ul.listing {
|
|||
border: 0;
|
||||
}
|
||||
|
||||
&.align-top td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
&.chooser {
|
||||
tbody .parent-page {
|
||||
font-size: 1.15em;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue