[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 %}
<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>
{% extends "services/services_ctrl_base.html" %}
<div class="card-footer">
{% if username == "" %}
<div class="text-center">
<a href="{% url 'mumble:activate' %}" title="Activate" class="btn btn-warning">
<span class="fas fa-check fa-fw"></span>
</a>
</div>
{% else %}
<div class="text-center">
<a href="{% url 'mumble:set_password' %}" title="Set Password" class="btn btn-warning">
<span class="fas fa-edit fa-fw"></span>
</a>
<a href="{% url 'mumble:reset_password' %}" title="Reset Password" class="btn btn-primary">
<span class="fas fa-sync fa-fw"></span>
</a>
<a href="{% url 'mumble:deactivate' %}" title="Deactivate" class="btn btn-danger">
<span class="fas fa-times fa-fw"></span>
</a>
<a href="mumble://{{ connect_url }}" class="btn btn-success" title="Connect">
<span class="fas fa-arrow-right fa-fw"></span>
</a>
</div>
{% load i18n %}
{% block title %}
{{ service_name }}
{% endblock %}
{% block url %}
<a href="{{ service_url }}">{{ service_url }}</a>
{% endblock %}
{% block user %}
{% if username %}
{% translate "Username" %}: {{ username }}
{% endif %}
{% 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 %}
</div>
</div>
{% 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 %}