{% extends 'base.html' %} {% macro category_icon(category_name) %} {% set category = (category_name or '')|lower %} {% if 'server' in category %} {% elif 'netz' in category or 'switch' in category or 'router' in category or 'firewall' in category %} {% elif 'druck' in category or 'printer' in category %} {% elif 'monitor' in category or 'display' in category %} {% elif 'mobil' in category or 'telefon' in category or 'smartphone' in category or 'tablet' in category %} {% elif 'computer' in category or 'pc' in category or 'notebook' in category or 'laptop' in category %} {% else %} {% endif %} {% endmacro %} {% macro render_node(node, by_parent) %}
  • {{ category_icon(node.category.name) }}
    {{ node.name }}
    {{ node.ip_address or t('assets.no_ip') }}
    {{ node.location or t('assets.no_location') }}{% if node.room_number %} ยท {{ t('assets.room') }} {{ node.room_number }}{% endif %}
    {{ node.category.name }}
    {% set children = by_parent.get(node.id, []) %} {% if children %}{% endif %}
  • {% endmacro %} {% block content %}

    {{ t('app.asset_tree') }}

    {{ t('common.reset') }}
    {{ t('app.categories') }}
    {% for category in categories %} {% endfor %}
    {{ t('tree.no_category_selection') }}
    {% if roots %}
    {% else %}

    {{ t('tree.no_matches') }}

    {% endif %} {% endblock %}