1
0
forked from ScoDoc/ScoDoc

Intégration bulletins html

This commit is contained in:
Emmanuel Viennet 2022-03-07 23:43:48 +01:00
parent 2220b617b8
commit a09418329f
6 changed files with 93 additions and 85 deletions

View File

@ -822,47 +822,16 @@ def formsemestre_bulletinetud(
H = [ H = [
_formsemestre_bulletinetud_header_html(etud, formsemestre, format, version), _formsemestre_bulletinetud_header_html(etud, formsemestre, format, version),
bulletin, 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("""<p>Situation actuelle: """)
inscription_courante = etud.inscription_courante()
if inscription_courante:
H.append(
f"""<a class="stdlink" href="{url_for(
"notes.formsemestre_status",
scodoc_dept=g.scodoc_dept,
formsemestre_id=inscription_courante.formsemestre_id)
}">"""
)
inscription_descr = etud.inscription_descr()
H.append(inscription_descr["inscription_str"])
if inscription_courante:
H.append("""</a>""")
H.append("""</p>""")
if formsemestre.modalite == "EXT":
H.append(
f"""<p><a
href="{url_for('notes.formsemestre_ext_edit_ue_validations',
scodoc_dept=g.scodoc_dept,
formsemestre_id=formsemestre_id,
etudid=etudid)}"
class="stdlink">
Éditer les validations d'UE dans ce semestre extérieur
</a></p>"""
)
# Place du diagramme radar
H.append(
"""<form id="params">
<input type="hidden" name="etudid" id="etudid" value="%s"/>
<input type="hidden" name="formsemestre_id" id="formsemestre_id" value="%s"/>
</form>"""
% (etudid, formsemestre_id)
)
H.append('<div id="radar_bulletin"></div>')
# --- Pied de page
H.append(html_sco_header.sco_footer())
return "".join(H) return "".join(H)

View File

@ -1963,7 +1963,18 @@ table.notes_recapcomplet a:hover {
div.notes_bulletin { div.notes_bulletin {
margin-right: 5px; 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; margin-right: 2em;
} }
table.notes_bulletin { table.notes_bulletin {
@ -2105,12 +2116,6 @@ a.bull_link:hover {
text-decoration: underline; text-decoration: underline;
} }
table.bull_head {
width: 100%;
}
td.bull_photo {
text-align: right;
}
div.bulletin_menubar { div.bulletin_menubar {
padding-left: 25px; padding-left: 25px;

View File

@ -0,0 +1,34 @@
{# -*- mode: jinja-html -*- #}
{# Pied des bulletins HTML #}
<p>Situation actuelle:
{% if inscription_courante %}
<a class="stdlink" href="{{url_for(
"notes.formsemestre_status",
scodoc_dept=g.scodoc_dept,
formsemestre_id=inscription_courante.formsemestre_id)
}}">{{inscription_str}}</a>
{% else %}
{{inscription_str}}
{% endif %}
</p>
{% if formsemestre.modalite == "EXT" %}
<p><a href="{{
url_for('notes.formsemestre_ext_edit_ue_validations',
scodoc_dept=g.scodoc_dept,
formsemestre_id=formsemestre.id,
etudid=etud.id)}}"
class="stdlink">
Éditer les validations d'UE dans ce semestre extérieur
</a></p>
{% endif %}
{# Place du diagramme radar #}
<form id="params">
<input type="hidden" name="etudid" id="etudid" value="{{etud.id}}"/>
<input type="hidden" name="formsemestre_id" id="formsemestre_id" value="{{formsemestre.id}}"/>
</form>
<div id="radar_bulletin"></div>

View File

@ -2,9 +2,8 @@
{# L'en-tête des bulletins HTML #} {# L'en-tête des bulletins HTML #}
{# was _formsemestre_bulletinetud_header_html #} {# was _formsemestre_bulletinetud_header_html #}
<table class="bull_head"> <div class="bull_head">
<tr> <div class="bull_head_text">
<td>
{% if not is_apc %} {% if not is_apc %}
<h2><a class="discretelink" href="{{ <h2><a class="discretelink" href="{{
url_for( url_for(
@ -12,19 +11,19 @@
)}}">{{etud.nomprenom}}</a></h2> )}}">{{etud.nomprenom}}</a></h2>
{% endif %} {% endif %}
<form name="f" method="GET" action="{{request.base_url}}"> <form name="f" method="GET" action="{{request.base_url}}">
Bulletin <span class="bull_liensemestre"><a href="{{
url_for("notes.formsemestre_status",
scodoc_dept=g.scodoc_dept,
formsemestre_id=formsemestre.id)}}
">{{formsemestre.titre_mois()}}</a></span>
<br/>
<table>
<tr>
<td>établi le {{time.strftime("%d/%m/%Y à %Hh%M")}} (notes sur 20)</td>
<td><span class="rightjust">
<input type="hidden" name="formsemestre_id" value="{{formsemestre.id}}"></input> <input type="hidden" name="formsemestre_id" value="{{formsemestre.id}}"></input>
<input type="hidden" name="etudid" value="{{etud.id}}"></input> <input type="hidden" name="etudid" value="{{etud.id}}"></input>
<input type="hidden" name="format" value="{{format}}"></input> <input type="hidden" name="format" value="{{format}}"></input>
Bulletin
<span class="bull_liensemestre"><a href="{{
url_for("notes.formsemestre_status",
scodoc_dept=g.scodoc_dept,
formsemestre_id=formsemestre.id)}}">{{formsemestre.titre_mois()
}}</a></span>
<div>
<em>établi le {{time.strftime("%d/%m/%Y à %Hh%M")}} (notes sur 20)</em>
<span class="rightjust">
<select name="version" onchange="document.f.submit()" class="noprint"> <select name="version" onchange="document.f.submit()" class="noprint">
{% for (v, e) in ( {% for (v, e) in (
("short", "Version courte"), ("short", "Version courte"),
@ -35,11 +34,9 @@
{% endfor %} {% endfor %}
</select> </select>
</span> </span>
</td> <span class="bulletin_menubar">
<td class="bulletin_menubar"> <span class="bulletin_menubar_but">{{menu_autres_operations|safe}}</span>
<div class="bulletin_menubar">{{menu_autres_operations|safe}}</div> <a href="{{url_for(
</td>
<td><a href="{{url_for(
'notes.formsemestre_bulletinetud', 'notes.formsemestre_bulletinetud',
scodoc_dept=g.scodoc_dept, scodoc_dept=g.scodoc_dept,
formsemestre_id=formsemestre.id, formsemestre_id=formsemestre.id,
@ -47,16 +44,14 @@
format='pdf', format='pdf',
version=version, version=version,
)}}">{{scu.ICON_PDF|safe}}</a> )}}">{{scu.ICON_PDF|safe}}</a>
</td> </span>
</tr> </div>
</table>
</form> </form>
</td> </div>
{% if not is_apc %} {% if not is_apc %}
<td class="bull_photo"><a href="{{ <div class="bull_photo"><a href="{{
url_for("scolar.ficheEtud", scodoc_dept=g.scodoc_dept, etudid=etud.id) url_for("scolar.ficheEtud", scodoc_dept=g.scodoc_dept, etudid=etud.id)
}}">{{etud.photo_html(title="fiche de " + etud["nom"])|safe}}</a> }}">{{etud.photo_html(title="fiche de " + etud["nom"])|safe}}</a>
</td> </div>
{% endif %} {% endif %}
</tr> </div>
</table>

View File

@ -11,6 +11,9 @@
<releve-but></releve-but> <releve-but></releve-but>
<script src="/ScoDoc/static/js/releve-but.js"></script> <script src="/ScoDoc/static/js/releve-but.js"></script>
{% include 'bul_foot.html' %}
<script> <script>
let dataSrc = "{{bul_url|safe}}"; let dataSrc = "{{bul_url|safe}}";
fetch(dataSrc) fetch(dataSrc)

View File

@ -334,6 +334,8 @@ def formsemestre_bulletinetud(
), ),
etud=etud, etud=etud,
formsemestre=formsemestre, formsemestre=formsemestre,
inscription_courante=etud.inscription_courante(),
inscription_str=etud.inscription_descr()["inscription_str"],
is_apc=formsemestre.formation.is_apc(), is_apc=formsemestre.formation.is_apc(),
menu_autres_operations=sco_bulletins.make_menu_autres_operations( menu_autres_operations=sco_bulletins.make_menu_autres_operations(
formsemestre, etud, "notes.formsemestre_bulletinetud", version formsemestre, etud, "notes.formsemestre_bulletinetud", version