From 926633cde3177987bb4eb5449a8276e40980d8a0 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 31 Oct 2022 09:38:39 +0100 Subject: [PATCH] =?UTF-8?q?BUT:=20=C3=A9dition=20des=20coefs:=20filtre=20p?= =?UTF-8?q?ar=20parcours?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/but/apc_edit_ue.py | 2 +- app/scodoc/sco_edit_apc.py | 7 +- app/static/css/table_editor.css | 76 ++++++++++++++++----- app/templates/pn/form_modules_ue_coefs.html | 48 +++++++++---- app/views/pn_modules.py | 43 ++++++++---- 5 files changed, 125 insertions(+), 51 deletions(-) diff --git a/app/but/apc_edit_ue.py b/app/but/apc_edit_ue.py index b7d2e4af..2222dc65 100644 --- a/app/but/apc_edit_ue.py +++ b/app/but/apc_edit_ue.py @@ -33,7 +33,7 @@ def form_ue_choix_niveau(ue: UniteEns) -> str: parcours_options.append( f"""""" ) diff --git a/app/scodoc/sco_edit_apc.py b/app/scodoc/sco_edit_apc.py index 551067d3..255448ff 100644 --- a/app/scodoc/sco_edit_apc.py +++ b/app/scodoc/sco_edit_apc.py @@ -24,15 +24,12 @@ """Édition formation APC (BUT) """ -import flask -from flask import url_for + from flask.templating import render_template -from flask import g, request -from flask_login import current_user from app import db from app.but import apc_edit_ue -from app.models import Formation, UniteEns, Matiere, Module, FormSemestre, ModuleImpl +from app.models import UniteEns, Matiere, Module, FormSemestre, ModuleImpl from app.models.validations import ScolarFormSemestreValidation from app.scodoc.sco_codes_parcours import UE_SPORT import app.scodoc.sco_utils as scu diff --git a/app/static/css/table_editor.css b/app/static/css/table_editor.css index 25d192c5..be32892c 100644 --- a/app/static/css/table_editor.css +++ b/app/static/css/table_editor.css @@ -3,10 +3,19 @@ form.semestre_selector { margin-top: 2ex; } + +form.semestre_selector>div { + display: inline-flex; +} + +form.semestre_selector>div>div { + margin-left: 16px; +} + /***************************/ /* Le tableau */ /***************************/ -.tableau{ +.tableau { display: inline-grid; grid-auto-rows: minmax(24px, auto); grid-template-columns: fit-content(50px); @@ -15,11 +24,13 @@ form.semestre_selector { background: #fffefa; margin: 10px; } -.entete{ + +.entete { background: #09c; font-weight: bold; } -.tableau>div{ + +.tableau>div { padding: 4px 8px; border-radius: 4px; border: 1px solid #999; @@ -27,46 +38,69 @@ form.semestre_selector { grid-row: var(--y) / span var(--nbY); } -[data-editable="true"]{ +[data-editable="true"] { cursor: pointer; } + /*****************/ /* Styles ScoDoc */ /*****************/ div.title_ue { background-color: #b7d2fa; } -.tableau>div.title_mod { - -} + +.tableau>div.title_mod {} + div.title_RESSOURCE { background-color: #f8c844; } + div.title_SAE { background-color: #c6ffab; } -div.title_STANDARD, .champs_STANDARD { + +div.title_STANDARD, +.champs_STANDARD { background-color: #fefefe; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='32' viewBox='0 0 16 32'%3E%3Cg fill='%239C92AC' fill-opacity='0.21'%3E%3Cpath fill-rule='evenodd' d='M0 24h4v2H0v-2zm0 4h6v2H0v-2zm0-8h2v2H0v-2zM0 0h4v2H0V0zm0 4h2v2H0V4zm16 20h-6v2h6v-2zm0 4H8v2h8v-2zm0-8h-4v2h4v-2zm0-20h-6v2h6V0zm0 4h-4v2h4V4zm-2 12h2v2h-2v-2zm0-8h2v2h-2V8zM2 8h10v2H2V8zm0 8h10v2H2v-2zm-2-4h14v2H0v-2zm4-8h6v2H4V4zm0 16h6v2H4v-2zM6 0h2v2H6V0zm0 24h2v2H6v-2z'/%3E%3C/g%3E%3C/svg%3E"); } + div.title_MALUS { background-color: #ff4700; } + .sums { background: #ddd; } + /***************************/ /* Statut des cellules */ /***************************/ -.selected{ outline: 1px solid #c09; } -.modifying{ outline: 2px dashed #c09; } -.wait{ outline: 2px solid #c90; } -.good{ outline: 2px solid #9c0; } -.modified { font-weight: bold; color:indigo} +.selected { + outline: 1px solid #c09; +} + +.modifying { + outline: 2px dashed #c09; +} + +.wait { + outline: 2px solid #c90; +} + +.good { + outline: 2px solid #9c0; +} + +.modified { + font-weight: bold; + color: indigo +} + /***************************/ /* Message */ /***************************/ -.message{ +.message { position: fixed; bottom: 100%; left: 50%; @@ -80,7 +114,13 @@ div.title_MALUS { animation: message 3s; transform: translate(-50%, 0); } -@keyframes message{ - 20%{transform: translate(-50%, 100%)} - 80%{transform: translate(-50%, 100%)} -} + +@keyframes message { + 20% { + transform: translate(-50%, 100%) + } + + 80% { + transform: translate(-50%, 100%) + } +} \ No newline at end of file diff --git a/app/templates/pn/form_modules_ue_coefs.html b/app/templates/pn/form_modules_ue_coefs.html index 75ed3de6..c2765234 100644 --- a/app/templates/pn/form_modules_ue_coefs.html +++ b/app/templates/pn/form_modules_ue_coefs.html @@ -1,32 +1,50 @@ {# -*- mode: jinja-html -*- #}

{% if not read_only %}Édition des c{% else %}C{%endif%}oefficients des modules vers les UEs

-{% if not read_only %} + {% if not read_only %}

Double-cliquer pour changer une valeur. - Les valeurs sont automatiquement enregistrées au fur et à mesure. + Les valeurs sont automatiquement enregistrées au fur et à mesure. +

+ {% endif %} +

Chaque ligne représente une ressource ou SAÉ, et chaque colonne une Unité d'Enseignement (UE).

-{% endif %} -

Chaque ligne représente une ressource ou SAÉ, et chaque colonne une Unité d'Enseignement (UE). -

-
Semestre: - + - + {% for i in semestre_ids %} + + {% endfor %} + + + + {% if formation.referentiel_competence %} +
Parcours: + +
+ {% endif %} +
+ revenir à la formation + }}">revenir à la formation +
+