0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Add StatusTagColumn component

This commit is contained in:
Sage Abdullah 2022-06-01 22:08:33 +07:00 committed by Karl Hobley
parent 46bb760319
commit 613f71837b
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,3 @@
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
<div class="status-tag primary">{{ value }}</div>
</td>

View File

@ -177,6 +177,12 @@ class StatusFlagColumn(Column):
self.false_label = false_label
class StatusTagColumn(Column):
"""Represents a status tag"""
cell_template_name = "wagtailadmin/tables/status_tag_cell.html"
class DateColumn(Column):
"""Outputs a date in human-readable format"""