templatestuff
This commit is contained in:
parent
f3e314fbea
commit
6f817a9e33
|
@ -2,6 +2,13 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% load fontawesome_5 %}
|
||||
|
||||
{% block 'sidenav' %}
|
||||
{% with 'restream' as section %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block 'content' %}
|
||||
<h6>{% trans "confirm_delete_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
|
|
|
@ -6,6 +6,13 @@
|
|||
|
||||
{% get_obj_perms user for object as "obj_perms" %}
|
||||
|
||||
|
||||
{% block 'sidenav' %}
|
||||
{% with 'restream' as section %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block 'content' %}
|
||||
<div class="row justify-content-between">
|
||||
<div class="col">
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
|
||||
{% block 'sidenav' %}
|
||||
{% with 'restream' as section %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block 'content' %}
|
||||
<h6>{% trans "create_new_restream_configuration_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
|
|
|
@ -4,6 +4,13 @@
|
|||
{% load bootstrap4 %}
|
||||
{% load fontawesome_5 %}
|
||||
|
||||
|
||||
{% block 'sidenav' %}
|
||||
{% with 'restream' as section %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block 'content' %}
|
||||
|
||||
<div class="row justify-content-between">
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
|
||||
{% block 'sidenav' %}
|
||||
{% with 'restream' as section %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block 'content' %}
|
||||
<h6>{% trans "update_restream_configuration_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% load fontawesome_5 %}
|
||||
|
||||
{% block 'sidenav' %}
|
||||
{% with 'stream' as section %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block 'content' %}
|
||||
<h6>{% trans "confirm_delete_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
|
|
|
@ -7,6 +7,12 @@
|
|||
|
||||
{% get_obj_perms user for object as "obj_perms" %}
|
||||
|
||||
{% block 'sidenav' %}
|
||||
{% with 'stream' as section %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block 'content' %}
|
||||
<div class="row justify-content-between">
|
||||
<div class="col">
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
|
||||
{% block 'sidenav' %}
|
||||
{% with 'stream' as section %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block 'content' %}
|
||||
<h6>{% trans "create_new_stream_configuration_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
|
||||
{% block 'sidenav' %}
|
||||
{% with 'stream' as section %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block 'content' %}
|
||||
<h6>{% trans "update_stream_configuration_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
|
|
|
@ -75,11 +75,7 @@ class StreamDetail(DetailView):
|
|||
class StreamChange(UpdateView):
|
||||
model = models.Stream
|
||||
template_name_suffix = '_update_form'
|
||||
|
||||
def get_form_kwargs(self):
|
||||
kwargs = super().get_form_kwargs()
|
||||
kwargs['user'] = self.request.user
|
||||
return kwargs
|
||||
fields = ['name']
|
||||
|
||||
|
||||
@method_decorator(login_required, name='dispatch')
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
# Generated by Django 5.0.2 on 2024-02-25 13:49
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("rtmp", "0005_auto_20200531_0951"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="application",
|
||||
options={
|
||||
"verbose_name": "application_verbose_name",
|
||||
"verbose_name_plural": "application_verbose_name_plural",
|
||||
},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="application",
|
||||
name="name",
|
||||
field=models.CharField(
|
||||
help_text="rtmp_application_name", max_length=100, unique=True
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="stream",
|
||||
name="application",
|
||||
field=models.ForeignKey(
|
||||
help_text="stream_application_help",
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to="rtmp.application",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="stream",
|
||||
name="name",
|
||||
field=models.CharField(help_text="stream_name_help", max_length=100),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="stream",
|
||||
name="stream",
|
||||
field=models.UUIDField(
|
||||
default=uuid.uuid4, help_text="stream_stream_help", unique=True
|
||||
),
|
||||
),
|
||||
]
|
|
@ -1,39 +0,0 @@
|
|||
# Generated by Django 5.0.2 on 2024-02-25 20:26
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('rtmp', '0006_alter_application_options_alter_application_name_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='application',
|
||||
options={'verbose_name': 'RTMP application', 'verbose_name_plural': 'RTMP applications'},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='application',
|
||||
name='name',
|
||||
field=models.CharField(help_text='RTMP application name', max_length=100, unique=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='stream',
|
||||
name='application',
|
||||
field=models.ForeignKey(help_text='Application which the stream is assigned to', on_delete=django.db.models.deletion.CASCADE, to='rtmp.application'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='stream',
|
||||
name='name',
|
||||
field=models.CharField(help_text='Name for this stream', max_length=100),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='stream',
|
||||
name='stream',
|
||||
field=models.UUIDField(default=uuid.uuid4, help_text='Stream ID for this stream', unique=True),
|
||||
),
|
||||
]
|
|
@ -33,17 +33,6 @@
|
|||
<ul class="navbar-nav mr-auto">
|
||||
</ul>
|
||||
<ul class="navbar-nav">
|
||||
{% if user.is_authenticated %}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarStreamingDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{% trans "navbar_streaming" %}
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarStreamingDropdown">
|
||||
<a class="dropdown-item{% if not perms.config.add_stream %} disabled{% endif %}" href="{% url 'config:stream_list' %}">{% trans "navbar_configuration_streams" %}</a>
|
||||
<a class="dropdown-item{% if not perms.config.add_restream %} disabled{% endif %}" href="{% url 'config:restream_list' %}">{% trans "navbar_configuration_restreams" %}</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<li class="nav-item dropdown border-left">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarAccountDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
@ -89,22 +78,22 @@
|
|||
<nav>
|
||||
<ul class="nav nav-pills flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if not perms.rtmp.add_stream %} disabled{% endif %}{% if section == "stream" %} active {% endif %}" href="{% url 'rtmp:stream_list' %}">{% fa5_icon 'dot-circle' %} {% trans "navbar_configuration_stream" %}</a>
|
||||
<a class="nav-link{% if not perms.config.add_stream %} disabled{% endif %}{% if section == "stream" %} active {% endif %}" href="{% url 'config:stream_list' %}">{% fa5_icon 'dot-circle' %} {% trans "navbar_configuration_stream" %}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if not perms.restream.add_restreamconfig %} disabled{% endif %}" href="{% url 'restream:restreamconfig_list' %}">{% fa5_icon 'expand-arrows-alt' %} {% trans "navbar_configuration_restream" %}</a>
|
||||
<a class="nav-link{% if not perms.config.add_restream %} disabled{% endif %}{% if section == "restream" %} active {% endif %}" href="{% url 'config:restream_list' %}">{% fa5_icon 'expand-arrows-alt' %} {% trans "navbar_configuration_restream" %}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" href="{% url 'rtmp:stream_list' %}">{% fa5_icon 'compress-arrows-alt' %} {% trans "navbar_configuration_pull" %}</a>
|
||||
<a class="nav-link disabled" href="{% url 'config:stream_list' %}">{% fa5_icon 'compress-arrows-alt' %} {% trans "navbar_configuration_pull" %}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" href="{% url 'rtmp:stream_list' %}">{% fa5_icon 'broadcast-tower' %} {% trans "navbar_configuration_publish" %}</a>
|
||||
<a class="nav-link disabled" href="{% url 'config:stream_list' %}">{% fa5_icon 'broadcast-tower' %} {% trans "navbar_configuration_publish" %}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" href="{% url 'rtmp:stream_list' %}">{% fa5_icon 'hdd' %} {% trans "navbar_configuration_record" %}</a>
|
||||
<a class="nav-link disabled" href="{% url 'config:stream_list' %}">{% fa5_icon 'hdd' %} {% trans "navbar_configuration_record" %}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" href="{% url 'rtmp:stream_list' %}">{% fa5_icon 'random' %} {% trans "navbar_configuration_switch" %}</a>
|
||||
<a class="nav-link disabled" href="{% url 'config:stream_list' %}">{% fa5_icon 'random' %} {% trans "navbar_configuration_switch" %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
Loading…
Reference in New Issue