add status symbols to stream and restreamconfig lists

This commit is contained in:
Jan Koppe 2020-05-01 14:17:46 +02:00
parent 8ec9c2807c
commit 16a872db15
Signed by: thunfisch
GPG Key ID: BE935B0735A2129B
2 changed files with 17 additions and 1 deletions

View File

@ -16,6 +16,7 @@
<thead class="thead-dark"> <thead class="thead-dark">
<tr> <tr>
<th scope="col">{% trans "name" %}</th> <th scope="col">{% trans "name" %}</th>
<th scope="col">{% trans "active" %}</th>
<th scope="col" class="text-right">{% trans "actions" %}</th> <th scope="col" class="text-right">{% trans "actions" %}</th>
</tr> </tr>
</thead> </thead>
@ -24,7 +25,14 @@
{% get_obj_perms user for object as "obj_perms" %} {% get_obj_perms user for object as "obj_perms" %}
{% if "view_restreamconfig" in obj_perms %} {% if "view_restreamconfig" in obj_perms %}
<tr> <tr>
<th scope="ro">{{ object.name }}</th> <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"> <td align="right">
<div class="btn-group" role="group"> <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> <a href="{% url 'restream:restreamconfig_detail' pk=object.pk %}" type="button" class="btn btn-sm btn-primary">{% trans "details" %}</a>

View File

@ -16,6 +16,7 @@
<thead class="thead-dark"> <thead class="thead-dark">
<tr> <tr>
<th scope="col">{% trans "name" %}</th> <th scope="col">{% trans "name" %}</th>
<th scope="col">{% trans "publishing" %}</th>
<th scope="col" class="text-right">{% trans "actions" %}</th> <th scope="col" class="text-right">{% trans "actions" %}</th>
</tr> </tr>
</thead> </thead>
@ -25,6 +26,13 @@
{% if "view_stream" in obj_perms %} {% if "view_stream" in obj_perms %}
<tr> <tr>
<th scope="ro">{{ object.name }}</th> <th scope="ro">{{ object.name }}</th>
<td>
{% if object.publish_counter > 0 %}
<span class="text-success">{% fa 'check-circle' %}</span>
{% else %}
<span class="text-danger">{% fa 'times-circle' %}</span>
{% endif %}
</td>
<td align="right"> <td align="right">
<div class="btn-group" role="group"> <div class="btn-group" role="group">
<a href="{% url 'rtmp:stream_detail' pk=object.pk %}" type="button" class="btn btn-sm btn-primary">{% trans "details" %}</a> <a href="{% url 'rtmp:stream_detail' pk=object.pk %}" type="button" class="btn btn-sm btn-primary">{% trans "details" %}</a>