diff --git a/app/scodoc/sco_formsemestre_status.py b/app/scodoc/sco_formsemestre_status.py index 5f3d69cebf4d385077209ec5fc1095b738a15a4e..fe58bc15e2ab06d610583b7574a7eabf9594b374 100755 --- a/app/scodoc/sco_formsemestre_status.py +++ b/app/scodoc/sco_formsemestre_status.py @@ -1126,6 +1126,18 @@ def formsemestre_status(formsemestre_id=None, check_parcours=True): ] H += [ f""" + <details id="tableau-modules-details" open> + <!-- script pour fermer automatiquement si mobile --> + <script> + document.addEventListener("DOMContentLoaded", () => {{ + if (window.innerWidth < 769) {{ + document.getElementById("tableau-modules-details").open = false; + }} + }}); + </script> + <summary id="tableau-modules-summary"> + <h3 title="cliquer pour afficher ou cacher le tableau">Tableau des Ressources et SAEs</h3> + </summary> <div class="tableau_modules"> {_TABLEAU_MODULES_HEAD} <tr class="formsemestre_status_cat"> @@ -1155,7 +1167,7 @@ def formsemestre_status(formsemestre_id=None, check_parcours=True): autres, nt, formsemestre, can_edit=can_edit, show_ues=False ), ] - H += [_TABLEAU_MODULES_FOOT, "</div>"] + H += [_TABLEAU_MODULES_FOOT, "</div></details>"] else: # formations classiques: groupe par UE # élimine les modules BUT qui aurait pu se glisser là suite à un diff --git a/app/static/css/scodoc97.css b/app/static/css/scodoc97.css index 3c22c11f087d8e64be807a2a7994798212c17240..38bfe85bb66954f76b5d1fd8dea0c3cdd94a30ae 100644 --- a/app/static/css/scodoc97.css +++ b/app/static/css/scodoc97.css @@ -276,4 +276,36 @@ body { overflow: hidden !important; margin: 0 !important; height: 100vh !important; +} + +/* Tableau des modules */ +#tableau-modules-summary { + list-style: none; +} + +#tableau-modules-summary::marker { + display: none; +} + +#tableau-modules-summary>h3::after { + content: ""; + display: inline-block; + width: 0; + height: 0; + margin-left: 4px; + vertical-align: middle; + border-top: 4px dashed; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} + +#tableau-modules-details:not([open])>#tableau-modules-summary>h3::before { + content: "(caché) "; + font-size: smaller; + font-weight: lighter; + font-style: italic; +} + +#tableau-modules-details:not([open]) #tableau_modules { + display: none; } \ No newline at end of file diff --git a/app/static/css/scodoc9_mobile.css b/app/static/css/scodoc9_mobile.css index 3dd227e0048c1d0b681ab7be71f58161a6c0f5e3..ad1202df2fec9755a5f30f0de9de59343d0407fd 100644 --- a/app/static/css/scodoc9_mobile.css +++ b/app/static/css/scodoc9_mobile.css @@ -101,4 +101,8 @@ height: var(--size) !important; } + div.formsemestre_status { + padding: 0; + } + } \ No newline at end of file