From 9e9468ed342e562076e9eef32474468c10b994f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D1=88=D0=BA=D0=B8=D0=BD=20=D0=A1=D0=B5=D1=80?= =?UTF-8?q?=D0=B3=D0=B5=D0=B9?= Date: Mon, 10 Nov 2025 14:56:21 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=B2=D0=B8?= =?UTF-8?q?=D0=B7=D1=83=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D1=84=D1=83?= =?UTF-8?q?=D0=BD=D0=BA=D1=86=D0=B8=D0=BE=D0=BD=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbapp/dbapp/settings/base.py | 4 +- .../mainapp/components/_pagination.html | 66 ++- .../components/_selected_items_offcanvas.html | 60 +++ .../templates/mainapp/objitem_detail.html | 475 ++++++++++++++++++ .../templates/mainapp/objitem_form.html | 4 +- .../templates/mainapp/objitem_list.html | 378 +++++++++++++- dbapp/mainapp/urls.py | 1 + dbapp/mainapp/views.py | 86 +++- 8 files changed, 1036 insertions(+), 38 deletions(-) create mode 100644 dbapp/mainapp/templates/mainapp/components/_selected_items_offcanvas.html create mode 100644 dbapp/mainapp/templates/mainapp/objitem_detail.html diff --git a/dbapp/dbapp/settings/base.py b/dbapp/dbapp/settings/base.py index d43de9b..0d77e49 100644 --- a/dbapp/dbapp/settings/base.py +++ b/dbapp/dbapp/settings/base.py @@ -178,8 +178,8 @@ USE_TZ = True # ============================================================================ LOGIN_URL = 'login' -LOGIN_REDIRECT_URL = 'home' -LOGOUT_REDIRECT_URL = 'home' +LOGIN_REDIRECT_URL = 'mainapp:home' +LOGOUT_REDIRECT_URL = 'mainapp:home' # ============================================================================ # STATIC FILES CONFIGURATION diff --git a/dbapp/mainapp/templates/mainapp/components/_pagination.html b/dbapp/mainapp/templates/mainapp/components/_pagination.html index 8241076..3d0a781 100644 --- a/dbapp/mainapp/templates/mainapp/components/_pagination.html +++ b/dbapp/mainapp/templates/mainapp/components/_pagination.html @@ -5,22 +5,23 @@ {% include 'mainapp/components/_pagination.html' with page_obj=page_obj show_info=True %} {% endcomment %} -{% if page_obj.has_other_pages %} +{% if page_obj %} {% endif %} + + \ No newline at end of file diff --git a/dbapp/mainapp/templates/mainapp/components/_selected_items_offcanvas.html b/dbapp/mainapp/templates/mainapp/components/_selected_items_offcanvas.html new file mode 100644 index 0000000..b940c8d --- /dev/null +++ b/dbapp/mainapp/templates/mainapp/components/_selected_items_offcanvas.html @@ -0,0 +1,60 @@ + +
+
+
Выбранные элементы
+ +
+
+
+ +
+
+ + + +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + ИмяСпутникЧаст, МГцПолоса, МГцПоляризацияСим. VМодулОСШВремя ГЛМестоположениеГеолокацияКубсатОпер. отдОбновленоКем(обн)СозданоКем(созд)
+
+
+
+
+
\ No newline at end of file diff --git a/dbapp/mainapp/templates/mainapp/objitem_detail.html b/dbapp/mainapp/templates/mainapp/objitem_detail.html new file mode 100644 index 0000000..9d08ffa --- /dev/null +++ b/dbapp/mainapp/templates/mainapp/objitem_detail.html @@ -0,0 +1,475 @@ +{% extends 'mainapp/base.html' %} +{% load static %} +{% load static leaflet_tags %} +{% load l10n %} + +{% block title %}Просмотр объекта: {{ object.name }}{% endblock %} + +{% block extra_css %} + +{% endblock %} + +{% block content %} +
+
+
+

Просмотр объекта: {{ object.name }}

+
+ Назад +
+
+
+ + +
+
+

Основная информация

+
+
+
+
+ +
{{ object.name|default:"-" }}
+
+
+
+
+ +
+ {% if object.created_at %}{{ object.created_at|date:"d.m.Y H:i" }}{% else %}-{% endif %} +
+
+
+
+
+
+
+ +
+ {% if object.created_by %}{{ object.created_by }}{% else %}-{% endif %} +
+
+
+
+
+ +
+ {% if object.updated_at %}{{ object.updated_at|date:"d.m.Y H:i" }}{% else %}-{% endif %} +
+
+
+
+
+
+
+ +
+ {% if object.updated_by %}{{ object.updated_by }}{% else %}-{% endif %} +
+
+
+
+
+ + +
+
+

ВЧ загрузка

