From 55add2ffb383b005cfd1556db451980a4b4394c3 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 23 Mar 2024 10:17:49 +0100 Subject: [PATCH] cosmetic: eye, table semestres --- app/scodoc/sco_dept.py | 14 ++---- app/scodoc/sco_utils.py | 9 ++++ app/static/css/scodoc.css | 58 +---------------------- app/static/icons/eye_hidden.svg | 40 ++++++++++++++++ app/static/icons/eye_img.png | Bin 673 -> 0 bytes app/static/icons/eye_visible.svg | 19 ++++++++ app/static/icons/eye_visible_green.svg | 20 ++++++++ app/templates/formsemestre_header.j2 | 4 +- app/templates/formsemestre_page_title.j2 | 4 +- app/templates/scolar/index.j2 | 53 ++++++++++++++++++++- sco_version.py | 2 +- 11 files changed, 149 insertions(+), 74 deletions(-) create mode 100644 app/static/icons/eye_hidden.svg delete mode 100644 app/static/icons/eye_img.png create mode 100644 app/static/icons/eye_visible.svg create mode 100644 app/static/icons/eye_visible_green.svg diff --git a/app/scodoc/sco_dept.py b/app/scodoc/sco_dept.py index 9f861de8..1f980c14 100644 --- a/app/scodoc/sco_dept.py +++ b/app/scodoc/sco_dept.py @@ -223,9 +223,9 @@ def _sem_table_gt(formsemestres: Query, showcodes=False, fmt="html") -> GenTable columns_ids = ( "lockimg", "published", + "dash_mois_fin", "semestre_id_n", "modalite", - "dash_mois_fin", "titre_resp", "nb_inscrits", "formation", @@ -275,16 +275,8 @@ def _style_sems(sems: list[dict], fmt="html") -> list[dict]: """ajoute quelques attributs de présentation pour la table""" is_h = fmt == "html" if is_h: - icon_published = scu.icontag( - "eye_img", - border="0", - title="Bulletins publiés sur la passerelle étudiants", - ) - icon_hidden = scu.icontag( - "hide_img", - border="0", - title="Bulletins NON publiés sur la passerelle étudiants", - ) + icon_published = scu.ICON_PUBLISHED + icon_hidden = scu.ICON_HIDDEN else: icon_published = "publié" icon_hidden = "non publié" diff --git a/app/scodoc/sco_utils.py b/app/scodoc/sco_utils.py index 55c8d8ae..51d8a5d4 100644 --- a/app/scodoc/sco_utils.py +++ b/app/scodoc/sco_utils.py @@ -1444,6 +1444,15 @@ def icontag(name, file_format="png", no_size=False, **attrs): ICON_PDF = icontag("pdficon16x20_img", title="Version PDF") ICON_XLS = icontag("xlsicon_img", title="Export tableur (xlsx)") +ICON_PUBLISHED = """Bulletins publiés sur la passerelle étudiants""" +ICON_HIDDEN = """Bulletins NON publiés sur la passerelle étudiants""" + # HTML emojis EMO_WARNING = "⚠️" # warning /!\ EMO_RED_TRIANGLE_DOWN = "🔻" # red triangle pointed down diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index eb6793e5..31ceab22 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -603,31 +603,6 @@ h2.listesems { margin-bottom: 0px; } -/* table.semlist tr.gt_firstrow th {} */ - -table.semlist tr td { - border: none; -} - -table.semlist tbody tr a.stdlink, -table.semlist tbody tr a.stdlink:visited { - color: navy; - text-decoration: none; -} - -table.semlist tr a.stdlink:hover { - color: red; - text-decoration: underline; -} - -table.semlist tr td.semestre_id { - text-align: right; -} - -table.semlist tbody tr td.modalite { - text-align: left; - padding-right: 1em; -} /***************************/ /* Statut des cellules */ @@ -682,36 +657,6 @@ table.semlist tbody tr td.modalite { } } -div#gtrcontent table.semlist tbody tr.css_S-1 td { - background-color: rgb(211, 213, 255); -} - -div#gtrcontent table.semlist tbody tr.css_S1 td { - background-color:#e9efef; -} - -div#gtrcontent table.semlist tbody tr.css_S2 td { - background-color: #d4ebd7; -} - -div#gtrcontent table.semlist tbody tr.css_S3 td { - background-color: #bedebe; -} - -div#gtrcontent table.semlist tbody tr.css_S4 td { - background-color: #afd7ad; -} -div#gtrcontent table.semlist tbody tr.css_S5 td { - background-color: #a0cd9a; -} -div#gtrcontent table.semlist tbody tr.css_S6 td { - background-color: #7dcf78; -} - -div#gtrcontent table.semlist tbody tr.css_MEXT td { - color: #fefcdf; -} - /* ----- Liste des news ----- */ div.scobox.news { @@ -1682,8 +1627,7 @@ h2.formsemestre, .formsemestre_page_title .eye, formsemestre_page_title .eye img { display: inline-block; - vertical-align: middle; - margin-bottom: 2px; + margin-left: 12px; } .formsemestre_page_title .infos span.lock, diff --git a/app/static/icons/eye_hidden.svg b/app/static/icons/eye_hidden.svg new file mode 100644 index 00000000..17c45dbf --- /dev/null +++ b/app/static/icons/eye_hidden.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + diff --git a/app/static/icons/eye_img.png b/app/static/icons/eye_img.png deleted file mode 100644 index 8d68bac0f17cfcdfd6340c9e931ed117e263bab4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmV;S0$%-zP)Kls!uvQ5c1vGw4)e5tbAw#DEAIEoN=RDuqN4@efEy zu@guUNM$8fVr3ObB{M|`{(&HZVv$O0bc)poB19}w1W6IBu9A~t*SHR=Ng!b3DbKz4 zocF$8aF4r&Zaa*N6rkI7ub>a<0T|GC;0SyS{0K?@?*?&^4r0$B4FM;{2STUK;|ef< z-D7D_cqJtH=f5(Di?kPb15|8(kn|}eS-2sH7?InpXw%$e9w+x|#$!Sgh`ErI+O#3QW3zl-%`Vh(7}=iI<)E33P`w0RGRaD5JAT2L&@WLlP&31HoxynYv;#0Q5-O z16D$k{oS%FMF`Lh^n&|951KXjF6qelSk{kF&2E#q#~tGrwmBbN*`X^^00000NkvXX Hu0mjfWr`xh diff --git a/app/static/icons/eye_visible.svg b/app/static/icons/eye_visible.svg new file mode 100644 index 00000000..4fa56655 --- /dev/null +++ b/app/static/icons/eye_visible.svg @@ -0,0 +1,19 @@ + + + + + diff --git a/app/static/icons/eye_visible_green.svg b/app/static/icons/eye_visible_green.svg new file mode 100644 index 00000000..b23e22f8 --- /dev/null +++ b/app/static/icons/eye_visible_green.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/app/templates/formsemestre_header.j2 b/app/templates/formsemestre_header.j2 index e8c16560..dad4565a 100644 --- a/app/templates/formsemestre_header.j2 +++ b/app/templates/formsemestre_header.j2 @@ -28,9 +28,9 @@ {% if sco.sem.bul_hide_xml %} - {{ scu.icontag("hide_img", border="0", title="Bulletins NON publiés sur la passerelle étudiants")|safe}} + {{ scu.ICON_HIDDEN|safe}} {% else %} - {{ scu.icontag("eye_img", border="0", title="Bulletins publiés sur la passerelle étudiants")|safe }} + {{ scu.ICON_PUBLISHED|safe }} {% endif %} {% endif %} diff --git a/app/templates/formsemestre_page_title.j2 b/app/templates/formsemestre_page_title.j2 index 5674dc32..d90cde88 100644 --- a/app/templates/formsemestre_page_title.j2 +++ b/app/templates/formsemestre_page_title.j2 @@ -31,9 +31,9 @@ scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre.id ) }}">{%- if formsemestre.bul_hide_xml -%} - {{scu.icontag("hide_img", border="0", title="Bulletins NON publiés sur la passerelle étudiants")|safe}} + {{scu.ICON_HIDDEN|safe}} {%- else -%} - {{scu.icontag("eye_img", border="0", title="Bulletins publiés sur la passerelle étudiants")|safe}} + {{scu.ICON_PUBLISHED|safe}} {%- endif -%} diff --git a/app/templates/scolar/index.j2 b/app/templates/scolar/index.j2 index 773e093b..c5c243f2 100644 --- a/app/templates/scolar/index.j2 +++ b/app/templates/scolar/index.j2 @@ -17,8 +17,8 @@ table.listesems tr td.titresem { font-size: 110%; } table.semlist tr td.datesem { - font-size: 80%; text-align: center; + white-space: nowrap; } table.semlist tr td.semestre_id_n { @@ -28,6 +28,57 @@ table.semlist tr td.nb_inscrits { text-align: center; } + +div#gtrcontent table.semlist tbody tr.css_S-1 td { + background-color:rgb(176, 214, 226); +} + +div#gtrcontent table.semlist tbody tr.css_S1 td { + background-color:#e9efef; +} + +div#gtrcontent table.semlist tbody tr.css_S2 td { + background-color: #d4ebd7; +} + +div#gtrcontent table.semlist tbody tr.css_S3 td { + background-color: #bedebe; +} + +div#gtrcontent table.semlist tbody tr.css_S4 td { + background-color: #afd7ad; +} +div#gtrcontent table.semlist tbody tr.css_S5 td { + background-color: #a0cd9a; +} +div#gtrcontent table.semlist tbody tr.css_S6 td { + background-color: #7dcf78; +} + +div#gtrcontent table.semlist tbody tr.css_MEXT td { + color: #fefcdf; +} + +table.semlist tr td { + border: none; +} + +table.semlist tbody tr a.stdlink, +table.semlist tbody tr a.stdlink:visited { + color: navy; + text-decoration: none; +} + +div#gtrcontent table.semlist tr a.stdlink:hover { + color: red; + text-decoration: underline; +} + +table.semlist tbody tr td.modalite { + text-align: left; + padding-right: 1em; +} + {# News #} diff --git a/sco_version.py b/sco_version.py index 3c2ec6c4..144fe706 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.6.953" +SCOVERSION = "9.6.954" SCONAME = "ScoDoc"