- Created a new template for displaying a list of data files in `file_list.html`, including file details and actions for downloading and viewing file details. - Added a new template for displaying recording sessions in `session_list.html`, featuring session status, details, and action buttons for stopping recordings and viewing session details. - Introduced a legacy dashboard template `slm_legacy_dashboard.html` for sound level meter control, including a live view panel and configuration modal with dynamic content loading.
70 lines
4.4 KiB
HTML
70 lines
4.4 KiB
HTML
<!-- Project Locations List -->
|
|
{% if locations %}
|
|
<div class="space-y-3">
|
|
{% for item in locations %}
|
|
<div class="border border-gray-200 dark:border-gray-700 rounded-lg p-4 hover:border-seismo-orange transition-colors">
|
|
<div class="flex items-start justify-between gap-3">
|
|
<div class="min-w-0 flex-1">
|
|
<div class="flex items-center gap-2">
|
|
<a href="/projects/{{ project.id }}/nrl/{{ item.location.id }}"
|
|
class="font-semibold text-gray-900 dark:text-white hover:text-seismo-orange truncate">
|
|
{{ item.location.name }}
|
|
</a>
|
|
{% if item.location.location_type %}
|
|
<span class="text-xs px-2 py-0.5 rounded-full bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300">
|
|
{{ item.location.location_type|capitalize }}
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
{% if item.location.description %}
|
|
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">{{ item.location.description }}</p>
|
|
{% endif %}
|
|
{% if item.location.address %}
|
|
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">{{ item.location.address }}</p>
|
|
{% endif %}
|
|
{% if item.location.coordinates %}
|
|
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">{{ item.location.coordinates }}</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="flex items-center gap-2">
|
|
{% if item.assignment %}
|
|
<button onclick="unassignUnit('{{ item.assignment.id }}')" class="text-xs px-3 py-1 rounded-full bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300">
|
|
Unassign
|
|
</button>
|
|
{% else %}
|
|
<button onclick="openAssignModal('{{ item.location.id }}', '{{ item.location.location_type or 'sound' }}')" class="text-xs px-3 py-1 rounded-full bg-seismo-orange text-white hover:bg-seismo-navy">
|
|
Assign
|
|
</button>
|
|
{% endif %}
|
|
<button data-location='{{ {"id": item.location.id, "name": item.location.name, "description": item.location.description, "address": item.location.address, "coordinates": item.location.coordinates, "location_type": item.location.location_type} | tojson }}'
|
|
onclick="openEditLocationModal(this)"
|
|
class="text-xs px-3 py-1 rounded-full bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300">
|
|
Edit
|
|
</button>
|
|
<button onclick="deleteLocation('{{ item.location.id }}')" class="text-xs px-3 py-1 rounded-full bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300">
|
|
Delete
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-3 text-xs text-gray-500 dark:text-gray-400 flex flex-wrap gap-4">
|
|
<span>Sessions: {{ item.session_count }}</span>
|
|
{% if item.assignment and item.assigned_unit %}
|
|
<span>Assigned: {{ item.assigned_unit.id }}</span>
|
|
{% else %}
|
|
<span>No active assignment</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="text-center py-8 text-gray-500 dark:text-gray-400">
|
|
<svg class="w-12 h-12 mx-auto mb-3 opacity-50" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path>
|
|
</svg>
|
|
<p>No locations added yet</p>
|
|
</div>
|
|
{% endif %}
|