feat(11-04): add client name links in printer_list.html and client_list.html

- printer_list.html: extract group_client_id from first printer in group;
  wrap client name in <a href="/clients/{id}"> when id present; Unassigned
  group renders as plain text (no dead link)
- client_list.html: wrap client name cell in <a href="/clients/{{ c.id }}">
This commit is contained in:
2026-04-15 14:49:52 +02:00
parent f3644790be
commit 5bf152bcce
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
<tbody>
{% for c in clients %}
<tr>
<td>{{ c.name }}</td>
<td><a href="/clients/{{ c.id }}">{{ c.name }}</a></td>
<td>{{ c.created_at.strftime('%Y-%m-%d') if c.created_at else '—' }}</td>
</tr>
{% endfor %}
@@ -4,7 +4,12 @@
{% else %}
{% for client_name, printers in grouped.items() %}
<section>
{% set group_client_id = printers[0].client_id if printers else None %}
{% if group_client_id %}
<h3><a href="/clients/{{ group_client_id }}">{{ client_name }}</a></h3>
{% else %}
<h3>{{ client_name }}</h3>
{% endif %}
<table>
<thead>
<tr>