Statistiques + messages

This commit is contained in:
Evarin 2017-06-27 23:14:24 +02:00
parent a74f3de910
commit f4ba29224e
7 changed files with 213 additions and 113 deletions

View file

@ -239,6 +239,10 @@ section.content.recherche {
} }
} }
} }
ul.messages {
display: none;
}
} }
@media screen and (max-width: 500px), screen and (max-width: 800px) and (orientation: portrait) { @media screen and (max-width: 500px), screen and (max-width: 800px) and (orientation: portrait) {

View file

@ -141,6 +141,24 @@ header {
h1 { h1 {
margin-bottom: 0.6em; margin-bottom: 0.6em;
} }
ul.messages {
margin: -20px;
margin-bottom: 15px;
li {
background: #ccc;
color: #333;
padding: 5px 10px;
font-weight: bold;
font-size: 0.8em;
&.success {
background-color: darken($fond, 10%);
color: #fff;
}
}
}
} }
// Liste des stages condensée sur le profil // Liste des stages condensée sur le profil

View file

@ -210,30 +210,48 @@ header h1 {
.content h1 { .content h1 {
margin-bottom: 0.6em; margin-bottom: 0.6em;
} }
/* line 146, ../../sass/screen.scss */
.content ul.messages {
margin: -20px;
margin-bottom: 15px;
}
/* line 149, ../../sass/screen.scss */ /* line 149, ../../sass/screen.scss */
.content ul.messages li {
background: #ccc;
color: #333;
padding: 5px 10px;
font-weight: bold;
font-size: 0.8em;
}
/* line 156, ../../sass/screen.scss */
.content ul.messages li.success {
background-color: #72a329;
color: #fff;
}
/* line 167, ../../sass/screen.scss */
.condensed-stages li { .condensed-stages li {
display: table; display: table;
width: 100%; width: 100%;
background: #fff; background: #fff;
margin: 12px; margin: 12px;
} }
/* line 156, ../../sass/screen.scss */ /* line 174, ../../sass/screen.scss */
.condensed-stages li > *, .condensed-stages li:before { .condensed-stages li > *, .condensed-stages li:before {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
padding: 15px; padding: 15px;
} }
/* line 161, ../../sass/screen.scss */ /* line 179, ../../sass/screen.scss */
.condensed-stages li a { .condensed-stages li a {
width: auto; width: auto;
} }
/* line 163, ../../sass/screen.scss */ /* line 181, ../../sass/screen.scss */
.condensed-stages li a:hover { .condensed-stages li a:hover {
background: #e08206; background: #e08206;
color: #fff; color: #fff;
} }
/* line 168, ../../sass/screen.scss */ /* line 186, ../../sass/screen.scss */
.condensed-stages li:before { .condensed-stages li:before {
content: ""; content: "";
text-align: right; text-align: right;
@ -241,73 +259,73 @@ header h1 {
opacity: 0.8; opacity: 0.8;
color: #000; color: #000;
} }
/* line 175, ../../sass/screen.scss */ /* line 193, ../../sass/screen.scss */
.condensed-stages li.stage-brouillon:before { .condensed-stages li.stage-brouillon:before {
content: "Brouillon"; content: "Brouillon";
background: #f93a93; background: #f93a93;
} }
/* line 179, ../../sass/screen.scss */ /* line 197, ../../sass/screen.scss */
.condensed-stages li.stage-publie:before { .condensed-stages li.stage-publie:before {
content: "Publié"; content: "Publié";
background: #419be9; background: #419be9;
} }
/* line 183, ../../sass/screen.scss */ /* line 201, ../../sass/screen.scss */
.condensed-stages li.stage-ajout:before { .condensed-stages li.stage-ajout:before {
content: "+"; content: "+";
color: #000; color: #000;
} }
/* line 191, ../../sass/screen.scss */ /* line 209, ../../sass/screen.scss */
.stage-liste li { .stage-liste li {
display: block; display: block;
position: relative; position: relative;
} }
/* line 195, ../../sass/screen.scss */ /* line 213, ../../sass/screen.scss */
.stage-liste li.date-maj { .stage-liste li.date-maj {
font-weight: 300; font-weight: 300;
font-size: 0.9em; font-size: 0.9em;
padding: 3px 0; padding: 3px 0;
font-style: italic; font-style: italic;
} }
/* line 201, ../../sass/screen.scss */ /* line 219, ../../sass/screen.scss */
.stage-liste li.stage { .stage-liste li.stage {
padding: 10px; padding: 10px;
background: #fff; background: #fff;
margin: 10px; margin: 10px;
border-left: 5px solid #f99b20; border-left: 5px solid #f99b20;
} }
/* line 207, ../../sass/screen.scss */ /* line 225, ../../sass/screen.scss */
.stage-liste li.stage h3 { .stage-liste li.stage h3 {
font-size: 1.4em; font-size: 1.4em;
padding-left: 5px; padding-left: 5px;
} }
/* line 211, ../../sass/screen.scss */ /* line 229, ../../sass/screen.scss */
.stage-liste li.stage h3 > a { .stage-liste li.stage h3 > a {
color: #0f4c82; color: #0f4c82;
} }
/* line 215, ../../sass/screen.scss */ /* line 233, ../../sass/screen.scss */
.stage-liste li.stage h3 .auteur { .stage-liste li.stage h3 .auteur {
font-size: 0.8em; font-size: 0.8em;
} }
/* line 218, ../../sass/screen.scss */ /* line 236, ../../sass/screen.scss */
.stage-liste li.stage h3 .auteur, .stage-liste li.stage h3 .auteur a { .stage-liste li.stage h3 .auteur, .stage-liste li.stage h3 .auteur a {
font-family: "Dosis", sans-serif; font-family: "Dosis", sans-serif;
font-weight: normal; font-weight: normal;
} }
/* line 225, ../../sass/screen.scss */ /* line 243, ../../sass/screen.scss */
.stage-liste li .misc-hdr { .stage-liste li .misc-hdr {
margin-bottom: 10px; margin-bottom: 10px;
} }
/* line 229, ../../sass/screen.scss */ /* line 247, ../../sass/screen.scss */
.stage-liste li .misc-hdr .dates > span { .stage-liste li .misc-hdr .dates > span {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
} }
/* line 233, ../../sass/screen.scss */ /* line 251, ../../sass/screen.scss */
.stage-liste li .misc-hdr .dates .year { .stage-liste li .misc-hdr .dates .year {
padding-left: 8px; padding-left: 8px;
} }
/* line 239, ../../sass/screen.scss */ /* line 257, ../../sass/screen.scss */
.stage-liste li a.hoverlink { .stage-liste li a.hoverlink {
position: absolute; position: absolute;
display: block; display: block;
@ -318,7 +336,7 @@ header h1 {
z-index: 2; z-index: 2;
} }
/* line 251, ../../sass/screen.scss */ /* line 269, ../../sass/screen.scss */
ul.infos { ul.infos {
margin: 0 -3px; margin: 0 -3px;
padding: 0; padding: 0;
@ -327,7 +345,7 @@ ul.infos {
justify-content: space-between; justify-content: space-between;
width: 100; width: 100;
} }
/* line 259, ../../sass/screen.scss */ /* line 277, ../../sass/screen.scss */
ul.infos li { ul.infos li {
display: inline-block; display: inline-block;
padding: 5px; padding: 5px;
@ -339,28 +357,28 @@ ul.infos li {
text-align: center; text-align: center;
background-color: #ddd; background-color: #ddd;
} }
/* line 270, ../../sass/screen.scss */ /* line 288, ../../sass/screen.scss */
ul.infos li.thematique { ul.infos li.thematique {
color: #0d3f6b; color: #0d3f6b;
background-color: #86bff1; background-color: #86bff1;
} }
/* line 274, ../../sass/screen.scss */ /* line 292, ../../sass/screen.scss */
ul.infos li.matiere { ul.infos li.matiere {
color: #395214; color: #395214;
background-color: #c7e699; background-color: #c7e699;
} }
/* line 278, ../../sass/screen.scss */ /* line 296, ../../sass/screen.scss */
ul.infos li.lieu { ul.infos li.lieu {
color: #7c043c; color: #7c043c;
background-color: #fb84bc; background-color: #fb84bc;
} }
/* line 282, ../../sass/screen.scss */ /* line 300, ../../sass/screen.scss */
ul.infos li.year { ul.infos li.year {
background-color: #950548; background-color: #950548;
color: #fff; color: #fff;
display: none; display: none;
} }
/* line 289, ../../sass/screen.scss */ /* line 307, ../../sass/screen.scss */
ul.infos:after { ul.infos:after {
content: ""; content: "";
flex: 1000; flex: 1000;
@ -643,7 +661,7 @@ article.stage .section-wrapper .toc .toc-active a {
border: 1px solid #ad0654; border: 1px solid #ad0654;
} }
/* line 307, ../../sass/screen.scss */ /* line 325, ../../sass/screen.scss */
input, textarea, select, div.tinymce, option, optgroup:before { input, textarea, select, div.tinymce, option, optgroup:before {
background: #fff; background: #fff;
font-size: 1em; font-size: 1em;
@ -653,13 +671,13 @@ input, textarea, select, div.tinymce, option, optgroup:before {
padding: 5px; padding: 5px;
text-align: left; text-align: left;
} }
/* line 316, ../../sass/screen.scss */ /* line 334, ../../sass/screen.scss */
input:focus, input.mce-edit-focus, textarea:focus, textarea.mce-edit-focus, select:focus, select.mce-edit-focus, div.tinymce:focus, div.tinymce.mce-edit-focus, option:focus, option.mce-edit-focus, optgroup:before:focus, optgroup:before.mce-edit-focus { input:focus, input.mce-edit-focus, textarea:focus, textarea.mce-edit-focus, select:focus, select.mce-edit-focus, div.tinymce:focus, div.tinymce.mce-edit-focus, option:focus, option.mce-edit-focus, optgroup:before:focus, optgroup:before.mce-edit-focus {
background-color: #e9f5d6; background-color: #e9f5d6;
outline: none; outline: none;
} }
/* line 323, ../../sass/screen.scss */ /* line 341, ../../sass/screen.scss */
input[type='text'], input[type='password'], input[type='text'], input[type='password'],
input[type='email'], input[type='number'], textarea, select { input[type='email'], input[type='number'], textarea, select {
border: none; border: none;
@ -669,7 +687,7 @@ input[type='email'], input[type='number'], textarea, select {
transition: border 1s ease-out, background 1s ease-out; transition: border 1s ease-out, background 1s ease-out;
} }
/* line 332, ../../sass/screen.scss */ /* line 350, ../../sass/screen.scss */
select { select {
-moz-appearance: none; -moz-appearance: none;
appearance: none; appearance: none;
@ -683,21 +701,21 @@ select {
background-color: #fff; background-color: #fff;
background-size: contain; background-size: contain;
} }
/* line 345, ../../sass/screen.scss */ /* line 363, ../../sass/screen.scss */
select option { select option {
padding: 3px; padding: 3px;
white-space: pre-wrap; white-space: pre-wrap;
} }
/* line 351, ../../sass/screen.scss */ /* line 369, ../../sass/screen.scss */
select optgroup option { select optgroup option {
padding-left: 10px; padding-left: 10px;
} }
/* line 354, ../../sass/screen.scss */ /* line 372, ../../sass/screen.scss */
select optgroup:before { select optgroup:before {
font-weight: bold; font-weight: bold;
} }
/* line 360, ../../sass/screen.scss */ /* line 378, ../../sass/screen.scss */
input[type="submit"], .btn { input[type="submit"], .btn {
font: 19px "Dosis", sans-serif; font: 19px "Dosis", sans-serif;
background-color: #8fcc33; background-color: #8fcc33;
@ -708,17 +726,17 @@ input[type="submit"], .btn {
display: inline-block; display: inline-block;
} }
/* line 370, ../../sass/screen.scss */ /* line 388, ../../sass/screen.scss */
p.submits { p.submits {
text-align: right; text-align: right;
} }
/* line 374, ../../sass/screen.scss */ /* line 392, ../../sass/screen.scss */
form .commentaire { form .commentaire {
font-style: italic; font-style: italic;
} }
/* line 378, ../../sass/screen.scss */ /* line 396, ../../sass/screen.scss */
.edit-btn { .edit-btn {
border-color: #706c00; border-color: #706c00;
color: #000; color: #000;
@ -727,14 +745,14 @@ form .commentaire {
background-origin: content-box; background-origin: content-box;
background-size: contain; background-size: contain;
} }
/* line 386, ../../sass/screen.scss */ /* line 404, ../../sass/screen.scss */
.edit-btn:after { .edit-btn:after {
content: ""; content: "";
width: 30px; width: 30px;
display: inline-block; display: inline-block;
} }
/* line 393, ../../sass/screen.scss */ /* line 411, ../../sass/screen.scss */
textarea, div.tinymce { textarea, div.tinymce {
font-family: "Lato", sans-serif; font-family: "Lato", sans-serif;
border: none; border: none;
@ -744,20 +762,20 @@ textarea, div.tinymce {
transition: border 1s ease-out, background 1s ease-out; transition: border 1s ease-out, background 1s ease-out;
} }
/* line 402, ../../sass/screen.scss */ /* line 420, ../../sass/screen.scss */
textarea { textarea {
height: 200px; height: 200px;
resize: vertical; resize: vertical;
} }
/* line 410, ../../sass/screen.scss */ /* line 428, ../../sass/screen.scss */
form .field { form .field {
margin: 5px 0; margin: 5px 0;
display: flex; display: flex;
background: #fff; background: #fff;
padding: 10px; padding: 10px;
} }
/* line 416, ../../sass/screen.scss */ /* line 434, ../../sass/screen.scss */
form .field label, form .field .label { form .field label, form .field .label {
display: inline-block; display: inline-block;
width: 250px; width: 250px;
@ -766,39 +784,39 @@ form .field label, form .field .label {
padding-top: 5px; padding-top: 5px;
flex-shrink: 0; flex-shrink: 0;
} }
/* line 424, ../../sass/screen.scss */ /* line 442, ../../sass/screen.scss */
form .field label.required:before, form .field .label.required:before { form .field label.required:before, form .field .label.required:before {
margin-right: 5px; margin-right: 5px;
content: "*"; content: "*";
color: #f70978; color: #f70978;
} }
/* line 430, ../../sass/screen.scss */ /* line 448, ../../sass/screen.scss */
form .field label { form .field label {
font-family: Alegreya, serif; font-family: Alegreya, serif;
font-weight: bold; font-weight: bold;
} }
/* line 434, ../../sass/screen.scss */ /* line 452, ../../sass/screen.scss */
form .field .help_text { form .field .help_text {
font-style: italic; font-style: italic;
font-size: 0.9em; font-size: 0.9em;
} }
/* line 438, ../../sass/screen.scss */ /* line 456, ../../sass/screen.scss */
form .field .input { form .field .input {
display: inline-block; display: inline-block;
flex-grow: 1; flex-grow: 1;
margin-right: 10px; margin-right: 10px;
} }
/* line 448, ../../sass/screen.scss */ /* line 466, ../../sass/screen.scss */
ul.as-selections { ul.as-selections {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
/* line 452, ../../sass/screen.scss */ /* line 470, ../../sass/screen.scss */
ul.as-selections li { ul.as-selections li {
display: inline-block; display: inline-block;
} }
/* line 456, ../../sass/screen.scss */ /* line 474, ../../sass/screen.scss */
ul.as-selections .as-selection-item { ul.as-selections .as-selection-item {
padding: 0 5px; padding: 0 5px;
background: #f99b20; background: #f99b20;
@ -807,52 +825,52 @@ ul.as-selections .as-selection-item {
border-radius: 2px; border-radius: 2px;
font-weight: 500; font-weight: 500;
} }
/* line 464, ../../sass/screen.scss */ /* line 482, ../../sass/screen.scss */
ul.as-selections .as-selection-item a.as-close { ul.as-selections .as-selection-item a.as-close {
color: #fff; color: #fff;
-webkit-cursor: pointer; -webkit-cursor: pointer;
cursor: pointer; cursor: pointer;
margin-right: 5px; margin-right: 5px;
} }
/* line 471, ../../sass/screen.scss */ /* line 489, ../../sass/screen.scss */
ul.as-selections .as-selection-item.selected { ul.as-selections .as-selection-item.selected {
background: #8fcc33; background: #8fcc33;
} }
/* line 476, ../../sass/screen.scss */ /* line 494, ../../sass/screen.scss */
ul.as-selections .as-original { ul.as-selections .as-original {
flex-grow: 1; flex-grow: 1;
min-width: 200px; min-width: 200px;
} }
/* line 480, ../../sass/screen.scss */ /* line 498, ../../sass/screen.scss */
ul.as-selections .as-original input { ul.as-selections .as-original input {
width: 100%; width: 100%;
} }
/* line 486, ../../sass/screen.scss */ /* line 504, ../../sass/screen.scss */
div.as-results { div.as-results {
position: relative; position: relative;
} }
/* line 488, ../../sass/screen.scss */ /* line 506, ../../sass/screen.scss */
div.as-results ul { div.as-results ul {
position: absolute; position: absolute;
width: 100%; width: 100%;
background: #fff; background: #fff;
border: 1px solid #d2ebad; border: 1px solid #d2ebad;
} }
/* line 495, ../../sass/screen.scss */ /* line 513, ../../sass/screen.scss */
div.as-results ul li { div.as-results ul li {
padding: 3px 5px; padding: 3px 5px;
} }
/* line 501, ../../sass/screen.scss */ /* line 519, ../../sass/screen.scss */
div.as-results ul li.as-result-item.active { div.as-results ul li.as-result-item.active {
background: #fddeb5; background: #fddeb5;
} }
/* line 506, ../../sass/screen.scss */ /* line 524, ../../sass/screen.scss */
div.as-results ul li.as-message { div.as-results ul li.as-message {
font-style: italic; font-style: italic;
} }
/* line 516, ../../sass/screen.scss */ /* line 534, ../../sass/screen.scss */
.window { .window {
display: none; display: none;
position: fixed; position: fixed;
@ -863,11 +881,11 @@ div.as-results ul li.as-message {
left: 0; left: 0;
z-index: 50; z-index: 50;
} }
/* line 526, ../../sass/screen.scss */ /* line 544, ../../sass/screen.scss */
.window.visible { .window.visible {
display: block; display: block;
} }
/* line 530, ../../sass/screen.scss */ /* line 548, ../../sass/screen.scss */
.window .window-bg { .window .window-bg {
background: #000; background: #000;
opacity: 0.7; opacity: 0.7;
@ -878,7 +896,7 @@ div.as-results ul li.as-message {
top: 0; top: 0;
z-index: -1; z-index: -1;
} }
/* line 541, ../../sass/screen.scss */ /* line 559, ../../sass/screen.scss */
.window .window-content { .window .window-content {
position: relative; position: relative;
margin: 0 auto; margin: 0 auto;
@ -892,11 +910,11 @@ div.as-results ul li.as-message {
max-height: 100%; max-height: 100%;
overflow: auto; overflow: auto;
} }
/* line 555, ../../sass/screen.scss */ /* line 573, ../../sass/screen.scss */
.window .window-content form label, .window .window-content form .label { .window .window-content form label, .window .window-content form .label {
width: 150px; width: 150px;
} }
/* line 561, ../../sass/screen.scss */ /* line 579, ../../sass/screen.scss */
.window .window-closer { .window .window-closer {
position: absolute; position: absolute;
top: 0; top: 0;
@ -904,65 +922,65 @@ div.as-results ul li.as-message {
padding: 12px; padding: 12px;
z-index: 3; z-index: 3;
} }
/* line 567, ../../sass/screen.scss */ /* line 585, ../../sass/screen.scss */
.window .window-closer:after { .window .window-closer:after {
content: "×"; content: "×";
} }
/* line 578, ../../sass/screen.scss */ /* line 596, ../../sass/screen.scss */
#lieu_widget .lieu-ui { #lieu_widget .lieu-ui {
position: relative; position: relative;
} }
/* line 580, ../../sass/screen.scss */ /* line 598, ../../sass/screen.scss */
#lieu_widget .lieu-ui .map { #lieu_widget .lieu-ui .map {
height: 400px; height: 400px;
width: 100%; width: 100%;
} }
/* line 584, ../../sass/screen.scss */ /* line 602, ../../sass/screen.scss */
#lieu_widget .lieu-ui.hidden { #lieu_widget .lieu-ui.hidden {
display: none; display: none;
} }
/* line 587, ../../sass/screen.scss */ /* line 605, ../../sass/screen.scss */
#lieu_widget .lieu-ui .masked { #lieu_widget .lieu-ui .masked {
visibility: hidden; visibility: hidden;
} }
/* line 592, ../../sass/screen.scss */ /* line 610, ../../sass/screen.scss */
#lieu_widget .lieu-choixmodif { #lieu_widget .lieu-choixmodif {
display: none; display: none;
} }
/* line 597, ../../sass/screen.scss */ /* line 615, ../../sass/screen.scss */
#lieu_widget.modif .lieu-choixmodif { #lieu_widget.modif .lieu-choixmodif {
display: unset; display: unset;
} }
/* line 602, ../../sass/screen.scss */ /* line 620, ../../sass/screen.scss */
#lieu_widget.modif .lieu-ui, #lieu_widget.attente .lieu-ui { #lieu_widget.modif .lieu-ui, #lieu_widget.attente .lieu-ui {
display: none; display: none;
} }
/* line 609, ../../sass/screen.scss */ /* line 627, ../../sass/screen.scss */
#lieu_widget.edit .lieu-ui .lieu-acinput { #lieu_widget.edit .lieu-ui .lieu-acinput {
display: none; display: none;
} }
/* line 612, ../../sass/screen.scss */ /* line 630, ../../sass/screen.scss */
#lieu_widget.edit .lieu-ui .map { #lieu_widget.edit .lieu-ui .map {
height: 200px; height: 200px;
} }
/* line 618, ../../sass/screen.scss */ /* line 636, ../../sass/screen.scss */
#lieu_widget #avis_lieu_vide { #lieu_widget #avis_lieu_vide {
display: none; display: none;
} }
/* line 622, ../../sass/screen.scss */ /* line 640, ../../sass/screen.scss */
#lieu_widget .message { #lieu_widget .message {
background: #fddeb5; background: #fddeb5;
padding: 5px; padding: 5px;
font-style: italic; font-style: italic;
font-size: 0.9em; font-size: 0.9em;
} }
/* line 628, ../../sass/screen.scss */ /* line 646, ../../sass/screen.scss */
#lieu_widget .message.hidden { #lieu_widget .message.hidden {
display: none; display: none;
} }
/* line 634, ../../sass/screen.scss */ /* line 652, ../../sass/screen.scss */
a.lieu-change { a.lieu-change {
color: #fff; color: #fff;
background: #f99b20; background: #f99b20;
@ -975,25 +993,25 @@ a.lieu-change {
border-radius: 5px; border-radius: 5px;
margin-right: 7px; margin-right: 7px;
} }
/* line 646, ../../sass/screen.scss */ /* line 664, ../../sass/screen.scss */
a.lieu-change.ajout:before { a.lieu-change.ajout:before {
content: "+"; content: "+";
margin-right: 5px; margin-right: 5px;
} }
/* line 652, ../../sass/screen.scss */ /* line 670, ../../sass/screen.scss */
#stages-map { #stages-map {
width: 100%; width: 100%;
height: 600px; height: 600px;
max-height: 90vh; max-height: 90vh;
} }
/* line 659, ../../sass/screen.scss */ /* line 677, ../../sass/screen.scss */
#id_stage-thematiques { #id_stage-thematiques {
display: none; display: none;
} }
/* line 665, ../../sass/screen.scss */ /* line 683, ../../sass/screen.scss */
.homeh1 { .homeh1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -1003,26 +1021,26 @@ a.lieu-change.ajout:before {
border-bottom: 3px solid #000; border-bottom: 3px solid #000;
margin-bottom: 15px; margin-bottom: 15px;
} }
/* line 674, ../../sass/screen.scss */ /* line 692, ../../sass/screen.scss */
.homeh1 h1 { .homeh1 h1 {
margin-bottom: 3px; margin-bottom: 3px;
} }
/* line 678, ../../sass/screen.scss */ /* line 696, ../../sass/screen.scss */
.homeh1 > * { .homeh1 > * {
display: inline-block; display: inline-block;
} }
/* line 681, ../../sass/screen.scss */ /* line 699, ../../sass/screen.scss */
.homeh1 p { .homeh1 p {
text-align: right; text-align: right;
} }
/* line 686, ../../sass/screen.scss */ /* line 704, ../../sass/screen.scss */
.betacadre { .betacadre {
background: #fa6cae; background: #fa6cae;
padding: 10px; padding: 10px;
} }
/* line 691, ../../sass/screen.scss */ /* line 709, ../../sass/screen.scss */
.entrer { .entrer {
background: #fff; background: #fff;
max-width: 500px; max-width: 500px;
@ -1031,84 +1049,84 @@ a.lieu-change.ajout:before {
margin: 15px auto; margin: 15px auto;
} }
/* line 699, ../../sass/screen.scss */ /* line 717, ../../sass/screen.scss */
article.promo { article.promo {
display: block; display: block;
font-size: 1.1em; font-size: 1.1em;
} }
/* line 703, ../../sass/screen.scss */ /* line 721, ../../sass/screen.scss */
article.promo .explications { article.promo .explications {
display: table; display: table;
} }
/* line 706, ../../sass/screen.scss */ /* line 724, ../../sass/screen.scss */
article.promo .explications:first-child { article.promo .explications:first-child {
direction: rtl; direction: rtl;
} }
/* line 708, ../../sass/screen.scss */ /* line 726, ../../sass/screen.scss */
article.promo .explications:first-child > * { article.promo .explications:first-child > * {
direction: ltr; direction: ltr;
} }
/* line 713, ../../sass/screen.scss */ /* line 731, ../../sass/screen.scss */
article.promo .explications > div { article.promo .explications > div {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
text-align: center; text-align: center;
} }
/* line 718, ../../sass/screen.scss */ /* line 736, ../../sass/screen.scss */
article.promo .explications > div p { article.promo .explications > div p {
margin: 15px 15px; margin: 15px 15px;
} }
/* line 726, ../../sass/screen.scss */ /* line 744, ../../sass/screen.scss */
.faq-toc { .faq-toc {
font-family: "Lato", sans-serif; font-family: "Lato", sans-serif;
display: block; display: block;
max-width: 700px; max-width: 700px;
margin: 0 auto; margin: 0 auto;
} }
/* line 731, ../../sass/screen.scss */ /* line 749, ../../sass/screen.scss */
.faq-toc ul { .faq-toc ul {
margin: 20px; margin: 20px;
} }
/* line 735, ../../sass/screen.scss */ /* line 753, ../../sass/screen.scss */
.faq-toc ul li a { .faq-toc ul li a {
color: #000; color: #000;
display: block; display: block;
padding: 5px; padding: 5px;
} }
/* line 741, ../../sass/screen.scss */ /* line 759, ../../sass/screen.scss */
.faq-toc ul li.toc-h1 { .faq-toc ul li.toc-h1 {
display: none; display: none;
} }
/* line 745, ../../sass/screen.scss */ /* line 763, ../../sass/screen.scss */
.faq-toc ul li.toc-h2 a { .faq-toc ul li.toc-h2 a {
background: #fcc883; background: #fcc883;
} }
/* line 749, ../../sass/screen.scss */ /* line 767, ../../sass/screen.scss */
.faq-toc ul li.toc-h3 a { .faq-toc ul li.toc-h3 a {
padding-left: 10px; padding-left: 10px;
background: #fff; background: #fff;
font-weight: normal; font-weight: normal;
} }
/* line 755, ../../sass/screen.scss */ /* line 773, ../../sass/screen.scss */
.faq-toc ul li a:hover { .faq-toc ul li a:hover {
color: #395214; color: #395214;
background: #bce085 !important; background: #bce085 !important;
} }
/* line 764, ../../sass/screen.scss */ /* line 782, ../../sass/screen.scss */
.faq article { .faq article {
background: #fff; background: #fff;
padding: 15px; padding: 15px;
} }
/* line 767, ../../sass/screen.scss */ /* line 785, ../../sass/screen.scss */
.faq article h2 { .faq article h2 {
background-color: #fcc883; background-color: #fcc883;
color: #ae6505; color: #ae6505;
margin: -15px; margin: -15px;
padding: 15px; padding: 15px;
} }
/* line 774, ../../sass/screen.scss */ /* line 792, ../../sass/screen.scss */
.faq article h3 { .faq article h3 {
color: #0f4c82; color: #0f4c82;
background-color: #9dcbf3; background-color: #9dcbf3;
@ -1116,19 +1134,19 @@ article.promo .explications > div p {
margin-top: 30px; margin-top: 30px;
padding: 10px 15px; padding: 10px 15px;
} }
/* line 781, ../../sass/screen.scss */ /* line 799, ../../sass/screen.scss */
.faq article h3:nth-child(2) { .faq article h3:nth-child(2) {
margin-top: 0; margin-top: 0;
} }
/* line 786, ../../sass/screen.scss */ /* line 804, ../../sass/screen.scss */
.faq article ul { .faq article ul {
padding-left: 20px; padding-left: 20px;
} }
/* line 788, ../../sass/screen.scss */ /* line 806, ../../sass/screen.scss */
.faq article ul li { .faq article ul li {
list-style: initial; list-style: initial;
} }
/* line 793, ../../sass/screen.scss */ /* line 811, ../../sass/screen.scss */
.faq article p, .faq article ul { .faq article p, .faq article ul {
font-family: "Lato", sans-serif; font-family: "Lato", sans-serif;
font-size: 18px; font-size: 18px;
@ -1376,22 +1394,27 @@ section.content.recherche.vue-hybride.vue-details .recherche-liste.recherche-det
section.content.recherche .recherche-liste .dates .detail { section.content.recherche .recherche-liste .dates .detail {
display: none; display: none;
} }
/* line 243, ../../sass/_recherche.scss */
ul.messages {
display: none;
}
} }
@media screen and (max-width: 500px), screen and (max-width: 800px) and (orientation: portrait) { @media screen and (max-width: 500px), screen and (max-width: 800px) and (orientation: portrait) {
/* line 247, ../../sass/_recherche.scss */ /* line 251, ../../sass/_recherche.scss */
section.content.recherche form.recherche .generale span input { section.content.recherche form.recherche .generale span input {
font-size: 0.9em; font-size: 0.9em;
flex: 1; flex: 1;
} }
/* line 251, ../../sass/_recherche.scss */ /* line 255, ../../sass/_recherche.scss */
section.content.recherche form.recherche .generale span input[type=submit] { section.content.recherche form.recherche .generale span input[type=submit] {
white-space: normal; white-space: normal;
} }
/* line 255, ../../sass/_recherche.scss */ /* line 259, ../../sass/_recherche.scss */
section.content.recherche.vue-hybride, section.content.recherche.vue-carte { section.content.recherche.vue-hybride, section.content.recherche.vue-carte {
flex-direction: column; flex-direction: column;
} }
/* line 256, ../../sass/_recherche.scss */ /* line 260, ../../sass/_recherche.scss */
section.content.recherche.vue-hybride .recherche-liste, section.content.recherche.vue-carte .recherche-liste { section.content.recherche.vue-hybride .recherche-liste, section.content.recherche.vue-carte .recherche-liste {
max-width: 100vw; max-width: 100vw;
min-width: unset; min-width: unset;

View file

@ -31,7 +31,7 @@
{% endif %} {% endif %}
<li><a href="{% url 'avisstage:faq' %}">FAQ</a></li> <li><a href="{% url 'avisstage:faq' %}">FAQ</a></li>
{% if user.is_staff %} {% if user.is_staff %}
<li><a href="{% url 'admin:index' %}">Admin</a></li> <li><a href="{% url 'avisstage:moderation' %}">Modo</a></li>
{% endif %} {% endif %}
{% if user.is_authenticated %} {% if user.is_authenticated %}
<li><a href="{% url 'logout' %}"><span class="username">{{ user.username }}</span><br/> Déconnexion</a></li> <li><a href="{% url 'logout' %}"><span class="username">{{ user.username }}</span><br/> Déconnexion</a></li>

View file

@ -0,0 +1,28 @@
{% extends "avisstage/base.html" %}
{% load staticfiles %}
{% block title %}Statistiques - ExperiENS{% endblock %}
{% block content %}
<h1>Statistiques</h1>
{% if user.is_superuser %}
<p><a href="{% url "admin:index" %}">Administration de django</a></p>
{% endif %}
<article>
<h2>Stages</h2>
<p>{{ num_stages }} stages créés, {{ num_stages_pub }} stages publiés</p>
<p>{% for npm in num_par_matiere %}
{{ npm.scount }} en {{ npm.matieres__nom }},
{% endfor %}
</p>
<h2>Utilisateurs</h2>
<p>{{ num_users }} utilisateurs connectés au moins une fois, {{ num_auteurs }} ont écrit une fiche</p>
<p>{% for nsta, naut in num_par_auteur %}
{{ naut }} en {{ naut|pluralize:"a,ont" }} écrit {{ nsta }},
{% endfor %}
</p>
<h2>Lieux</h2>
<p>{{ num_lieux_utiles }} lieux ont un stage associé</p>
</article>
{% endblock %}

View file

@ -24,5 +24,6 @@ urlpatterns = [
url(r'^recherche/$', views.recherche, name='recherche'), url(r'^recherche/$', views.recherche, name='recherche'),
url(r'^recherche/resultats/$', views.recherche_resultats, name='recherche_resultats'), url(r'^recherche/resultats/$', views.recherche_resultats, name='recherche_resultats'),
url(r'^feedback/$', views.feedback, name='feedback'), url(r'^feedback/$', views.feedback, name='feedback'),
url(r'^moderation/$', views.statistiques, name='moderation'),
url(r'^api/', include(v1_api.urls)), url(r'^api/', include(v1_api.urls)),
] ]

View file

@ -6,11 +6,13 @@ from django.views.generic import DetailView, ListView
from django.views.generic.edit import UpdateView, CreateView from django.views.generic.edit import UpdateView, CreateView
from django import forms from django import forms
from django.urls import reverse from django.urls import reverse
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from braces.views import LoginRequiredMixin from braces.views import LoginRequiredMixin
from django.http import JsonResponse, HttpResponseForbidden from django.http import JsonResponse, HttpResponseForbidden
from django.core.mail import send_mail from django.core.mail import send_mail
from django.db.models import Q from django.db.models import Q, Count
from collections import Counter
from avisstage.models import Normalien, Stage, Lieu, AvisLieu, AvisStage from avisstage.models import Normalien, Stage, Lieu, AvisLieu, AvisStage
from avisstage.forms import StageForm, LieuForm, AvisStageForm, AvisLieuForm, FeedbackForm from avisstage.forms import StageForm, LieuForm, AvisStageForm, AvisLieuForm, FeedbackForm
@ -258,3 +260,27 @@ def feedback(request):
else: else:
form = FeedbackForm() form = FeedbackForm()
return render(request, 'avisstage/formulaire/feedback.html', {"form": form}) return render(request, 'avisstage/formulaire/feedback.html', {"form": form})
#
# STATISTIQUES
#
@login_required
@staff_member_required
def statistiques(request):
nstages = Stage.objects.count()
npubstages = Stage.objects.filter(public=True).count()
nbymatiere = Stage.objects.values('matieres__nom').annotate(scount=Count('matieres__nom'))
nusers = Normalien.objects.count()
nauts = Normalien.objects.filter(stages__isnull=False).distinct().count()
nbyaut = Counter(Normalien.objects.filter(stages__isnull=False).annotate(scount=Count('stages')).values_list('scount', flat="True")).items()
nlieux = Lieu.objects.filter(stages__isnull=False).distinct().count()
return render(request, 'avisstage/moderation/statistiques.html',
{'num_stages': nstages,
'num_stages_pub': npubstages,
'num_par_matiere': nbymatiere,
'num_users': nusers,
'num_auteurs': nauts,
'num_par_auteur': nbyaut,
'num_lieux_utiles': nlieux})