{% load i18n %}
{% load bootstrap_icons %}
{# a VM's name, its title, and with owners its owners: the first as a badge, the others counted #}
{{ instance.name }}
{% if instance.info and instance.title %}
{{ instance.title }}
{% endif %}
{% if owners %}
{% with users=instance.userinstance_set.all %}
{% if users %}
{% bs_icon 'person' %} {{ users.0.user }}
{% if users|length > 1 %}
+{{ users|length|add:"-1" }} {% trans "more owners" %}: {% for owner in users|slice:"1:" %}{{ owner.user }}{% if not forloop.last %}, {% endif %}{% endfor %}
{% endif %}