Clean up whitespace in various template files for consistency

This commit is contained in:
Ross
2026-01-26 12:49:04 +00:00
parent a667566db6
commit a61c8529ae
14 changed files with 201 additions and 178 deletions
+24
View File
@@ -434,6 +434,9 @@ class CaseCollectionTable(SelectionTable):
view = tables.LinkColumn( view = tables.LinkColumn(
"atlas:collection_detail", text="View", args=[A("pk")], orderable=False "atlas:collection_detail", text="View", args=[A("pk")], orderable=False
) )
created = tables.DateTimeColumn(verbose_name="Created", accessor="created", orderable=True)
updated = tables.DateTimeColumn(verbose_name="Updated", accessor="updated", orderable=True)
#clone = tables.LinkColumn( #clone = tables.LinkColumn(
# "atlas:case_clone", text="Clone", args=[A("pk")], orderable=False # "atlas:case_clone", text="Clone", args=[A("pk")], orderable=False
#) #)
@@ -449,6 +452,8 @@ class CaseCollectionTable(SelectionTable):
template_name = "django_tables2/bootstrap4.html" template_name = "django_tables2/bootstrap4.html"
fields = ( fields = (
"name", "name",
"created",
"updated",
"collection_type", "collection_type",
"publish_results", "publish_results",
"active", "active",
@@ -466,6 +471,25 @@ class CaseCollectionTable(SelectionTable):
**kwargs, **kwargs,
) )
def render_created(self, value):
if not value:
return ""
# compact date for display, full datetime in tooltip
return format_html(
'<span class="small text-muted" title="{}">{}</span>',
value.strftime("%Y-%m-%d %H:%M"),
value.strftime("%Y-%m-%d"),
)
def render_updated(self, value):
if not value:
return ""
return format_html(
'<span class="small text-muted" title="{}">{}</span>',
value.strftime("%Y-%m-%d %H:%M"),
value.strftime("%Y-%m-%d"),
)
class QuestionSchemaTable(SelectionTable): class QuestionSchemaTable(SelectionTable):
name = tables.Column( name = tables.Column(
linkify=("atlas:question_schema_detail", {"pk": tables.A("pk")}), linkify=("atlas:question_schema_detail", {"pk": tables.A("pk")}),
-1
View File
@@ -36,4 +36,3 @@ Close
{% block css %} {% block css %}
{% endblock css %} {% endblock css %}