Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
2 changed files with 15 additions and 7 deletions
Showing only changes of commit 5cdfb360fa - Show all commits

View File

@ -159,6 +159,12 @@ option.non_associe {
margin-bottom: 8px; margin-bottom: 8px;
} }
div.ue_validation_code {
display: inline-block;
}
div.ue_validation_code div.code {
margin-left: 12px;
}
select.validation_rcue { select.validation_rcue {
display: inline-block; display: inline-block;
margin-left: 32px; margin-left: 32px;

View File

@ -13,7 +13,7 @@
{{ niv['ue_'+sem].acronyme }} {{ niv['ue_'+sem].acronyme }}
{% set validation = ue_validation_by_niveau.get((niv['niveau'].id, sem)) %} {% set validation = ue_validation_by_niveau.get((niv['niveau'].id, sem)) %}
<div class="ue_validation_code with_scoplement"> <div class="ue_validation_code with_scoplement">
<div> <div class="code">
{% if validation %} {% if validation %}
<b>{{validation.code}}</b> <b>{{validation.code}}</b>
{% else %} {% else %}
@ -80,7 +80,7 @@
</span> </span>
{{niv['niveau'].libelle if niv['niveau'] else ''}} {{niv['niveau'].libelle if niv['niveau'] else ''}}
</div> </div>
<div class="rcue"> <div class="rcue" style="position: relative;">
<div class="rcue_validation_code with_scoplement"> <div class="rcue_validation_code with_scoplement">
{% set validation = rcue_validation_by_niveau.get(niv['niveau'].id) %} {% set validation = rcue_validation_by_niveau.get(niv['niveau'].id) %}
{% if validation %} {% if validation %}
@ -97,6 +97,7 @@
data-ue1_id="{{niv['ue_impair'].id}}" data-ue1_id="{{niv['ue_impair'].id}}"
data-ue2_id="{{niv['ue_pair'].id}}" data-ue2_id="{{niv['ue_pair'].id}}"
data-code="{{validation.code if validation else ''}}"
> >
{% for code in rcue_codes %} {% for code in rcue_codes %}
<option value="{{code}}" <option value="{{code}}"
@ -123,10 +124,10 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
<div class="ue impair u{{annee}}1"> <div class="ue impair u{{annee}}1" style="position: relative;">
{{ show_ue(niv, "impair", 2*annee-1) }} {{ show_ue(niv, "impair", 2*annee-1) }}
</div> </div>
<div class="ue pair u{{annee}}1"> <div class="ue pair u{{annee}}1" style="position: relative;">
{{ show_ue(niv, "pair", 2*annee) }} {{ show_ue(niv, "pair", 2*annee) }}
</div> </div>
</div> </div>
@ -206,11 +207,12 @@ function record_rcue_validation(event, niveau_id) {
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
if (data.status) { if (data.status) {
/* sco_message(data.message); */ sco_message(data.message);
/* revert menu to initial state */ /* revert menu to initial state */
event.target.value = event.target.dataset.ue_id; event.target.value = event.target.dataset.code;
} else {
sco_message("code jury enregistré");
} }
location.reload();
}); });
} }
</script> </script>