{% import "partials/icons.html" as ico %}
{% if not grouped %}
{{ ico.i('printer', 18) }} No printers configured yet.

Name, IP address, driver, and the defaults the workstation gets.

{{ ico.i('plus', 14) }}Add printer
{% else %} {% for client_name, printers in grouped.items() %} {% set group_client_id = printers[0].client_id if printers else None %} {# Group search text must cover everything its rows match on, or a row can match while its group stays hidden. #} {% set gsearch = (printers | map(attribute='name') | join(' ')) ~ ' ' ~ (printers | map(attribute='ip_address') | join(' ')) ~ ' ' ~ (printers | map(attribute='port_name') | join(' ')) ~ ' ' ~ (printers | selectattr('driver_id') | map(attribute='driver.original_filename') | join(' ')) ~ ' ' ~ client_name %}
{{ ico.i('group') }} {% if group_client_id %}

{{ client_name }}

{% else %}

{{ client_name }}

{% endif %} {{ printers | length }}
{% for p in printers %} {% endfor %}
Name Status Defaults Actions
{{ p.name }} {{ p.ip_address }} · {{ p.port_name }} {% if p.driver_id %} {{ ico.i('check', 12) }}Ready {{ p.driver.original_filename }} {% else %} {{ ico.i('alert', 12) }}Driver needed {% endif %} {{ p.duplex_mode }} {{ 'Color' if p.color_mode else 'Grayscale' }} {{ p.paper_size }} {% if p.collate %} Collate {% endif %} {% if p.driver_id %} {{ ico.i('download', 14) }} {% endif %} {% include "partials/printer_edit_modal.html" %}
{% endfor %} {% endif %}