forked from ScoDoc/ScoDoc
BUT: améliore page éditon UEs
This commit is contained in:
parent
3a051672c3
commit
b1f51ce7f4
@ -8,13 +8,13 @@
|
|||||||
Edition associations UE <-> Ref. Compétence
|
Edition associations UE <-> Ref. Compétence
|
||||||
"""
|
"""
|
||||||
from flask import g, url_for
|
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
|
from app.scodoc import codes_cursus
|
||||||
|
|
||||||
|
|
||||||
def form_ue_choix_niveau(ue: UniteEns) -> str:
|
def form_ue_choix_niveau(ue: UniteEns) -> str:
|
||||||
"""Form. HTML pour associer une UE à un niveau de compétence.
|
"""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:
|
if ue.type != codes_cursus.UE_STANDARD:
|
||||||
return ""
|
return ""
|
||||||
@ -101,7 +101,7 @@ def get_ue_niveaux_options_html(ue: UniteEns) -> str:
|
|||||||
options.append(
|
options.append(
|
||||||
f"""<option value="{n.id}" {
|
f"""<option value="{n.id}" {
|
||||||
'selected' if ue.niveau_competence == n else ''}
|
'selected' if ue.niveau_competence == n else ''}
|
||||||
>{n.annee} {n.competence.titre_long}
|
>{n.annee} {n.competence.titre} / {n.competence.titre_long}
|
||||||
niveau {n.ordre}</option>"""
|
niveau {n.ordre}</option>"""
|
||||||
)
|
)
|
||||||
options.append("""</optgroup>""")
|
options.append("""</optgroup>""")
|
||||||
@ -116,7 +116,7 @@ def get_ue_niveaux_options_html(ue: UniteEns) -> str:
|
|||||||
options.append(
|
options.append(
|
||||||
f"""<option value="{n.id}" {'selected'
|
f"""<option value="{n.id}" {'selected'
|
||||||
if ue.niveau_competence == n else ''}
|
if ue.niveau_competence == n else ''}
|
||||||
{disabled}>{n.annee} {n.competence.titre_long}
|
{disabled}>{n.annee} {n.competence.titre} / {n.competence.titre_long}
|
||||||
niveau {n.ordre}</option>"""
|
niveau {n.ordre}</option>"""
|
||||||
)
|
)
|
||||||
options.append("""</optgroup>""")
|
options.append("""</optgroup>""")
|
||||||
|
@ -855,7 +855,7 @@ du programme" (menu "Semestre") si vous avez un semestre en cours);
|
|||||||
<div class="formation_ue_list">
|
<div class="formation_ue_list">
|
||||||
<div class="ue_list_tit">Programme pédagogique:</div>
|
<div class="ue_list_tit">Programme pédagogique:</div>
|
||||||
<form>
|
<form>
|
||||||
<input type="checkbox" class="sco_tag_checkbox">montrer les tags</input>
|
<input type="checkbox" class="sco_tag_checkbox">montrer les tags des modules</input>
|
||||||
</form>
|
</form>
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
@ -21,6 +21,8 @@ table.table_niveaux_parcours tr th:first-child {
|
|||||||
table.table_niveaux_parcours th {
|
table.table_niveaux_parcours th {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: white;
|
color: white;
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.table_niveaux_parcours tr.parcours_but {
|
table.table_niveaux_parcours tr.parcours_but {
|
||||||
|
@ -2190,16 +2190,23 @@ span.explication {
|
|||||||
|
|
||||||
div.formation_ue_list {
|
div.formation_ue_list {
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
|
background-color: rgb(232, 249, 255);
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.formation_list_ues_titre {
|
div.formation_list_ues_titre {
|
||||||
|
padding-top: 6px;
|
||||||
|
padding-bottom: 6px;
|
||||||
padding-left: 24px;
|
padding-left: 24px;
|
||||||
padding-right: 24px;
|
padding-right: 24px;
|
||||||
font-size: 120%;
|
font-size: 120%;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
border-top-right-radius: 18px;
|
||||||
|
border-top-left-radius: 18px;
|
||||||
|
background-color: #0051a9;
|
||||||
|
color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.formation_list_modules,
|
div.formation_list_modules,
|
||||||
@ -2216,6 +2223,8 @@ div.formation_list_ues {
|
|||||||
margin-top: 20px
|
margin-top: 20px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.formation_list_ues_content {}
|
||||||
|
|
||||||
div.formation_list_modules {
|
div.formation_list_modules {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
@ -1,88 +1,90 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{# Édition liste UEs APC #}
|
{# Édition liste UEs APC #}
|
||||||
|
{% for semestre_idx in semestre_ids %}
|
||||||
<div class="formation_list_ues">
|
<div class="formation_list_ues">
|
||||||
<div class="formation_list_ues_titre">Unités d'Enseignement (UEs)</div>
|
<div class="formation_list_ues_titre">Unités d'Enseignement
|
||||||
{% for semestre_idx in semestre_ids %}
|
semestre {{semestre_idx}} - {{"%g"|format(ects_by_sem[semestre_idx]) | safe}} ECTS
|
||||||
<div class="formation_list_ues_sem">Semestre S{{semestre_idx}} (ECTS: {{ects_by_sem[semestre_idx] | safe}})</div>
|
</div>
|
||||||
<ul class="apc_ue_list">
|
<div class="formation_list_ues_content">
|
||||||
{% for ue in ues_by_sem[semestre_idx] %}
|
<ul class="apc_ue_list">
|
||||||
<li class="notes_ue_list">
|
{% for ue in ues_by_sem[semestre_idx] %}
|
||||||
{% if editable and not loop.first %}
|
<li class="notes_ue_list">
|
||||||
<a href="{{ url_for('notes.ue_move',
|
{% if editable and not loop.first %}
|
||||||
scodoc_dept=g.scodoc_dept, ue_id=ue.id, after=0 )
|
<a href="{{ url_for('notes.ue_move',
|
||||||
}}" class="aud">{{icons.arrow_up|safe}}</a>
|
scodoc_dept=g.scodoc_dept, ue_id=ue.id, after=0 )
|
||||||
{% else %}
|
}}" class="aud">{{icons.arrow_up|safe}}</a>
|
||||||
{{icons.arrow_none|safe}}
|
{% else %}
|
||||||
{% endif %}
|
{{icons.arrow_none|safe}}
|
||||||
{% if editable and not loop.last %}
|
{% endif %}
|
||||||
<a href="{{ url_for('notes.ue_move',
|
{% if editable and not loop.last %}
|
||||||
scodoc_dept=g.scodoc_dept, ue_id=ue.id, after=1 )
|
<a href="{{ url_for('notes.ue_move',
|
||||||
}}" class="aud">{{icons.arrow_down|safe}}</a>
|
scodoc_dept=g.scodoc_dept, ue_id=ue.id, after=1 )
|
||||||
{% else %}
|
}}" class="aud">{{icons.arrow_down|safe}}</a>
|
||||||
{{icons.arrow_none|safe}}
|
{% else %}
|
||||||
{% endif %}
|
{{icons.arrow_none|safe}}
|
||||||
</span>
|
{% endif %}
|
||||||
|
|
||||||
<a class="smallbutton" href="{{ url_for('notes.ue_delete',
|
|
||||||
scodoc_dept=g.scodoc_dept, ue_id=ue.id)
|
|
||||||
}}">{% if editable and not ue.modules.count() %}{{icons.delete|safe}}{% else
|
|
||||||
%}{{icons.delete_disabled|safe}}{% endif %}</a>
|
|
||||||
|
|
||||||
<span class="ue_type_{{ue.type}}">
|
|
||||||
<span class="ue_color_indicator" style="background:{{
|
|
||||||
ue.color if ue.color is not none else 'blue'}}"></span>
|
|
||||||
<b>{{ue.acronyme}} <a class="discretelink" href="{{
|
|
||||||
url_for('notes.ue_infos', scodoc_dept=g.scodoc_dept, ue_id=ue.id)}}" title="{{ue.acronyme}}: {{
|
|
||||||
('pas de compétence associée'
|
|
||||||
if ue.niveau_competence is none
|
|
||||||
else 'compétence ' + ue.niveau_competence.annee + ' ' + ue.niveau_competence.competence.titre_long)
|
|
||||||
if ue.type == 0
|
|
||||||
else ''
|
|
||||||
}}">{{ue.titre}}</a>
|
|
||||||
</b>
|
|
||||||
{% set virg = joiner(", ") %}
|
|
||||||
<span class="ue_code">(
|
|
||||||
{%- if ue.ue_code -%}{{ virg() }}code {{ue.ue_code}} {%- endif -%}
|
|
||||||
{{ virg() }}
|
|
||||||
{%- if ue.type == 0 -%}
|
|
||||||
{{ue.ects
|
|
||||||
if ue.ects is not none
|
|
||||||
else '<span class="missing_ue_ects">aucun</span>'|safe
|
|
||||||
}} ECTS
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if ue.code_apogee -%}
|
|
||||||
{{ virg() }} Apo {{ue.code_apogee}}
|
|
||||||
{%- endif -%}
|
|
||||||
)
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</span>
|
<a class="smallbutton" href="{{ url_for('notes.ue_delete',
|
||||||
|
scodoc_dept=g.scodoc_dept, ue_id=ue.id)
|
||||||
|
}}">{% if editable and not ue.modules.count() %}{{icons.delete|safe}}{% else
|
||||||
|
%}{{icons.delete_disabled|safe}}{% endif %}</a>
|
||||||
|
|
||||||
{% if editable and not ue.is_locked() %}
|
<span class="ue_type_{{ue.type}}">
|
||||||
<a class="stdlink" href="{{ url_for('notes.ue_edit',
|
<span class="ue_color_indicator" style="background:{{
|
||||||
scodoc_dept=g.scodoc_dept, ue_id=ue.id)
|
ue.color if ue.color is not none else 'blue'}}"></span>
|
||||||
}}">modifier</a>
|
<b>{{ue.acronyme}} <a class="discretelink" href="{{
|
||||||
{% endif %}
|
url_for('notes.ue_infos', scodoc_dept=g.scodoc_dept, ue_id=ue.id)}}" title="{{ue.acronyme}}: {{
|
||||||
|
('pas de compétence associée'
|
||||||
|
if ue.niveau_competence is none
|
||||||
|
else 'compétence ' + ue.niveau_competence.annee + ' ' + ue.niveau_competence.competence.titre_long)
|
||||||
|
if ue.type == 0
|
||||||
|
else ''
|
||||||
|
}}">{{ue.titre}}</a>
|
||||||
|
</b>
|
||||||
|
{% set virg = joiner(", ") %}
|
||||||
|
<span class="ue_code">(
|
||||||
|
{%- if ue.ue_code -%}{{ virg() }}code {{ue.ue_code}} {%- endif -%}
|
||||||
|
{{ virg() }}
|
||||||
|
{%- if ue.type == 0 -%}
|
||||||
|
{{ue.ects
|
||||||
|
if ue.ects is not none
|
||||||
|
else '<span class="missing_ue_ects">aucun</span>'|safe
|
||||||
|
}} ECTS
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if ue.code_apogee -%}
|
||||||
|
{{ virg() }} Apo {{ue.code_apogee}}
|
||||||
|
{%- endif -%}
|
||||||
|
)
|
||||||
|
</span>
|
||||||
|
|
||||||
{{ form_ue_choix_niveau(ue)|safe }}
|
</span>
|
||||||
|
|
||||||
|
{% if editable and not ue.is_locked() %}
|
||||||
|
<a class="stdlink" href="{{ url_for('notes.ue_edit',
|
||||||
|
scodoc_dept=g.scodoc_dept, ue_id=ue.id)
|
||||||
|
}}">modifier</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ form_ue_choix_niveau(ue)|safe }}
|
||||||
|
|
||||||
|
|
||||||
{% if ue.type == 1 and ue.modules.count() == 0 %}
|
{% if ue.type == 1 and ue.modules.count() == 0 %}
|
||||||
<span class="warning" title="pas de module, donc pas de bonus calculé">aucun module rattaché !</span>
|
<span class="warning" title="pas de module, donc pas de bonus calculé">aucun module rattaché !</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% if editable %}
|
{% if editable %}
|
||||||
<ul>
|
<ul>
|
||||||
<li class="notes_ue_list notes_ue_list_add"><a class="stdlink" href="{{
|
<li class="notes_ue_list notes_ue_list_add"><a class="stdlink" href="{{
|
||||||
url_for('notes.ue_create',
|
url_for('notes.ue_create',
|
||||||
scodoc_dept=g.scodoc_dept,
|
scodoc_dept=g.scodoc_dept,
|
||||||
formation_id=formation.id,
|
formation_id=formation.id,
|
||||||
default_semestre_idx=semestre_idx,
|
default_semestre_idx=semestre_idx,
|
||||||
)}}">ajouter une UE</a>
|
)}}">ajouter une UE</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user