{% for unit in tree %}

{{ unit.name }}{% include "catalog/partials/badges.html" with item=unit %}

{% include "catalog/partials/item_actions.html" with kind="service-units" prefix="unit" item=unit first=forloop.first last=forloop.last %}
{% if unit.services %}
    {% for service in unit.services %}
  • {{ service.name }}{% include "catalog/partials/badges.html" with item=service %}

    {% include "catalog/partials/item_actions.html" with kind="services" prefix="service" item=service first=forloop.first last=forloop.last %}
    {% if service.work_types %} {% include "catalog/partials/work_types.html" with work_types=service.work_types %} {% else %}

    {% translate "No work types yet." %}

    {% endif %}
  • {% endfor %}
{% endif %} {% if unit.work_types %} {% if unit.services %}

{% translate "Directly under the service unit" %}

{% endif %} {% include "catalog/partials/work_types.html" with work_types=unit.work_types %} {% elif not unit.services %}

{% translate "No services or work types yet." %}

{% endif %}
{% url 'catalog:child_create' unit.id 'services' as service_url %} {% translate "Add service" %}: {{ unit.name }} {% url 'catalog:child_create' unit.id 'work-types' as work_type_url %} {% translate "Add work type" %}: {{ unit.name }}
{% empty %}

{% translate "No service units yet." %}

{% endfor %}