{% extends "services/services_ctrl_base.html" %}

{% load i18n %}

{% block title %}
    {{ service_name }}
{% endblock %}

{% block url %}
    <a href="{{ service_url }}">{{ service_url }}</a>
{% endblock %}

{% block user %}
    {% include "services/service_username.html" with username=username %}
{% endblock %}

{% block controls %}
    {% if username == "" %}
        {% if urls.auth_activate %}
            <a class="btn btn-warning" href="{% url urls.auth_activate %}" title="{% translate 'Activate' %}">
                <span class="fas fa-check fa-fw"></span>
            </a>
        {% endif %}
    {% else %}
        {% if urls.auth_set_password %}
            <a class="btn btn-warning" href="{% url urls.auth_set_password %}" title="{% translate 'Set Password' %}">
                <span class="fas fa-edit fa-fw"></span>
            </a>
        {% endif %}

        {% if urls.auth_reset_password %}
            <a class="btn btn-primary" href="{% url urls.auth_reset_password %}" title="{% translate 'Reset Password' %}">
                <span class="fas fa-sync fa-fw"></span>
            </a>
        {% endif %}

        {% if urls.auth_deactivate %}
            <a class="btn btn-danger" href="{% url urls.auth_deactivate %}" title="{% translate 'Deactivate' %}">
                <span class="fas fa-times fa-fw"></span>
            </a>
        {% endif %}

        {% if connect_url %}
            <a class="btn btn-success" href="mumble://{{ connect_url }}" title="{% translate 'Connect' %}">
                <span class="fas fa-arrow-right fa-fw"></span>
            </a>
        {% endif %}
    {% endif %}
{% endblock %}
