portier/source/config/templates/config/restream_detail.html

79 lines
2.8 KiB
HTML
Raw Normal View History

{% extends 'base.html' %}
{% load i18n %}
{% load bootstrap4 %}
{% load fontawesome_5 %}
{% load guardian_tags %}
{% get_obj_perms user for object as "obj_perms" %}
2024-02-28 19:38:18 +01:00
{% block 'sidenav' %}
{% with 'restream' as section %}
{{ block.super }}
{% endwith %}
{% endblock %}
{% block 'content' %}
<div class="row justify-content-between">
<div class="col">
<h6>{% trans "restream_configuration_details_header" %}</h6>
</div>
{% get_obj_perms user for object as "obj_perms" %}
<div class="col-auto">
{% if "change_restream" in obj_perms %}
<a href="{% url 'config:restream_change' pk=object.pk %}" type="button" class="btn btn-sm btn-outline-primary">{% fa5_icon 'edit' %} {% trans 'change' %}</a>
{% endif %}
{% if "delete_restream" in obj_perms %}
<a href="{% url 'config:restream_delete' pk=object.pk %}" type="button" class="btn btn-sm btn-outline-danger">{% fa5_icon 'trash' %} {% trans 'delete' %}</a>
{% endif %}
</div>
</div>
<hr class="my-4">
<div class="row">
<div class="col-sm border-right">
<dl class="row">
<dt class="col-sm-3">{% trans "name" %}</dt>
<dd class="col-sm-9">{{ object.name }}</dd>
<dt class="col-sm-3">{% trans "stream" %}</dt>
<dd class="col-sm-9"><a href="{% url 'config:stream_detail' pk=object.stream.pk %}">{{ object.stream.name }}</a></dd>
2020-05-02 00:10:36 +02:00
<dt class="col-sm-3">{% trans "active" %}</dt>
<dd class="col-sm-9">
{% if object.active %}
<span class="text-success">{% fa5_icon 'check-circle' %}</span>
{% else %}
<span class="text-danger">{% fa5_icon 'times-circle' %}</span>
{% endif %}
</dd>
</dl>
</div>
<div class="col-sm">
<p>{% trans "configured_target_url" %}</p>
<div class="input-group mb-4" id="show_hide_target_url">
2020-05-02 00:10:36 +02:00
<input readonly class="form-control" type="password" value="{{ object.target }}">
<div class="input-group-append">
<a href="" class="btn btn-outline-secondary"><i class="fa fa-eye-slash" aria-hidden="true"></i></a>
</div>
</div>
</div>
</div>
<script>
$(function () {
$('[data-toggle="popover"]').popover()
})
$(function() {
$("#show_hide_target_url a").on('click', function(event) {
event.preventDefault();
if ($('#show_hide_target_url input').attr('type') == 'text') {
$('#show_hide_target_url input').attr('type', 'password');
$('#show_hide_target_url i').addClass('fa-eye-slash');
$('#show_hide_target_url i').removeClass('fa-eye');
} else if ($('#show_hide_target_url input').attr('type') == 'password') {
$('#show_hide_target_url input').attr('type', 'text');
$('#show_hide_target_url i').removeClass('fa-eye-slash');
$('#show_hide_target_url i').addClass('fa-eye');
}
});
});
</script>
{% endblock %}