forked from ScoDoc/ScoDoc
Templates: partition_editor, ue_table, evaluation_listenotes
This commit is contained in:
parent
3cecfbb697
commit
b16d519362
@ -764,20 +764,6 @@ def ue_table(formation_id=None, semestre_idx=1, msg=""): # was ue_list
|
||||
"delete_small_dis_img", title="Suppression impossible (module utilisé)"
|
||||
)
|
||||
H = [
|
||||
html_sco_header.sco_header(
|
||||
cssstyles=html_sco_header.BOOTSTRAP_MULTISELECT_CSS
|
||||
+ ["libjs/jQuery-tagEditor/jquery.tag-editor.css", "css/ue_table.css"],
|
||||
javascripts=html_sco_header.BOOTSTRAP_MULTISELECT_JS
|
||||
+ [
|
||||
"libjs/jinplace-1.2.1.min.js",
|
||||
"js/ue_list.js",
|
||||
"js/edit_ue.js",
|
||||
"libjs/jQuery-tagEditor/jquery.tag-editor.min.js",
|
||||
"libjs/jQuery-tagEditor/jquery.caret.min.js",
|
||||
"js/module_tag_editor.js",
|
||||
],
|
||||
page_title=f"Formation {formation.acronyme} v{formation.version}",
|
||||
),
|
||||
f"""<h2>{formation.html()} {lockicon}
|
||||
</h2>
|
||||
""",
|
||||
@ -1068,8 +1054,22 @@ du programme" (menu "Semestre") si vous avez un semestre en cours);
|
||||
warn, _ = sco_formsemestre_validation.check_formation_ues(formation)
|
||||
H.append(warn)
|
||||
|
||||
H.append(html_sco_header.sco_footer())
|
||||
return "".join(H)
|
||||
return render_template(
|
||||
"sco_page_dept.j2",
|
||||
content="".join(H),
|
||||
page_title=f"Formation {formation.acronyme} v{formation.version}",
|
||||
cssstyles=html_sco_header.BOOTSTRAP_MULTISELECT_CSS
|
||||
+ ["libjs/jQuery-tagEditor/jquery.tag-editor.css", "css/ue_table.css"],
|
||||
javascripts=html_sco_header.BOOTSTRAP_MULTISELECT_JS
|
||||
+ [
|
||||
"libjs/jinplace-1.2.1.min.js",
|
||||
"js/ue_list.js",
|
||||
"js/edit_ue.js",
|
||||
"libjs/jQuery-tagEditor/jquery.tag-editor.min.js",
|
||||
"libjs/jQuery-tagEditor/jquery.caret.min.js",
|
||||
"js/module_tag_editor.js",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
def _html_select_semestre_idx(formation_id, semestre_ids, semestre_idx):
|
||||
|
@ -13,6 +13,9 @@
|
||||
<!-- Bootstrap -->
|
||||
<link href="{{scu.STATIC_DIR}}/libjs/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||
<link type="text/css" rel="stylesheet" href="{{scu.STATIC_DIR}}/libjs/bootstrap-multiselect-1.1.2/bootstrap-multiselect.min.css">
|
||||
{% for css in cssstyles %}
|
||||
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/{{css}}">
|
||||
{% endfor %}
|
||||
{%- endblock styles %}
|
||||
{%- endblock head %}
|
||||
</head>
|
||||
|
@ -71,9 +71,8 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container flashes">
|
||||
{% include "flashed_messages.j2" %}
|
||||
</div>
|
||||
|
||||
{% include "flashed_messages.j2" %}
|
||||
|
||||
{# application content needs to be provided in the app_content block #}
|
||||
<div class="container">
|
||||
|
@ -1,15 +1,32 @@
|
||||
{# -*- mode: jinja-html -*- #}
|
||||
{% extends "sco_page.j2" %}
|
||||
|
||||
{% if not is_edt_configured %}
|
||||
<style>
|
||||
span.calendarEdit {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
{% endif %}
|
||||
{% block title %}
|
||||
Partitions de {{ formsemestre.titre_annee() }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block styles %}
|
||||
{{ super() }}
|
||||
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/css/partition_editor.css">
|
||||
|
||||
{% if not is_edt_configured %}
|
||||
<style>
|
||||
span.calendarEdit {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script src="{{scu.STATIC_DIR}}/js/partition_editor.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block app_content %}
|
||||
<h1>{% if not read_only %}Édition des p{% else %}P{%endif%}artitions</h1>
|
||||
|
||||
<h2></h2>
|
||||
<main>
|
||||
<div class="wait"></div>
|
||||
|
||||
@ -1024,3 +1041,4 @@ span.calendarEdit {
|
||||
}
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -1762,19 +1762,18 @@ def evaluation_listenotes():
|
||||
raise ScoValueError("evaluation_listenotes: id invalides !") from exc
|
||||
|
||||
fmt = vals.get("fmt", "html")
|
||||
html_content, page_title = sco_liste_notes.do_evaluation_listenotes(
|
||||
content, page_title = sco_liste_notes.do_evaluation_listenotes(
|
||||
evaluation_id=evaluation_id, moduleimpl_id=moduleimpl_id, fmt=fmt
|
||||
)
|
||||
if fmt == "html":
|
||||
H = html_sco_header.sco_header(
|
||||
page_title=page_title,
|
||||
return render_template(
|
||||
"sco_page.j2",
|
||||
content=content,
|
||||
title=page_title,
|
||||
cssstyles=["css/verticalhisto.css"],
|
||||
javascripts=["js/etud_info.js"],
|
||||
)
|
||||
F = html_sco_header.sco_footer()
|
||||
return H + html_content + F
|
||||
else:
|
||||
return html_content
|
||||
return content
|
||||
|
||||
|
||||
sco_publish(
|
||||
|
@ -944,27 +944,15 @@ def partition_editor(formsemestre_id: int, edit_partition=False):
|
||||
formsemestre: FormSemestre = FormSemestre.query.get_or_404(formsemestre_id)
|
||||
edit_partition = bool(int(edit_partition)) if edit_partition else False
|
||||
formsemestre.setup_parcours_groups()
|
||||
H = [
|
||||
html_sco_header.sco_header(
|
||||
cssstyles=["css/partition_editor.css"],
|
||||
javascripts=[
|
||||
"js/partition_editor.js",
|
||||
],
|
||||
page_title=f"Partitions de {formsemestre.titre_annee()}",
|
||||
),
|
||||
"""<h2></h2>""",
|
||||
render_template(
|
||||
"scolar/partition_editor.j2",
|
||||
formsemestre=formsemestre,
|
||||
read_only=not formsemestre.can_change_groups(),
|
||||
edit_partition=edit_partition,
|
||||
is_edt_configured=sco_edt_cal.is_edt_configured(),
|
||||
scu=scu,
|
||||
),
|
||||
html_sco_header.sco_footer(),
|
||||
]
|
||||
|
||||
return "\n".join(H)
|
||||
return render_template(
|
||||
"scolar/partition_editor.j2",
|
||||
formsemestre=formsemestre,
|
||||
read_only=not formsemestre.can_change_groups(),
|
||||
edit_partition=edit_partition,
|
||||
is_edt_configured=sco_edt_cal.is_edt_configured(),
|
||||
sco=ScoData(formsemestre=formsemestre),
|
||||
scu=scu,
|
||||
)
|
||||
|
||||
|
||||
@bp.route("/students_groups_auto_assignment", methods=["GET", "POST"])
|
||||
|
Loading…
Reference in New Issue
Block a user