Clean up whitespace in various template files for consistency
This commit is contained in:
@@ -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")}),
|
||||||
|
|||||||
@@ -3,15 +3,15 @@
|
|||||||
|
|
||||||
{% partialdef casedetails-management-links %}
|
{% 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' %}
|
{% include 'atlas/partials/casedetails_management_links.html' %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endpartialdef %}
|
{% endpartialdef %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="card mb-4">
|
<div class="card mb-4">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -151,6 +151,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include 'exam_overview_js.html' %}
|
{% include 'exam_overview_js.html' %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -9,26 +9,26 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.embedded-viewer {
|
.embedded-viewer {
|
||||||
border: none;
|
border: none;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
margin: 0; height: 100%; overflow: hidden
|
margin: 0; height: 100%; overflow: hidden
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{% endpartialdef %}
|
{% endpartialdef %}
|
||||||
|
|
||||||
{% partialdef embed %}
|
{% partialdef embed %}
|
||||||
Close
|
Close
|
||||||
|
|
||||||
{% partial viewer %}
|
{% partial viewer %}
|
||||||
|
|
||||||
{% endpartialdef %}
|
{% endpartialdef %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% partial viewer %}
|
{% partial viewer %}
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
||||||
@@ -36,4 +36,3 @@ Close
|
|||||||
{% block css %}
|
{% block css %}
|
||||||
|
|
||||||
{% endblock css %}
|
{% endblock css %}
|
||||||
|
|
||||||
+13
-13
@@ -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.
|
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">
|
<form method="POST" class="post-form" id="cimar-login-form">
|
||||||
Username: <input type="text" id="username" name="username" value=""/> <br/>
|
Username: <input type="text" id="username" name="username" value=""/> <br/>
|
||||||
Password: <input type="password" id="password" name="password" value=""/> <br/>
|
Password: <input type="password" id="password" name="password" value=""/> <br/>
|
||||||
<button hx-post='{% url "cimar_login" %}'
|
<button hx-post='{% url "cimar_login" %}'
|
||||||
hx-target="#results">Login</button>
|
hx-target="#results">Login</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div id="results"></div>
|
<div id="results"></div>
|
||||||
@@ -20,18 +20,18 @@ hx-target="#results">Login</button>
|
|||||||
|
|
||||||
|
|
||||||
<h2>CIMAR login</h2>
|
<h2>CIMAR login</h2>
|
||||||
Login status: {{ login_status }} ({{cimar_sid}})
|
Login status: {{ login_status }} ({{cimar_sid}})
|
||||||
|
|
||||||
{% if login_status %}
|
{% if login_status %}
|
||||||
<button
|
<button
|
||||||
class="button btn-sm"
|
class="button btn-sm"
|
||||||
hx-get="{% url 'cimar_logout' %}"
|
hx-get="{% url 'cimar_logout' %}"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
>Logout</button>
|
>Logout</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
{% partial login-block %}
|
{% partial login-block %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user