Files
ImpTune/imptune/templates/partials/printer_list.html
T
kawa 7b948b68c3 feat(11-02): UIE-01 edit modal — Edit button per row, Pico dialog, E2E tests
- Create printer_edit_modal.html: native dialog with HTMX PATCH form, Alpine.js portEdited=true
- Update printer_list.html Actions td: include edit modal partial before Delete button
- Create tests/e2e/test_printer_edit.py: modal open/pre-fill and submit/list-update E2E tests
- Fix E2E row targeting to use locator(tr, has=a:has-text) for session-scoped server safety
2026-04-15 11:10:44 +02:00

51 lines
1.4 KiB
HTML

<div id="printer-list">
{% if not grouped %}
<p>No printers configured yet.</p>
{% else %}
{% for client_name, printers in grouped.items() %}
<section>
<h3>{{ client_name }}</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>IP Address</th>
<th>Port</th>
<th>Driver</th>
<th>Duplex</th>
<th>Color</th>
<th>Paper</th>
<th>Collate</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for p in printers %}
<tr>
<td><a href="/printers/{{ p.id }}">{{ p.name }}</a></td>
<td>{{ p.ip_address }}</td>
<td>{{ p.port_name }}</td>
<td>{{ p.driver.original_filename if p.driver_id else '—' }}</td>
<td>{{ p.duplex_mode }}</td>
<td>{{ 'Yes' if p.color_mode else 'No' }}</td>
<td>{{ p.paper_size }}</td>
<td>{{ 'Yes' if p.collate else 'No' }}</td>
<td>
{% include "partials/printer_edit_modal.html" %}
<button
hx-delete="/printers/{{ p.id }}"
hx-target="#printer-list"
hx-swap="outerHTML"
hx-confirm="Delete '{{ p.name }}'?">
Delete
</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endfor %}
{% endif %}
</div>