+
+ + {% for param in object.parameters_obj.all %} +
+
+
+
+ +
{{ param.id_satellite.name|default:"-" }}
+
+
+
+
+ +
{{ param.frequency|default:"-" }}
+
+
+
+
+ +
{{ param.freq_range|default:"-" }}
+
+
+
+
+ +
{{ param.polarization.name|default:"-" }}
+
+
+
+
+
+
+ +
{{ param.bod_velocity|default:"-" }}
+
+
+
+
+ +
{{ param.modulation.name|default:"-" }}
+
+
+
+
+ +
{{ param.snr|default:"-" }}
+
+
+
+
+ +
{{ param.standard.name|default:"-" }}
+
+
+
+
+ {% empty %} +
+

Нет данных о ВЧ загрузке

+
+ {% endfor %} +
+ + +
+
+

Карта

+
+
+
+
+
+ + +
+
+

Геоданные

+
+ + {% if object.geo_obj %} + +
+
Координаты геолокации
+
+
+
+ +
+ {% if object.geo_obj.coords %}{{ object.geo_obj.coords.y|floatformat:6 }}{% else %}-{% endif %} +
+
+
+
+ +
+ {% if object.geo_obj.coords %}{{ object.geo_obj.coords.x|floatformat:6 }}{% else %}-{% endif %} +
+
+
+
+ + +
+
Координаты Кубсата
+
+
+
+ +
+ {% if object.geo_obj.coords_kupsat %}{{ object.geo_obj.coords_kupsat.x|floatformat:6 }}{% else %}-{% endif %} +
+
+
+
+
+ +
+ {% if object.geo_obj.coords_kupsat %}{{ object.geo_obj.coords_kupsat.y|floatformat:6 }}{% else %}-{% endif %} +
+
+
+
+
+ + +
+
Координаты оперативников
+
+
+
+ +
+ {% if object.geo_obj.coords_valid %}{{ object.geo_obj.coords_valid.x|floatformat:6 }}{% else %}-{% endif %} +
+
+
+
+
+ +
+ {% if object.geo_obj.coords_valid %}{{ object.geo_obj.coords_valid.y|floatformat:6 }}{% else %}-{% endif %} +
+
+
+
+
+ +
+
+
+ +
{{ object.geo_obj.location|default:"-" }}
+
+
+
+
+ +
{{ object.geo_obj.comment|default:"-" }}
+
+
+
+ +
+
+
+ +
+ {% if object.geo_obj.timestamp %}{{ object.geo_obj.timestamp|date:"d.m.Y H:i" }}{% else %}-{% endif %} +
+
+
+
+ +
+ {% if object.geo_obj.is_average %}Да{% else %}Нет{% endif %} +
+
+
+
+ +
+
+
+ +
+ {% if object.geo_obj.distance_coords_kup is not None %} + {{ object.geo_obj.distance_coords_kup|floatformat:2 }} + {% else %} + - + {% endif %} +
+
+
+
+
+ +
+ {% if object.geo_obj.distance_coords_valid is not None %} + {{ object.geo_obj.distance_coords_valid|floatformat:2 }} + {% else %} + - + {% endif %} +
+
+
+
+
+ +
+ {% if object.geo_obj.distance_kup_valid is not None %} + {{ object.geo_obj.distance_kup_valid|floatformat:2 }} + {% else %} + - + {% endif %} +
+
+
+
+ {% else %} +

Нет данных о геолокации

+ {% endif %} +
+
+ +
+ {% if user.customuser.role == 'admin' or user.customuser.role == 'moderator' %} + Редактировать + {% endif %} + Назад +
+
+{% endblock %} + +{% block extra_js %} +{{ block.super }} + +{% leaflet_js %} +{% leaflet_css %} + + + +{% endblock %} \ No newline at end of file diff --git a/dbapp/mainapp/templates/mainapp/objitem_form.html b/dbapp/mainapp/templates/mainapp/objitem_form.html index abd910d..88905a5 100644 --- a/dbapp/mainapp/templates/mainapp/objitem_form.html +++ b/dbapp/mainapp/templates/mainapp/objitem_form.html @@ -62,7 +62,7 @@

{% if object %}Редактировать объект: {{ object.name }}{% else %}Создать объект{% endif %}

- Назад + Назад
@@ -333,7 +333,7 @@
{% if object %} - Удалить + Удалить {% endif %}
{% endif %} diff --git a/dbapp/mainapp/templates/mainapp/objitem_list.html b/dbapp/mainapp/templates/mainapp/objitem_list.html index e9e0b3e..e52e3fd 100644 --- a/dbapp/mainapp/templates/mainapp/objitem_list.html +++ b/dbapp/mainapp/templates/mainapp/objitem_list.html @@ -3,10 +3,6 @@ {% block title %}Список объектов{% endblock %} {% block extra_css %}