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(
"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(
# "atlas:case_clone", text="Clone", args=[A("pk")], orderable=False
#)
@@ -449,6 +452,8 @@ class CaseCollectionTable(SelectionTable):
template_name = "django_tables2/bootstrap4.html"
fields = (
"name",
"created",
"updated",
"collection_type",
"publish_results",
"active",
@@ -466,6 +471,25 @@ class CaseCollectionTable(SelectionTable):
**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):
name = tables.Column(
linkify=("atlas:question_schema_detail", {"pk": tables.A("pk")}),
+4 -4
View File
@@ -3,15 +3,15 @@
{% partialdef casedetails-management-links %}
<div class="btn-toolbar" role="toolbar" aria-label="Case management links">
<div class="btn-toolbar" role="toolbar" aria-label="Case management links">
{% include 'atlas/partials/casedetails_management_links.html' %}
</div>
</div>
{% endpartialdef %}
{% block content %}
<div class="container">
<div class="container">
<div class="card mb-4">
<div class="card-body">
<div class="row">
@@ -151,6 +151,6 @@
{% endif %}
{% include 'exam_overview_js.html' %}
</div>
</div>
{% endblock %}
+5 -6
View File
@@ -9,26 +9,26 @@
</div>
<style>
<style>
.embedded-viewer {
border: none;
pointer-events: auto;
margin: 0; height: 100%; overflow: hidden
}
</style>
</style>
{% endpartialdef %}
{% partialdef embed %}
Close
Close
{% partial viewer %}
{% partial viewer %}
{% endpartialdef %}
{% block content %}
{% partial viewer %}
{% partial viewer %}
{% endblock content %}
@@ -36,4 +36,3 @@ Close
{% block css %}
{% endblock css %}
+13 -13
View File
@@ -5,9 +5,9 @@
Logging in here allows your account to be linked with CIMAR. You may periodically need to re-login to keep the link active.
<form method="POST" class="post-form" id="cimar-login-form">
Username: <input type="text" id="username" name="username" value=""/> <br/>
Password: <input type="password" id="password" name="password" value=""/> <br/>
<button hx-post='{% url "cimar_login" %}'
hx-target="#results">Login</button>
Password: <input type="password" id="password" name="password" value=""/> <br/>
<button hx-post='{% url "cimar_login" %}'
hx-target="#results">Login</button>
</form>
<div id="results"></div>
@@ -20,18 +20,18 @@ hx-target="#results">Login</button>
<h2>CIMAR login</h2>
Login status: {{ login_status }} ({{cimar_sid}})
Login status: {{ login_status }} ({{cimar_sid}})
{% if login_status %}
<button
class="button btn-sm"
hx-get="{% url 'cimar_logout' %}"
hx-swap="outerHTML"
>Logout</button>
{% endif %}
<br/>
{% if login_status %}
<button
class="button btn-sm"
hx-get="{% url 'cimar_logout' %}"
hx-swap="outerHTML"
>Logout</button>
{% endif %}
<br/>
{% partial login-block %}
{% partial login-block %}
</div>
{% endblock %}