From b1f51ce7f49cacf7a3494c759cb745257004e40f Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 30 Mar 2023 00:00:14 +0200 Subject: [PATCH] =?UTF-8?q?BUT:=20am=C3=A9liore=20page=20=C3=A9diton=20UEs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/but/apc_edit_ue.py | 8 +- app/scodoc/sco_edit_ue.py | 2 +- app/static/css/refcomp_parcours_niveaux.css | 2 + app/static/css/scodoc.css | 9 + app/templates/pn/form_ues.j2 | 158 +- .../scodoc_formation_BUT_GC-CD_v2.xml | 1531 +++++------------ 6 files changed, 493 insertions(+), 1217 deletions(-) diff --git a/app/but/apc_edit_ue.py b/app/but/apc_edit_ue.py index bd8bb1b3..1e3fbce2 100644 --- a/app/but/apc_edit_ue.py +++ b/app/but/apc_edit_ue.py @@ -8,13 +8,13 @@ Edition associations UE <-> Ref. Compétence """ from flask import g, url_for -from app.models import ApcReferentielCompetences, Formation, UniteEns +from app.models import ApcReferentielCompetences, UniteEns from app.scodoc import codes_cursus def form_ue_choix_niveau(ue: UniteEns) -> str: """Form. HTML pour associer une UE à un niveau de compétence. - Le menu select lui meême est vide et rempli en JS par appel à get_ue_niveaux_options_html + Le menu select lui même est vide et rempli en JS par appel à get_ue_niveaux_options_html """ if ue.type != codes_cursus.UE_STANDARD: return "" @@ -101,7 +101,7 @@ def get_ue_niveaux_options_html(ue: UniteEns) -> str: options.append( f"""""" ) options.append("""""") @@ -116,7 +116,7 @@ def get_ue_niveaux_options_html(ue: UniteEns) -> str: options.append( f"""""" ) options.append("""""") diff --git a/app/scodoc/sco_edit_ue.py b/app/scodoc/sco_edit_ue.py index ab8658e7..9de82d14 100644 --- a/app/scodoc/sco_edit_ue.py +++ b/app/scodoc/sco_edit_ue.py @@ -855,7 +855,7 @@ du programme" (menu "Semestre") si vous avez un semestre en cours);
Programme pédagogique:
- montrer les tags + montrer les tags des modules
""" ) diff --git a/app/static/css/refcomp_parcours_niveaux.css b/app/static/css/refcomp_parcours_niveaux.css index 8f0dfb91..39c47b07 100644 --- a/app/static/css/refcomp_parcours_niveaux.css +++ b/app/static/css/refcomp_parcours_niveaux.css @@ -21,6 +21,8 @@ table.table_niveaux_parcours tr th:first-child { table.table_niveaux_parcours th { text-align: center; color: white; + padding-left: 4px; + padding-right: 4px; } table.table_niveaux_parcours tr.parcours_but { diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index 34c9d05e..79269a4d 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -2190,16 +2190,23 @@ span.explication { div.formation_ue_list { border: 1px solid black; + background-color: rgb(232, 249, 255); margin-top: 5px; margin-right: 12px; padding-left: 5px; } div.formation_list_ues_titre { + padding-top: 6px; + padding-bottom: 6px; padding-left: 24px; padding-right: 24px; font-size: 120%; font-weight: bold; + border-top-right-radius: 18px; + border-top-left-radius: 18px; + background-color: #0051a9; + color: #eee; } div.formation_list_modules, @@ -2216,6 +2223,8 @@ div.formation_list_ues { margin-top: 20px } +div.formation_list_ues_content {} + div.formation_list_modules { margin-top: 20px; } diff --git a/app/templates/pn/form_ues.j2 b/app/templates/pn/form_ues.j2 index dfe5856a..1c2d74bf 100644 --- a/app/templates/pn/form_ues.j2 +++ b/app/templates/pn/form_ues.j2 @@ -1,88 +1,90 @@ -{# -*- mode: jinja-html -*- #} {# Édition liste UEs APC #} +{% for semestre_idx in semestre_ids %}
-
Unités d'Enseignement (UEs)
- {% for semestre_idx in semestre_ids %} -
Semestre S{{semestre_idx}} (ECTS: {{ects_by_sem[semestre_idx] | safe}})
-
    - {% for ue in ues_by_sem[semestre_idx] %} -
  • - {% if editable and not loop.first %} - {{icons.arrow_up|safe}} - {% else %} - {{icons.arrow_none|safe}} - {% endif %} - {% if editable and not loop.last %} - {{icons.arrow_down|safe}} - {% else %} - {{icons.arrow_none|safe}} - {% endif %} - - - {% if editable and not ue.modules.count() %}{{icons.delete|safe}}{% else - %}{{icons.delete_disabled|safe}}{% endif %} - - - - {{ue.acronyme}} {{ue.titre}} - - {% set virg = joiner(", ") %} - ( - {%- if ue.ue_code -%}{{ virg() }}code {{ue.ue_code}} {%- endif -%} - {{ virg() }} - {%- if ue.type == 0 -%} - {{ue.ects - if ue.ects is not none - else 'aucun'|safe - }} ECTS - {%- endif -%} - {%- if ue.code_apogee -%} - {{ virg() }} Apo {{ue.code_apogee}} - {%- endif -%} - ) +
    Unités d'Enseignement + semestre {{semestre_idx}}  -  {{"%g"|format(ects_by_sem[semestre_idx]) | safe}} ECTS +
    +
    +
      + {% for ue in ues_by_sem[semestre_idx] %} +
    • + {% if editable and not loop.first %} + {{icons.arrow_up|safe}} + {% else %} + {{icons.arrow_none|safe}} + {% endif %} + {% if editable and not loop.last %} + {{icons.arrow_down|safe}} + {% else %} + {{icons.arrow_none|safe}} + {% endif %} - + {% if editable and not ue.modules.count() %}{{icons.delete|safe}}{% else + %}{{icons.delete_disabled|safe}}{% endif %} - {% if editable and not ue.is_locked() %} - modifier - {% endif %} + + + {{ue.acronyme}} {{ue.titre}} + + {% set virg = joiner(", ") %} + ( + {%- if ue.ue_code -%}{{ virg() }}code {{ue.ue_code}} {%- endif -%} + {{ virg() }} + {%- if ue.type == 0 -%} + {{ue.ects + if ue.ects is not none + else 'aucun'|safe + }} ECTS + {%- endif -%} + {%- if ue.code_apogee -%} + {{ virg() }} Apo {{ue.code_apogee}} + {%- endif -%} + ) + - {{ form_ue_choix_niveau(ue)|safe }} + + + {% if editable and not ue.is_locked() %} + modifier + {% endif %} + + {{ form_ue_choix_niveau(ue)|safe }} - {% if ue.type == 1 and ue.modules.count() == 0 %} - aucun module rattaché ! - {% endif %} -
    • - {% endfor %} -
    + {% if ue.type == 1 and ue.modules.count() == 0 %} + aucun module rattaché ! + {% endif %} +
  • + {% endfor %} +
{% if editable %} - + {% endif %} - {% endfor %} -
\ No newline at end of file +
+ +{% endfor %} diff --git a/tests/ressources/formations/scodoc_formation_BUT_GC-CD_v2.xml b/tests/ressources/formations/scodoc_formation_BUT_GC-CD_v2.xml index 8a2e6992..7817164c 100644 --- a/tests/ressources/formations/scodoc_formation_BUT_GC-CD_v2.xml +++ b/tests/ressources/formations/scodoc_formation_BUT_GC-CD_v2.xml @@ -1,1597 +1,860 @@ - - + + - - - - - + + + + + + + - + + + - - - - - + + + + + + + - - - - - + + + + + + + - - - - - + + + + + + + - + + + - + + + - + + + + - + - + + + - + + + - + + + - + - + + + - + + + - + + + - + + + - + - + + + - + + + - + - + + + - - + + + + - + + + - + + + - + - + + + - - - - - + + + + + + + - - - - - + + + + + + + - - - - - + + + + + + + - + + + - + + + - - - - - + + + + + + + + + - - + - + + + - + + + - - + + + + - + + + - + + + - + - + + + - + + + - + + + - + + + - + - + + + - - - - - + + + + + - + + + - + - + + + - - + + + + - + + + - + - - - - - + + + + + - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - + - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - - + - + - + - - - - - - + - - - - - - - - - + - - + - - - - - - + - - - - - - + - + - + - - - - - - - + + - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - + - - - - - + - - - - - + - - - - - + - - - - - + - - - - - + - + - + - - - - - - - - - - - - - - + - - - - - - - - + - - - - - - - - + - - - - - - - - + - + - + - - - - - - - - - - - - + - - - - - - + - - - - - - + - - - - - - + - + - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - + + + + + + + - + - - - - - - - - - - - - + - - - - - + - - - - - - + - - - - - - + - + - + - - - - - - - - - - - - + - - - - - - + - - - - - - + - - - - - - + - + - + - - - - - - + - - - - - - + - - - - - - - - - - + - - - - - + - - - - - + - - - - - + - - - - - + - - - - - + - - - - - + - - - - - + - + - + - - - - - - - - - - - - - - - - + - - - - - - - - + - - - - - - - - + - - - - - - - - + - + - + - - - - - - - + - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - + - + - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - + + + - - - - - - - - - - - + - - - - - - - + - - - - - - - - - - - - + - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + - - - - - - + - - - - - - - - - - - - + - - - - - - + - - - - - - + - + + - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - + - - - - - + - + - + - - - - - - - - - - - - - - - - + - - - - - - - - + - - - - - - - - + - + - - - - - - - + - - - - - - - - + - - - - - - + - - - - - - + - + + - + + - + + - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - + + - + +