{% load i18n %}


<tr>
    <td class="text-center">Discord</td>
    <td class="text-center">
        {% if not user_has_account %}
            (not activated)
        {% else %}
            {{discord_username}}
        {% endif %}
    </td>
    <td class="text-center">
        {{server_name}}
    </td>
    <td class="text-center">
        {% if not user_has_account %}
            <a href="{% url 'discord:activate' %}" title="{% trans 'Join the Discord server' %}" class="btn btn-primary">
                <span class="glyphicon glyphicon-ok"></span>
            </a>
        {% else %}
            <a href="{% url 'discord:reset' %}" title="{% trans 'Leave- and rejoin the Discord Server (Reset)' %}" class="btn btn-warning">
                <span class="glyphicon glyphicon-refresh"></span>
            </a>
            <a href="{% url 'discord:deactivate' %}" title="{% trans 'Leave the Discord server' %}" class="btn btn-danger">
                <span class="glyphicon glyphicon-remove"></span>
            </a>
        {% endif %}
        {% if request.user.is_superuser %}
            <div class="text-center" style="padding-top:5px;">
                <a type="button" id="btnLinkDiscordServer" class="btn btn-default" href="{% url 'discord:add_bot' %}">
                    {% trans "Link Discord Server" %}
                </a>
            </div>
        {% endif %}
    </td>
</tr>
