{% if assigned_objects_panel.add_url and not rulebook_readonly %}
{% trans "Add" %}
{% endif %}
{% if assigned_objects_panel.is_empty %}
{% trans "No devices or virtual machines assigned to this rulebook." %}
{% if assigned_objects_panel.add_url and not rulebook_readonly %}
{% trans "Assign now." %}
{% endif %}
{% else %}
{% for host in assigned_objects_panel.hosts %}
{% if host.host_url %}
{{ host.host_type_label }}
{{ host.host_name }}
{% else %}
{{ host.host_type_label }}
{{ host.host_name }}
{% endif %}
{% if host.has_unlinked_interfaces %}
{% endif %}
{% if host.remove_url and not rulebook_readonly %}
{% endif %}
{% if host.has_unlinked_interfaces and not host.linked_interface_count %}
{% trans "No linked interfaces. Enable “All interfaces” to assign links." %}
{% endif %}
{% for iface in host.interfaces %}
{% if iface.url %}
{{ iface.name }}
{% else %}
{{ iface.name }}
{% endif %}
{% for link in iface.link_rows %}
{{ link.type_label }}:
{% if link.url %}
{{ link.name|safe }}
{% else %}
{{ link.name|safe }}
{% endif %}
{% if link.edit_url or link.delete_url %}
{% if link.edit_url %}
{% endif %}
{% if link.delete_url %}
{% endif %}
{% endif %}
{% empty %}
{% endfor %}
{% if iface.assign_url and not rulebook_readonly %}
{% endif %}