[CHANGE] Mumble service template

This commit is contained in:
Peter Pfeufer 2023-10-31 09:48:07 +01:00
parent 5dd286bbe7
commit 63afb13d25
No known key found for this signature in database
GPG Key ID: 6051D2C6AD4EBC27

View File

@ -1,34 +1,51 @@
{% load i18n %} {% extends "services/services_ctrl_base.html" %}
<div class="card text-center m-4" style="min-width: 18rem; min-height: 18rem;">
<div class="card-body ">
<h5 class="card-title ">{{ service_name }}</h5>
<p class="card-text"><a href="mumble://{{ service_url }}">{{ service_url }}</a></p>
<p class="card-text"><span class="badge {% if username != '' %}bg-success{% else %}bg-warning{% endif %}">{% if username != '' %}Active{% else %}Disabled{% endif %}</span></p>
<p class="card-text">Username: <span class="badge bg-secondary text-end">{{ username }}</span></p>
</div>
<div class="card-footer"> {% load i18n %}
{% if username == "" %}
<div class="text-center"> {% block title %}
<a href="{% url 'mumble:activate' %}" title="Activate" class="btn btn-warning"> {{ service_name }}
<span class="fas fa-check fa-fw"></span> {% endblock %}
</a>
</div> {% block url %}
{% else %} <a href="{{ service_url }}">{{ service_url }}</a>
<div class="text-center"> {% endblock %}
<a href="{% url 'mumble:set_password' %}" title="Set Password" class="btn btn-warning">
<span class="fas fa-edit fa-fw"></span> {% block user %}
</a> {% if username %}
<a href="{% url 'mumble:reset_password' %}" title="Reset Password" class="btn btn-primary"> {% translate "Username" %}: {{ username }}
<span class="fas fa-sync fa-fw"></span> {% endif %}
</a> {% endblock %}
<a href="{% url 'mumble:deactivate' %}" title="Deactivate" class="btn btn-danger">
<span class="fas fa-times fa-fw"></span> {% block controls %}
</a> {% if username == "" %}
<a href="mumble://{{ connect_url }}" class="btn btn-success" title="Connect"> {% if urls.auth_activate %}
<span class="fas fa-arrow-right fa-fw"></span> <a class="btn btn-warning" href="{% url urls.auth_activate %}" title="{% translate 'Activate' %}">
</a> <span class="fas fa-check fa-fw"></span>
</div> </a>
{% endif %} {% endif %}
</div> {% else %}
</div> {% 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 %}