Улучшение и добавления
This commit is contained in:
@@ -40,5 +40,6 @@
|
||||
{% include 'mainapp/components/_column_toggle_item.html' with column_index=18 column_label="Стандарт" checked=False %}
|
||||
{% include 'mainapp/components/_column_toggle_item.html' with column_index=19 column_label="Тип источника" checked=True %}
|
||||
{% include 'mainapp/components/_column_toggle_item.html' with column_index=20 column_label="Sigma" checked=True %}
|
||||
{% include 'mainapp/components/_column_toggle_item.html' with column_index=21 column_label="Зеркала" checked=True %}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -47,6 +47,7 @@
|
||||
<th scope="col">Кем(обн)</th>
|
||||
<th scope="col">Создано</th>
|
||||
<th scope="col">Кем(созд)</th>
|
||||
<th scope="col">Зеркала</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="selected-items-table-body">
|
||||
|
||||
@@ -243,19 +243,36 @@
|
||||
{% if object.geo_obj.timestamp %}{{ object.geo_obj.timestamp|date:"d.m.Y H:i" }}{% else %}-{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label class="form-check-label">Усредненное значение:</label>
|
||||
<div class="readonly-field">
|
||||
{% if object.geo_obj.is_average %}Да{% else %}Нет{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label class="form-check-label">Усредненное значение:</label>
|
||||
<div class="readonly-field">
|
||||
{% if object.geo_obj.is_average %}Да{% else %}Нет{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>Нет данных о геолокации</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Зеркала:</label>
|
||||
<div class="readonly-field">
|
||||
{% if object.geo_obj.mirrors.all %}
|
||||
{% for mirror in object.geo_obj.mirrors.all %}
|
||||
{{ mirror.name }}{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>Нет данных о геолокации</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end mt-4">
|
||||
|
||||
@@ -235,6 +235,12 @@
|
||||
{% include 'mainapp/components/_form_field.html' with field=geo_form.is_average %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'mainapp/components/_form_field.html' with field=geo_form.mirrors %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -247,7 +253,6 @@
|
||||
{% leaflet_css %}
|
||||
<script src="{% static 'leaflet-markers/js/leaflet-color-markers.js' %}"></script>
|
||||
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Инициализация карты
|
||||
|
||||
@@ -334,6 +334,7 @@
|
||||
{% include 'mainapp/components/_table_header.html' with label="Стандарт" field="standard" sort=sort %}
|
||||
{% include 'mainapp/components/_table_header.html' with label="Тип источника" field="" sortable=False %}
|
||||
{% include 'mainapp/components/_table_header.html' with label="Sigma" field="" sortable=False %}
|
||||
{% include 'mainapp/components/_table_header.html' with label="Зеркала" field="" sortable=False %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -379,10 +380,11 @@
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ item.mirrors }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="26" class="text-center py-4">
|
||||
<td colspan="22" class="text-center py-4">
|
||||
{% if selected_satellite_id %}
|
||||
Нет данных для выбранных фильтров
|
||||
{% else %}
|
||||
@@ -718,8 +720,8 @@
|
||||
|
||||
// Initialize column visibility - hide creation columns by default
|
||||
function initColumnVisibility() {
|
||||
const creationDateCheckbox = document.querySelector('input[data-column="12"]');
|
||||
const creationUserCheckbox = document.querySelector('input[data-column="13"]');
|
||||
const creationDateCheckbox = document.querySelector('input[data-column="14"]');
|
||||
const creationUserCheckbox = document.querySelector('input[data-column="15"]');
|
||||
if (creationDateCheckbox) {
|
||||
creationDateCheckbox.checked = false;
|
||||
toggleColumn(creationDateCheckbox);
|
||||
@@ -731,9 +733,9 @@
|
||||
}
|
||||
|
||||
// Hide comment, is_average, and standard columns by default
|
||||
const commentCheckbox = document.querySelector('input[data-column="14"]');
|
||||
const isAverageCheckbox = document.querySelector('input[data-column="15"]');
|
||||
const standardCheckbox = document.querySelector('input[data-column="16"]');
|
||||
const commentCheckbox = document.querySelector('input[data-column="16"]');
|
||||
const isAverageCheckbox = document.querySelector('input[data-column="17"]');
|
||||
const standardCheckbox = document.querySelector('input[data-column="18"]');
|
||||
|
||||
if (commentCheckbox) {
|
||||
commentCheckbox.checked = false;
|
||||
@@ -913,10 +915,11 @@
|
||||
geo_coords: row.cells[11].textContent,
|
||||
kupsat_coords: row.cells[12].textContent,
|
||||
valid_coords: row.cells[13].textContent,
|
||||
updated_at: row.cells[17].textContent,
|
||||
updated_by: row.cells[18].textContent,
|
||||
created_at: row.cells[19].textContent,
|
||||
created_by: row.cells[20].textContent
|
||||
updated_at: row.cells[12].textContent,
|
||||
updated_by: row.cells[13].textContent,
|
||||
created_at: row.cells[14].textContent,
|
||||
created_by: row.cells[15].textContent,
|
||||
mirrors: row.cells[21].textContent
|
||||
};
|
||||
|
||||
window.selectedItems.push(rowData);
|
||||
@@ -978,6 +981,7 @@
|
||||
<td>${item.updated_by}</td>
|
||||
<td>${item.created_at}</td>
|
||||
<td>${item.created_by}</td>
|
||||
<td>${item.mirrors}</td>
|
||||
`;
|
||||
tableBody.appendChild(row);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user