From f381b4dd445406090247b2030221174ff05d2b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Mogu=C3=A9rou?= Date: Sun, 12 May 2024 18:24:32 +0200 Subject: [PATCH] =?UTF-8?q?Pr=C3=A9sentation=20du=20site?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- colloscope/models.py | 3 + colloscope/templates/dashboard.html | 15 +- colloscope/templates/marketplace.html | 7 +- colloscope/templates/table.html | 4 +- colloscope/urls.py | 19 +- colloscope/views.py | 32 +- front/__init__.py | 0 front/admin.py | 3 + front/apps.py | 6 + front/migrations/__init__.py | 0 front/models.py | 3 + front/templates/index.html | 50 + front/tests.py | 3 + front/urls.py | 8 + front/views.py | 8 + kholles_web/settings.sample.py | 5 +- kholles_web/urls.py | 9 +- locale/en/LC_MESSAGES/django.po | 1241 ------------------------- locale/fr/LC_MESSAGES/django.po | 10 + static/main.css | 44 +- static/unified-navigator | 2 +- templates/base.html | 17 +- 22 files changed, 191 insertions(+), 1298 deletions(-) create mode 100644 front/__init__.py create mode 100644 front/admin.py create mode 100644 front/apps.py create mode 100644 front/migrations/__init__.py create mode 100644 front/models.py create mode 100644 front/templates/index.html create mode 100644 front/tests.py create mode 100644 front/urls.py create mode 100644 front/views.py delete mode 100644 locale/en/LC_MESSAGES/django.po diff --git a/colloscope/models.py b/colloscope/models.py index 74ba3e8..dcfcb10 100644 --- a/colloscope/models.py +++ b/colloscope/models.py @@ -383,6 +383,9 @@ class Colle(models.Model): # func = async_to_sync(swap.notify) # func() + def week_number(self): + return self.slot.term.cls.week_number(self.datetime.date()) + def __str__(self): return f"Colle {self.slot.subject} ({self.slot.colleur}); {self.datetime} {self.slot.time} {self.slot.room}. Groupe(s) {{{'; '.join(str(groupe) for groupe in self.groups.all())}}}" diff --git a/colloscope/templates/dashboard.html b/colloscope/templates/dashboard.html index b6c9e7f..441b8db 100644 --- a/colloscope/templates/dashboard.html +++ b/colloscope/templates/dashboard.html @@ -13,30 +13,33 @@ Bienvenue {{ student }}. Votre lycée est {{ term.cls.school.description }}, et votre classe est {{ term.cls.description }}.

-

Période actuelle : {{ term }}. Votre groupe de colle est {{ group }}. Consulter le colloscope

+

Période actuelle : {{ term }}. Votre groupe de colle est {{ group }}. Consulter le colloscope

Mes colles

Exporter en .ics (ceci est un permalien public)

-

Accéder au marketplace

+

Accéder au marketplace

{% for n, lundi, colles in colles_per_sem %} {% if colles %} -

Semaine {{n}} ({{lundi}})

+

+ Semaine {{n}} ({{lundi}}) +

{% for colle in colles %}
- {{ colle.slot.subject }} ({{ colle.slot.colleur }})
    -
  • Le {{ colle.datetime|date:"l" }} {{ colle.datetime|date:"DATETIME_FORMAT" }}
  • +
  • {{ colle.slot.subject }}
  • +
  • {{ colle.slot.colleur }}
  • +
  • {{ colle.datetime|date:"l"|title }} {{ colle.datetime|date:"DATETIME_FORMAT" }}
  • {{ colle.groups.all | print_manager | safe }} ({{ colle.volume }} / {{ colle.slot.capacity }})
  • {{ colle.slot.room }}
  • {% csrf_token %} diff --git a/colloscope/templates/marketplace.html b/colloscope/templates/marketplace.html index d830207..1cb10a1 100644 --- a/colloscope/templates/marketplace.html +++ b/colloscope/templates/marketplace.html @@ -15,13 +15,14 @@
    {% for colle in colles %}
    - {{ colle.slot.subject }} ({{ colle.slot.colleur }})
      -
    • Le {{ colle.datetime|date:"l" }} {{ colle.datetime|date:"DATETIME_FORMAT" }}
    • +
    • {{ colle.slot.subject }}
    • +
    • {{ colle.slot.colleur }}
    • +
    • {{ colle.datetime|date:"l"|title }} {{ colle.datetime|date:"DATETIME_FORMAT" }}
    • {{ colle.groups.all | print_manager | safe }} ({{ colle.volume }} / {{ colle.slot.capacity }})
    • {{ colle.slot.room }}
    • - {% csrf_token %} diff --git a/colloscope/templates/table.html b/colloscope/templates/table.html index 3c617fc..76a2240 100644 --- a/colloscope/templates/table.html +++ b/colloscope/templates/table.html @@ -13,12 +13,12 @@

      Colloscope

      - Lycée : {{ term.cls.school.description }}. Classe : {{ term.cls.description }}. Retour au tableau de bord + Lycée : {{ term.cls.school.description }}. Classe : {{ term.cls.description }}. Retour au tableau de bord

      Colloscope : {{ term.description }}

      - + Changer de période :