238 lines
10 KiB
HTML
238 lines
10 KiB
HTML
{% extends "base.html" %}
|
|
{% load static i18n %}
|
|
|
|
{% block title %}{% trans "Zoom Meetings" %} - {{ block.super }}{% endblock %}
|
|
{% block extra_css %}
|
|
<style>
|
|
.meetings-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
gap: 1.5rem;
|
|
}
|
|
.meeting-card {
|
|
background: white;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
padding: 1.5rem;
|
|
border: 1px solid #e0e0e0;
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
height: 100%;
|
|
}
|
|
.meeting-card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
}
|
|
.meeting-topic {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
color: #1b8354;
|
|
margin-bottom: 1rem;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
padding-bottom: 0.5rem;
|
|
}
|
|
.meeting-detail {
|
|
display: flex;
|
|
margin-bottom: 0.75rem;
|
|
align-items: flex-start;
|
|
}
|
|
.detail-label {
|
|
font-weight: 600;
|
|
min-width: 80px;
|
|
color: #666;
|
|
font-size: 0.9rem;
|
|
flex-shrink: 0;
|
|
}
|
|
.detail-value {
|
|
flex: 1;
|
|
font-size: 0.9rem;
|
|
word-break: break-word;
|
|
}
|
|
.status-badge {
|
|
display: inline-block;
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 9999px;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
}
|
|
.status-waiting {
|
|
background: #fff8e1;
|
|
color: #ff8f00;
|
|
}
|
|
.status-started {
|
|
background: #d4edda;
|
|
color: #155724;
|
|
}
|
|
.status-ended {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
}
|
|
.actions {
|
|
margin-top: 1rem;
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
.btn-small {
|
|
padding: 0.25rem 0.5rem;
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.meetings-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
.meeting-detail {
|
|
flex-direction: column;
|
|
gap: 0.25rem;
|
|
}
|
|
.detail-label {
|
|
min-width: auto;
|
|
}
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<h1 class="h3 mb-0">
|
|
{% include "icons/meeting.html" %}
|
|
{% trans "Zoom Meetings" %}
|
|
</h1>
|
|
<div class="d-flex gap-2 align-items-center">
|
|
<!-- Search Form -->
|
|
{% include "includes/search_form.html" with search_query=search_query %}
|
|
|
|
<a href="{% url 'create_meeting' %}" class="btn btn-primary">
|
|
<svg class="heroicon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M12 4v16m8-8H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
{% trans "Create Meeting" %}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if meetings %}
|
|
<div class="meetings-grid">
|
|
{% for meeting in meetings %}
|
|
<div class="meeting-card">
|
|
<div class="meeting-topic">{{ meeting.topic }}</div>
|
|
|
|
<div class="meeting-detail">
|
|
<div class="detail-label">{% trans "ID" %}:</div>
|
|
<div class="detail-value">{{ meeting.meeting_id|default:meeting.id }}</div>
|
|
</div>
|
|
|
|
<div class="meeting-detail">
|
|
<div class="detail-label">{% trans "Start Time" %}:</div>
|
|
<div class="detail-value">{{ meeting.start_time|date:"M d, Y H:i" }}</div>
|
|
</div>
|
|
|
|
<div class="meeting-detail">
|
|
<div class="detail-label">{% trans "Duration" %}:</div>
|
|
<div class="detail-value">{{ meeting.duration }} minutes</div>
|
|
</div>
|
|
|
|
<div class="meeting-detail">
|
|
<div class="detail-label">{% trans "Status" %}:</div>
|
|
<div class="detail-value">
|
|
<span class="badge {% if meeting.status == 'waiting' %}bg-warning{% elif meeting.status == 'started' %}bg-success{% elif meeting.status == 'ended' %}bg-danger{% endif %}">
|
|
{% if meeting.status == 'waiting' %}
|
|
{% trans "Waiting" %}
|
|
{% elif meeting.status == 'started' %}
|
|
{% trans "Started" %}
|
|
{% elif meeting.status == 'ended' %}
|
|
{% trans "Ended" %}
|
|
{% endif %}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
{% if meeting.join_url %}
|
|
<div class="meeting-detail">
|
|
<div class="detail-label">{% trans "Join URL" %}:</div>
|
|
<div class="detail-value">
|
|
<a href="{{ meeting.join_url }}" target="_blank" class="btn btn-outline-primary btn-sm">
|
|
{% trans "Join Meeting" %}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="actions">
|
|
<a href="{% url 'meeting_details' meeting.pk %}" class="btn btn-outline-primary btn-sm" title="{% trans 'View' %}">
|
|
<svg class="heroicon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
<path d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0 8.268-2.943-9.542-7z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
</a>
|
|
<a href="{% url 'update_meeting' meeting.pk %}" class="btn btn-outline-secondary btn-sm" title="{% trans 'Update' %}">
|
|
<svg class="heroicon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
</a>
|
|
<button type="button" class="btn btn-outline-danger btn-sm" title="{% trans 'Delete' %}"
|
|
data-bs-toggle="deleteModal"
|
|
data-delete-url="{% url 'delete_meeting' meeting.pk %}"
|
|
data-item-name="{{ meeting.topic }}">
|
|
<svg class="heroicon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% if is_paginated %}
|
|
<nav aria-label="Page navigation" class="mt-4">
|
|
<ul class="pagination justify-content-center">
|
|
{% if page_obj.has_previous %}
|
|
<li class="page-item">
|
|
<a class="page-link" href="?page={{ page_obj.previous_page_number }}&search={{ search_query }}" aria-label="Previous">
|
|
<span aria-hidden="true">«</span>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
{% for num in page_obj.paginator.page_range %}
|
|
{% if page_obj.number == num %}
|
|
<li class="page-item active"><span class="page-link">{{ num }}</span></li>
|
|
{% elif num > page_obj.number|add:'-3' and num < page_obj.number|add:'3' %}
|
|
<li class="page-item">
|
|
<a class="page-link" href="?page={{ num }}&search={{ search_query }}">{{ num }}</a>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if page_obj.has_next %}
|
|
<li class="page-item">
|
|
<a class="page-link" href="?page={{ page_obj.next_page_number }}&search={{ search_query }}" aria-label="Next">
|
|
<span aria-hidden="true">»</span>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
{% endif %}
|
|
{% else %}
|
|
<div class="text-center py-5">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="text-muted mb-3" style="width: 80px;">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" />
|
|
</svg>
|
|
<p class="text-muted">{% trans "No meetings found." %}</p>
|
|
{% if user.is_staff %}
|
|
<a href="{% url 'create_meeting' %}" class="btn btn-primary mt-3">
|
|
<svg class="heroicon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M12 4v16m8-8H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
{% trans "Create Your First Meeting" %}
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|