portier/restream/templates/restream/restreamconfig_list.html

50 lines
1.6 KiB
HTML

{% extends 'base.html' %}
{% load i18n %}
{% load bootstrap4 %}
{% load font_awesome %}
{% load guardian_tags %}
{% block 'content' %}
<h6>{% trans "restreamconfig_configuration_header" %}</h6>
<hr class="my-4">
<div class="btn-toolbar mb-4" role="toolbar">
<div class="btn-group" role="group">
<a href="{% url 'restream:restreamconfig_create' %}" type="button" class="btn btn-sm btn-outline-success">{% fa 'plus' %} {% trans "create" %}</a>
</div>
</div>
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">{% trans "name" %}</th>
<th scope="col">{% trans "active" %}</th>
<th scope="col" class="text-right">{% trans "actions" %}</th>
</tr>
</thead>
<tbody>
{% for object in object_list %}
{% get_obj_perms user for object as "obj_perms" %}
{% if "view_restreamconfig" in obj_perms %}
<tr>
<th scope="row">{{ object.name }}</th>
<td>
{% if object.active %}
<span class="text-success">{% fa 'check-circle' %}</span>
{% else %}
<span class="text-danger">{% fa 'times-circle' %}</span>
{% endif %}
</td>
<td align="right">
<div class="btn-group" role="group">
<a href="{% url 'restream:restreamconfig_detail' pk=object.pk %}" type="button" class="btn btn-sm btn-primary">{% trans "details" %}</a>
{% if "delete_restreamconfig" in obj_perms %}
<a href="{% url 'restream:restreamconfig_delete' pk=object.pk %}" type="button" class="btn btn-sm btn-danger">{% fa 'trash' %}</a>
{% endif %}
</div>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% endblock %}