4 lines
2.8 KiB
HTML
4 lines
2.8 KiB
HTML
{% extends "base.html" %}{% block title %}Planning des salles{% endblock %}{% block content %}
|
||
<div class="container-fluid main-content"><div class="d-flex justify-content-between align-items-center mb-3"><div><h1 class="h3">Planning interne des salles</h1><p class="text-muted">Les créneaux restent utilisables sans Pronote. Leur provenance est indiquée pour vous aider à les comprendre.</p></div><a class="btn btn-primary" href="{{ url_for('planning.room_schedule_new') }}"><i class="bi bi-plus-lg"></i> Ajouter un créneau</a></div>
|
||
<form class="row g-2 mb-3"><div class="col-md-6"><label class="form-label" for="room_id">Salle</label><select id="room_id" name="room_id" class="form-select"><option value="">Choisir une salle</option>{% for room in rooms %}<option value="{{ room.id }}" {% if selected_room_id == room.id %}selected{% endif %}>{{ room.full_name }}</option>{% endfor %}</select></div><div class="col-md-2 align-self-end"><button class="btn btn-outline-primary">Afficher</button></div></form>
|
||
{% if selected_room_id %}<div class="table-responsive table-responsive-stack"><table class="table"><thead><tr><th>Jour</th><th>Horaires</th><th>Libellé</th><th>Origine</th><th>Protection</th><th>Action</th></tr></thead><tbody>{% for item in schedules %}<tr><td data-label="Jour">{{ item.day_of_week }}</td><td data-label="Horaires">{{ item.start_time }}–{{ item.end_time }}</td><td data-label="Libellé">{{ item.course_name or item.subject or item.event_type }}{% if item.conflict_note %}<br><span class="badge bg-warning text-dark">Conflit à résoudre</span><br><small>{{ item.conflict_note }}</small>{% endif %}</td><td data-label="Origine">{% if item.source == 'pronote' %}Mis à jour par Pronote{% elif item.source == 'import' %}Importé{% else %}Saisi manuellement{% endif %}</td><td data-label="Protection">{% if item.protected_from_sync %}Conservé lors des synchronisations{% else %}Peut être repris par Pronote{% endif %}</td><td data-label="Action"><form method="post" action="{{ url_for('planning.room_schedule_protect', id=item.id) }}" class="d-inline"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="protected_from_sync" value="{% if not item.protected_from_sync %}on{% endif %}"><button class="btn btn-sm btn-outline-secondary">{% if item.protected_from_sync %}Déprotéger{% else %}Protéger{% endif %}</button></form>{% if item.source == 'pronote' %}<form method="post" action="{{ url_for('planning.room_schedule_disable', id=item.id) }}" class="d-inline"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><button class="btn btn-sm btn-outline-danger">Désactiver</button></form>{% endif %}</td></tr>{% endfor %}{% if not schedules %}<tr><td colspan="6">Aucun créneau actif pour cette salle.</td></tr>{% endif %}</tbody></table></div>{% endif %}</div>{% endblock %}
|