From a09418329faf670fc29f1c6873496ab92682cc69 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 7 Mar 2022 23:43:48 +0100 Subject: [PATCH] =?UTF-8?q?Int=C3=A9gration=20bulletins=20html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_bulletins.py | 47 ++++----------------- app/static/css/scodoc.css | 19 +++++---- app/templates/bul_foot.html | 34 +++++++++++++++ app/templates/bul_head.html | 73 +++++++++++++++------------------ app/templates/but/bulletin.html | 3 ++ app/views/notes.py | 2 + 6 files changed, 93 insertions(+), 85 deletions(-) create mode 100644 app/templates/bul_foot.html diff --git a/app/scodoc/sco_bulletins.py b/app/scodoc/sco_bulletins.py index b2140427..65dcb3a9 100644 --- a/app/scodoc/sco_bulletins.py +++ b/app/scodoc/sco_bulletins.py @@ -822,47 +822,16 @@ def formsemestre_bulletinetud( H = [ _formsemestre_bulletinetud_header_html(etud, formsemestre, format, version), bulletin, + render_template( + "bul_foot.html", + etud=etud, + formsemestre=formsemestre, + inscription_courante=etud.inscription_courante(), + inscription_str=etud.inscription_descr()["inscription_str"], + ), + html_sco_header.sco_footer(), ] - H.append("""

Situation actuelle: """) - inscription_courante = etud.inscription_courante() - if inscription_courante: - H.append( - f"""""" - ) - inscription_descr = etud.inscription_descr() - H.append(inscription_descr["inscription_str"]) - if inscription_courante: - H.append("""""") - H.append("""

""") - if formsemestre.modalite == "EXT": - H.append( - f"""

- Éditer les validations d'UE dans ce semestre extérieur -

""" - ) - # Place du diagramme radar - H.append( - """
- - -
""" - % (etudid, formsemestre_id) - ) - H.append('
') - - # --- Pied de page - H.append(html_sco_header.sco_footer()) - return "".join(H) diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index 31603a34..b5f2b325 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -1963,7 +1963,18 @@ table.notes_recapcomplet a:hover { div.notes_bulletin { margin-right: 5px; } -div.bulletin_menubar { +div.bull_head { + display: grid; + justify-content: space-between; + grid-template-columns: auto auto; +} +div.bull_photo { + display: inline-block; + margin-right: 10px; +} +span.bulletin_menubar_but { + display: inline-block; + margin-left: 2em; margin-right: 2em; } table.notes_bulletin { @@ -2105,12 +2116,6 @@ a.bull_link:hover { text-decoration: underline; } -table.bull_head { - width: 100%; -} -td.bull_photo { - text-align: right; -} div.bulletin_menubar { padding-left: 25px; diff --git a/app/templates/bul_foot.html b/app/templates/bul_foot.html new file mode 100644 index 00000000..873b43c7 --- /dev/null +++ b/app/templates/bul_foot.html @@ -0,0 +1,34 @@ +{# -*- mode: jinja-html -*- #} +{# Pied des bulletins HTML #} + +

Situation actuelle: +{% if inscription_courante %} +{{inscription_str}} +{% else %} + {{inscription_str}} +{% endif %} +

+ +{% if formsemestre.modalite == "EXT" %} +

+ Éditer les validations d'UE dans ce semestre extérieur +

+{% endif %} + +{# Place du diagramme radar #} +
+ + +
+
+ + diff --git a/app/templates/bul_head.html b/app/templates/bul_head.html index 12df3c4f..d706ef9a 100644 --- a/app/templates/bul_head.html +++ b/app/templates/bul_head.html @@ -2,9 +2,8 @@ {# L'en-tête des bulletins HTML #} {# was _formsemestre_bulletinetud_header_html #} - - - + {% if not is_apc %} - +
{{etud.photo_html(title="fiche de " + etud["nom"])|safe}} +
{% endif %} - -
+
+
{% if not is_apc %}

{{etud.nomprenom}}

{% endif %}
- Bulletin + + + Bulletin + {{formsemestre.titre_mois()}} -
- - - - - - - -
établi le {{time.strftime("%d/%m/%Y à %Hh%M")}} (notes sur 20) - - - - - - -
{{menu_autres_operations|safe}}
-
{{formsemestre.titre_mois() + }} + +
+ établi le {{time.strftime("%d/%m/%Y à %Hh%M")}} (notes sur 20) + + + + + {{menu_autres_operations|safe}} + {{scu.ICON_PDF|safe}} -
+ +
-
{{etud.photo_html(title="fiche de " + etud["nom"])|safe}} -
+ diff --git a/app/templates/but/bulletin.html b/app/templates/but/bulletin.html index c3e8c834..d394f255 100644 --- a/app/templates/but/bulletin.html +++ b/app/templates/but/bulletin.html @@ -11,6 +11,9 @@ + +{% include 'bul_foot.html' %} +