and some fixes

This commit is contained in:
Ross
2026-05-28 22:57:42 +01:00
parent ee4fe2b85b
commit 9592568dbb
6 changed files with 129 additions and 99 deletions
+11
View File
@@ -21,6 +21,7 @@ from .models import (
from django.utils.html import format_html
from django.utils.safestring import mark_safe
from django.template.defaultfilters import filesizeformat
from easy_thumbnails.files import get_thumbnailer
@@ -159,6 +160,11 @@ class CaseTable(SelectionTable):
return mark_safe(", ".join(links))
return "No collections"
def render_case_size(self, value):
if value is None:
return "-"
return filesizeformat(value)
associated_cases = tables.Column(
verbose_name="Associated Cases", accessor="pk", orderable=False
)
@@ -167,6 +173,10 @@ class CaseTable(SelectionTable):
verbose_name="Collections", accessor="pk", orderable=False
)
case_size = tables.Column(
verbose_name="Case size", accessor="total_images_series_size"
)
edit = tables.LinkColumn(
"atlas:case_update", text="Edit", args=[A("pk")], orderable=False
)
@@ -188,6 +198,7 @@ class CaseTable(SelectionTable):
"title",
"description",
"created_date",
"case_size",
"series",
"author",
"associated_cases",
+3
View File
@@ -54,6 +54,9 @@
</li>
{% if request.user.is_staff %}
<li><hr class="dropdown-divider"></li>
<li>
<a class="dropdown-item" href="{% url 'atlas:case_admin_overview' %}"><i class="bi bi-speedometer2 me-1" aria-hidden="true"></i>Case Admin Overview</a>
</li>
<li>
<a class="dropdown-item" href="{% url 'atlas:cases_by_size' %}"><i class="bi bi-hDD-stack me-1" aria-hidden="true"></i>Large cases</a>
</li>
@@ -59,10 +59,14 @@
{% for row in author_rows %}
<tr>
<td>
<a href="{% url 'atlas:case_view' %}?author={{ row.pk }}">
{% if row.get_full_name %}{{ row.get_full_name }}{% else %}{{ row.username }}{% endif %}
</a>
<div class="text-muted small">{{ row.username }}</div>
</td>
<td class="text-end fw-semibold">{{ row.case_count }}</td>
<td class="text-end fw-semibold">
<a href="{% url 'atlas:case_view' %}?author={{ row.pk }}">{{ row.case_count }}</a>
</td>
</tr>
{% empty %}
<tr>
@@ -57,7 +57,14 @@
{% if can_merge %}
<dt class="col-sm-4">Edit relationships</dt>
<dd class="col-sm-8">
<p>
<a class="btn btn-sm btn-outline-primary" data-bs-toggle="collapse" href="#relationshipCollapse" role="button" aria-expanded="false" aria-controls="relationshipCollapse">Show relationship editor</a>
</p>
<div class="collapse" id="relationshipCollapse">
<div class="card card-body">
{% include 'atlas/partials/_condition_relationships.html' %}
</div>
</div>
</dd>
{% endif %}
@@ -18,7 +18,7 @@
<td class="small">{{ case.created_date|date:"Y-m-d H:i" }}</td>
<td class="small">
{% for author in case.author.all %}
<span class="badge text-bg-secondary me-1">{{ author.username }}</span>
<a class="badge text-bg-secondary me-1 text-decoration-none" href="{% url 'atlas:case_view' %}?author={{ author.pk }}">{{ author.username }}</a>
{% empty %}
<span class="text-muted">None</span>
{% endfor %}
+5
View File
@@ -844,6 +844,11 @@
/* small helpers */
.text-muted { color: var(--muted) !important; }
#caseSeriesModal .modal-body {
max-height: min(72vh, 760px);
overflow-y: auto;
}
#series-list li {
}
#series-list .selected {