{% extends "base.html" %} {% load i18n %} {% load bootstrap_icons %} {% block title %}{% trans "User Profile" %} - {{ user }}{% endblock %} {% block page_heading %}{% trans "User Profile" %}{% endblock page_heading %} {% block content %}

{{ user.get_full_name|default:user.username }}

{% if user.is_superuser %} {% trans "Superuser" %} {% elif user.is_staff %} {% trans "Template editor" %} {% endif %} {% if not user.is_active %}{% trans "Blocked" %}{% endif %}
{{ user.username }} {% if user.email %}{{ user.email }}{% endif %} {% for group in user.groups.all %}{{ group.name }}{% endfor %}
{% trans "Last login" %} {{ user.last_login|date:"Y-m-d H:i"|default:_("never") }} {% trans "Joined" %} {{ user.date_joined|date:"Y-m-d" }}
{% bs_icon 'pencil' %} {% trans "Edit user" %} {% if otp_enabled %}
{% csrf_token %}
{% endif %}

{% trans "VMs" %} {{ user_insts|length }}

{% bs_icon 'plus-lg' %} {% trans "Add VM" %}
{% for inst in user_insts %}
{{ inst.instance.name }}
{% trans "Host" %}: {{ inst.instance.compute.name }}
{# the rights as the VM's Users tab names them: every owner powers the VM and opens its console #} {% if inst.is_change %}{% trans "Change settings" %}{% endif %} {% if inst.is_delete %}{% trans "Delete the VM" %}{% endif %} {% if inst.is_change and inst.is_vnc %}{% trans "Change console settings" %}{% endif %} {% if not inst.is_change and not inst.is_delete %}{% trans "Power and console only" %}{% endif %}
{% empty %}
{% trans "No VMs." %}
{% endfor %}

{% trans "SSH Keys" %} {{ publickeys|length }}

{% include "ssh_key_list.html" with owner=user %}

{% trans "API Tokens" %} {{ api_tokens|length }}

{% include "api_token_list.html" with owner=user %}
{% endblock content %}