- Add GET /printers/{printer_id} route to pages.py with LEFT OUTER JOINs on Client and Driver
- Create printer_detail.html full-page template showing all config fields and driver info
- Display "No driver assigned" when driver FK is null
- Add disabled "Regenerate Package" button (Phase 4 placeholder)
- Make printer names in printer_list.html clickable links to detail page
50 lines
1.3 KiB
HTML
50 lines
1.3 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>
|
|
<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>
|