diff --git a/app/static/css/releve-but.css b/app/static/css/releve-but.css index 293dfbd8b..2f9766ded 100644 --- a/app/static/css/releve-but.css +++ b/app/static/css/releve-but.css @@ -68,6 +68,15 @@ section>div:nth-child(1){ display: none; } +.moduleOnOff>.syntheseModule, +.moduleOnOff>.eval{ + display: none; +} +.listeOff .moduleOnOff>.syntheseModule, +.listeOff .moduleOnOff>.eval{ + display: flex !important; +} + /***********************/ /* Options d'affichage */ /***********************/ @@ -80,6 +89,12 @@ section>div:nth-child(1){ display: none; } +.module>.absences, +.module .moyenne, +.module .info{ + display: none; +} + /************/ /* Etudiant */ /************/ @@ -133,16 +148,14 @@ section>div:nth-child(1){ /***************/ /* Synthèse */ /***************/ -.synthese>.ue{ - background: var(--couleurFondTitresUE); -} +.synthese .ue, .synthese h3{ background: var(--couleurFondTitresUE); } .synthese em, .eval em{ opacity: 0.6; - width: 70px; + min-width: 80px; display: inline-block; } @@ -158,6 +171,7 @@ section>div:nth-child(1){ gap: 16px; margin: 4px 0 2px 0; overflow: auto; + cursor: pointer; } h3{ display: flex; @@ -184,10 +198,15 @@ h3{ position: relative; display: flex; justify-content: space-between; - margin: 0 28px; + margin: 0 0 0 28px; padding: 0px 4px; border-bottom: 1px solid #aaa; } +.eval>div, .syntheseModule>div{ + display: flex; + gap: 4px; +} + .eval:hover, .syntheseModule:hover{ background: var(--couleurSurlignage); /* color: #FFF; */ @@ -203,9 +222,10 @@ h3{ color: #000; border: 1px solid var(--couleurIntense); opacity: 0; - display: grid; + display: grid !important; grid-template-columns: auto auto; - column-gap: 4px; + gap: 0 !important; + column-gap: 4px !important; } .eval:hover .complement{ opacity: 1; diff --git a/app/static/js/releve-but.js b/app/static/js/releve-but.js index 123a4cc4e..9b974fe6f 100644 --- a/app/static/js/releve-but.js +++ b/app/static/js/releve-but.js @@ -1,3 +1,4 @@ +/* Module par Seb. L. */ class releveBUT extends HTMLElement { constructor(){ super(); @@ -16,15 +17,15 @@ class releveBUT extends HTMLElement { styles.setAttribute('rel', 'stylesheet'); styles.setAttribute('href', '/ScoDoc/static/css/releve-but.css'); this.shadow.appendChild(styles); - - this.shadow.querySelectorAll(".CTA_Liste").forEach(e => { - e.addEventListener("click", this.listeOnOff) - }) - - } listeOnOff() { - this.parentElement.parentElement.classList.toggle("listeOff") + this.parentElement.parentElement.classList.toggle("listeOff"); + this.parentElement.parentElement.querySelectorAll(".moduleOnOff").forEach(e=>{ + e.classList.remove("moduleOnOff") + }) + } + moduleOnOff(){ + this.parentElement.classList.toggle("moduleOnOff"); } set setConfig(config){ @@ -39,10 +40,16 @@ class releveBUT extends HTMLElement { this.setOptions(data.options); + this.shadow.querySelectorAll(".CTA_Liste").forEach(e => { + e.addEventListener("click", this.listeOnOff) + }) + this.shadow.querySelectorAll(".ue, .module").forEach(e => { + e.addEventListener("click", this.moduleOnOff) + }) + this.shadow.children[0].classList.add("ready"); } - template(){ return `
@@ -133,7 +140,7 @@ class releveBUT extends HTMLElement { ${data.etudiant.prenom}`; if (data.etudiant.date_naissance) { - output += ` né${(data.etudiant.civilite == "F") ? "e" : ""} le ${this.ISOToDate(data.etudiant.date_naissance)}`; + output += `
né${(data.etudiant.civilite == "F") ? "e" : ""} le ${this.ISOToDate(data.etudiant.date_naissance)}
`; } output += ` @@ -186,27 +193,29 @@ class releveBUT extends HTMLElement { let output = ``; Object.entries(data.ues).forEach(([ue, dataUE]) => { output += ` -
-

- ${(dataUE.competence) ? dataUE.competence + " - " : ""}${ue} -

-
-
Moyenne : ${dataUE.moyenne?.value || "-"}
-
- Bonus : ${dataUE.bonus || 0} - - Malus : ${dataUE.malus || 0} -  - - ECTS : ${dataUE.ECTS.acquis} / ${dataUE.ECTS.total} - +
+
+

+ ${(dataUE.competence) ? dataUE.competence + " - " : ""}${ue} +

+
+
Moyenne : ${dataUE.moyenne?.value || "-"}
+
+ Bonus : ${dataUE.bonus || 0} - + Malus : ${dataUE.malus || 0} +  - + ECTS : ${dataUE.ECTS.acquis} / ${dataUE.ECTS.total} + +
+
+
+
Abs N.J.
${dataUE.absences?.injustifie || 0}
+
Total
${dataUE.absences?.total || 0}
-
-
Abs N.J.
${dataUE.absences?.injustifie || 0}
-
Total
${dataUE.absences?.total || 0}
-
+ ${this.synthese(data, dataUE.ressources)} + ${this.synthese(data, dataUE.saes)}
- ${this.synthese(data, dataUE.ressources)} - ${this.synthese(data, dataUE.saes)} `; }); this.shadow.querySelector(".synthese").innerHTML = output; @@ -221,7 +230,7 @@ class releveBUT extends HTMLElement {
${this.URL(url, `${module} - ${titre}`)}
${dataModule.moyenne} - Coef. ${dataModule.coef} + Coef. ${dataModule.coef}
`; @@ -271,7 +280,7 @@ class releveBUT extends HTMLElement {
${this.URL(evaluation.url, evaluation.description)}
${evaluation.note.value} - Coef. ${evaluation.coef} + Coef. ${evaluation.coef}
Coef
${evaluation.coef}
diff --git a/app/templates/but/bulletin.html b/app/templates/but/bulletin.html index 6ade88c0c..819b6bd7d 100644 --- a/app/templates/but/bulletin.html +++ b/app/templates/but/bulletin.html @@ -7,12 +7,6 @@ {% block app_content %} - -{% endblock %} - -{% block scripts %} -{{ super() }} - -{% endblock %} \ No newline at end of file +{% endblock %} +