portier/restream/templates/restream/restreamconfig_list.html

55 lines
1.7 KiB
HTML

{% extends 'base.html' %}
{% load i18n %}
{% load bootstrap4 %}
{% load fontawesome_5 %}
{% load guardian_tags %}
{% block 'content' %}
<div class="row justify-content-between">
<div class="col">
<h6>{% trans "restreamconfig_configuration_header" %}</h6>
</div>
<div class="col-auto">
<div class="btn-toolbar" role="toolbar">
<div class="btn-group" role="group">
<a href="{% url 'restream:restreamconfig_create' %}" type="button" class="btn btn-sm btn-outline-primary">{% fa5_icon 'plus' %} {% trans "create" %}</a>
</div>
</div>
</div>
</div>
<hr class="my-4">
<table class="table">
<thead class="thead-light">
<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">{% fa5_icon 'check-circle' %}</span>
{% else %}
<span class="text-danger">{% fa5_icon 'times-circle' %}</span>
{% endif %}
</td>
<td align="right">
<a href="{% url 'restream:restreamconfig_detail' pk=object.pk %}" type="button" class="btn btn-sm btn-outline-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-outline-danger">{% fa5_icon 'trash' %}</a>
{% endif %}
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% endblock %}