Debug maps HTTPS + différents détails

This commit is contained in:
Evarin 2017-04-27 02:38:08 +02:00
parent 836b9a9fef
commit 1dbe2aeb0e
17 changed files with 657 additions and 132 deletions

View file

@ -48,15 +48,16 @@ class AvisLieuForm(HTMLTrimmerForm):
} }
class StageForm(forms.ModelForm): class StageForm(forms.ModelForm):
date_widget = forms.DateInput(attrs={"class":"datepicker"}) date_widget = forms.DateInput(attrs={"class":"datepicker", "placeholder":"JJ/MM/AAAA"})
date_debut = forms.DateField(label=u"Date de début", input_formats=["%d/%m/%Y"], widget=date_widget) date_debut = forms.DateField(label=u"Date de début", input_formats=["%d/%m/%Y"], widget=date_widget)
date_fin = forms.DateField(label=u"Date de fin", input_formats=["%d/%m/%Y"], widget=date_widget) date_fin = forms.DateField(label=u"Date de fin", input_formats=["%d/%m/%Y"], widget=date_widget)
class Meta: class Meta:
model = Stage model = Stage
fields = ['sujet', 'date_debut', 'date_fin', 'type_stage', 'thematiques', 'matieres', 'encadrants'] fields = ['sujet', 'date_debut', 'date_fin', 'type_stage', 'thematiques', 'matieres', 'structure', 'encadrants']
help_texts = { help_texts = {
"thematiques": u"Mettez une virgule pour valider votre thématique si la suggestion ne correspond pas ou si elle n'existe pas encore" "thematiques": u"Mettez une virgule pour valider votre thématique si la suggestion ne correspond pas ou si elle n'existe pas encore",
"structure": u"Nom de l'équipe, de la startup..."
} }
labels = { labels = {
"date_debut": u"Date de début", "date_debut": u"Date de début",

View file

@ -67,10 +67,12 @@ def create_user_profile(sender, instance, created, **kwargs):
if dirs[1] == 'users': if dirs[1] == 'users':
annee = dirs[2] annee = dirs[2]
dep = dirs[4] dep = dirs[4]
dep = dict(DEPARTEMENTS_DEFAUT).get('dep') dep = dict(DEPARTEMENTS_DEFAUT).get(dep.lower(), '')
profil.promotion = u'%s %s' % (dep, annee) profil.promotion = u'%s %s' % (dep, annee)
profil.mail = infos.get('mailRoutingAddress', pmail = infos.get('mailRoutingAddress',
['%s@clipper.ens.fr'%instance.username]) ['%s@clipper.ens.fr'%instance.username])
if len(pmail) > 1:
profil.mail = pmail[0]
profil.save() profil.save()
except ldap.LDAPError: except ldap.LDAPError:
pass pass
@ -150,6 +152,7 @@ class Stage(models.Model):
thematiques = TaggableManager(u"Thématiques", blank=True) thematiques = TaggableManager(u"Thématiques", blank=True)
matieres = models.ManyToManyField(StageMatiere, verbose_name=u"Matière(s)", related_name="stages") matieres = models.ManyToManyField(StageMatiere, verbose_name=u"Matière(s)", related_name="stages")
encadrants = models.CharField(u"Encadrant⋅e⋅s", max_length=500, blank=True) encadrants = models.CharField(u"Encadrant⋅e⋅s", max_length=500, blank=True)
structure = models.CharField(u"Structure d'accueil", max_length=500, blank=True)
# Avis # Avis
lieux = models.ManyToManyField(Lieu, related_name="stages", lieux = models.ManyToManyField(Lieu, related_name="stages",

View file

@ -8,15 +8,18 @@ $compl: #f99b20;
$jaune: #fff60a; $jaune: #fff60a;
$vert: #1a82dd;//09f7b0; $vert: #1a82dd;//09f7b0;
$rouge: #f70978; $rouge: #f70978;
$staticurl: "/experiens/static/";
$textfont: 'Dosis', sans-serif; $textfont: 'Dosis', sans-serif;
$textfontsize: 19px;
$headfont: Podkova, serif; $headfont: Podkova, serif;
body { body {
background: $fond; background: $fond;
font-family: $textfont; font-family: $textfont;
line-height: 1.4; line-height: 1.4;
font-size: 19px; font-size: $textfontsize;
font-weight: 300; font-weight: 300;
} }
@ -383,6 +386,7 @@ input[type='text'], input[type='password'], input[type='email'], textarea, selec
input[type="submit"], input[type="submit"],
.btn { .btn {
font: $textfontsize $textfont;
background-color: $fond; background-color: $fond;
color: #fff; color: #fff;
border: 1px solid $fond * 0.7; border: 1px solid $fond * 0.7;
@ -394,7 +398,8 @@ input[type="submit"],
} }
p input[type="submit"], p input[type="submit"],
p .btn { p .btn,
h1 .btn {
display:inline-block; display:inline-block;
} }
@ -667,3 +672,18 @@ article.promo {
#id_stage-thematiques { #id_stage-thematiques {
display: none; display: none;
} }
.edit-btn {
border-color:darken($jaune, 30%);
color: #000;
background: url($staticurl + "images/edit.svg") no-repeat right center;
background-color:lighten($jaune, 10%);
background-origin: content-box;
background-size: contain;
&:after {
content:"";
width: 30px;
display: inline-block;
}
}

View file

@ -65,7 +65,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu,
display: block; display: block;
} }
/* line 15, ../../sass/screen.scss */ /* line 18, ../../sass/screen.scss */
body { body {
background: #8fcc33; background: #8fcc33;
font-family: "Dosis", sans-serif; font-family: "Dosis", sans-serif;
@ -74,32 +74,32 @@ body {
font-weight: 300; font-weight: 300;
} }
/* line 23, ../../sass/screen.scss */ /* line 26, ../../sass/screen.scss */
h1, h2, h3, h4 { h1, h2, h3, h4 {
font-family: Podkova, serif; font-family: Podkova, serif;
} }
/* line 27, ../../sass/screen.scss */ /* line 30, ../../sass/screen.scss */
h1 { h1 {
font-size: 2.3em; font-size: 2.3em;
} }
/* line 31, ../../sass/screen.scss */ /* line 34, ../../sass/screen.scss */
h2 { h2 {
font-size: 1.8em; font-size: 1.8em;
} }
/* line 35, ../../sass/screen.scss */ /* line 38, ../../sass/screen.scss */
h3 { h3 {
font-size: 1.4em; font-size: 1.4em;
} }
/* line 39, ../../sass/screen.scss */ /* line 42, ../../sass/screen.scss */
b, strong, em { b, strong, em {
font-weight: bold; font-weight: bold;
} }
/* line 43, ../../sass/screen.scss */ /* line 46, ../../sass/screen.scss */
.beta { .beta {
opacity: 0.5; opacity: 0.5;
font-size: 0.7em; font-size: 0.7em;
@ -107,29 +107,29 @@ b, strong, em {
transform: translate(-1em, 0.6em) rotate(-15deg); transform: translate(-1em, 0.6em) rotate(-15deg);
} }
/* line 50, ../../sass/screen.scss */ /* line 53, ../../sass/screen.scss */
a { a {
font-weight: bold; font-weight: bold;
color: #e08c1d; color: #e08c1d;
text-decoration: none; text-decoration: none;
} }
/* line 56, ../../sass/screen.scss */ /* line 59, ../../sass/screen.scss */
header { header {
background: #72a329; background: #72a329;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
/* line 62, ../../sass/screen.scss */ /* line 65, ../../sass/screen.scss */
header nav ul { header nav ul {
display: inline-flex; display: inline-flex;
} }
/* line 65, ../../sass/screen.scss */ /* line 68, ../../sass/screen.scss */
header nav ul li { header nav ul li {
display: inline-table; display: inline-table;
} }
/* line 68, ../../sass/screen.scss */ /* line 71, ../../sass/screen.scss */
header nav ul li a { header nav ul li a {
text-align: center; text-align: center;
display: table-cell; display: table-cell;
@ -138,34 +138,34 @@ header nav ul li a {
vertical-align: middle; vertical-align: middle;
color: #e9f5d6; color: #e9f5d6;
} }
/* line 76, ../../sass/screen.scss */ /* line 79, ../../sass/screen.scss */
header nav ul li a:hover { header nav ul li a:hover {
background: #446219; background: #446219;
} }
/* line 83, ../../sass/screen.scss */ /* line 86, ../../sass/screen.scss */
header a { header a {
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
} }
/* line 88, ../../sass/screen.scss */ /* line 91, ../../sass/screen.scss */
header h1 { header h1 {
padding: 15px; padding: 15px;
word-wrap: none; word-wrap: none;
} }
/* line 98, ../../sass/screen.scss */ /* line 101, ../../sass/screen.scss */
.content { .content {
background: #efefef; background: #efefef;
max-width: 900px; max-width: 900px;
padding: 30px; padding: 30px;
margin: 15px auto; margin: 15px auto;
} }
/* line 104, ../../sass/screen.scss */ /* line 107, ../../sass/screen.scss */
.content p { .content p {
margin: 0.5em 0; margin: 0.5em 0;
} }
/* line 111, ../../sass/screen.scss */ /* line 114, ../../sass/screen.scss */
.homeh1 { .homeh1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -175,33 +175,33 @@ header h1 {
border-bottom: 3px solid #000; border-bottom: 3px solid #000;
margin-bottom: 15px; margin-bottom: 15px;
} }
/* line 120, ../../sass/screen.scss */ /* line 123, ../../sass/screen.scss */
.homeh1 > * { .homeh1 > * {
display: inline-block; display: inline-block;
} }
/* line 130, ../../sass/screen.scss */ /* line 133, ../../sass/screen.scss */
.stagelist li { .stagelist li {
display: table; display: table;
width: 100%; width: 100%;
background: #fff; background: #fff;
margin: 12px; margin: 12px;
} }
/* line 137, ../../sass/screen.scss */ /* line 140, ../../sass/screen.scss */
.stagelist li > *, .stagelist li:before { .stagelist li > *, .stagelist li:before {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
padding: 15px; padding: 15px;
} }
/* line 142, ../../sass/screen.scss */ /* line 145, ../../sass/screen.scss */
.stagelist li a { .stagelist li a {
width: auto; width: auto;
} }
/* line 144, ../../sass/screen.scss */ /* line 147, ../../sass/screen.scss */
.stagelist li a:hover { .stagelist li a:hover {
background: #ccc; background: #ccc;
} }
/* line 148, ../../sass/screen.scss */ /* line 151, ../../sass/screen.scss */
.stagelist li:before { .stagelist li:before {
content: ""; content: "";
text-align: right; text-align: right;
@ -209,27 +209,27 @@ header h1 {
opacity: 0.8; opacity: 0.8;
color: #000; color: #000;
} }
/* line 155, ../../sass/screen.scss */ /* line 158, ../../sass/screen.scss */
.stagelist li.stage-brouillon:before { .stagelist li.stage-brouillon:before {
content: "Brouillon"; content: "Brouillon";
background: #f93a93; background: #f93a93;
} }
/* line 159, ../../sass/screen.scss */ /* line 162, ../../sass/screen.scss */
.stagelist li.stage-publie:before { .stagelist li.stage-publie:before {
content: "Publié"; content: "Publié";
background: #419be9; background: #419be9;
} }
/* line 163, ../../sass/screen.scss */ /* line 166, ../../sass/screen.scss */
.stagelist li.stage-ajout:before { .stagelist li.stage-ajout:before {
content: "+"; content: "+";
color: #000; color: #000;
} }
/* line 172, ../../sass/screen.scss */ /* line 175, ../../sass/screen.scss */
article.stage { article.stage {
font-weight: normal; font-weight: normal;
} }
/* line 175, ../../sass/screen.scss */ /* line 178, ../../sass/screen.scss */
article.stage h2 { article.stage h2 {
background: #ddda78; background: #ddda78;
color: #fff; color: #fff;
@ -238,7 +238,7 @@ article.stage h2 {
margin-bottom: 25px; margin-bottom: 25px;
text-shadow: -3px 3px 0 rgba(0, 0, 0, 0.3); text-shadow: -3px 3px 0 rgba(0, 0, 0, 0.3);
} }
/* line 183, ../../sass/screen.scss */ /* line 186, ../../sass/screen.scss */
article.stage h3 { article.stage h3 {
border-bottom: 2px solid #cb954e; border-bottom: 2px solid #cb954e;
margin-left: -25px; margin-left: -25px;
@ -248,35 +248,35 @@ article.stage h3 {
color: #000; color: #000;
text-shadow: -3px 3px 0 rgba(0, 0, 0, 0.1); text-shadow: -3px 3px 0 rgba(0, 0, 0, 0.1);
} }
/* line 194, ../../sass/screen.scss */ /* line 197, ../../sass/screen.scss */
article.stage #stage-map { article.stage #stage-map {
height: 300px; height: 300px;
width: 100%; width: 100%;
} }
/* line 199, ../../sass/screen.scss */ /* line 202, ../../sass/screen.scss */
article.stage section { article.stage section {
background: #eee; background: #eee;
padding: 14px; padding: 14px;
max-width: 600px; max-width: 600px;
margin: 30px auto; margin: 30px auto;
} }
/* line 205, ../../sass/screen.scss */ /* line 208, ../../sass/screen.scss */
article.stage section:first-child { article.stage section:first-child {
margin-top: 0; margin-top: 0;
} }
/* line 207, ../../sass/screen.scss */ /* line 210, ../../sass/screen.scss */
article.stage section:first-child h3 { article.stage section:first-child h3 {
margin-top: 0; margin-top: 0;
} }
/* line 212, ../../sass/screen.scss */ /* line 215, ../../sass/screen.scss */
article.stage section.misc { article.stage section.misc {
padding-top: 0; padding-top: 0;
} }
/* line 214, ../../sass/screen.scss */ /* line 217, ../../sass/screen.scss */
article.stage section.misc ul.infos { article.stage section.misc ul.infos {
margin: 0 -3px; margin: 0 -3px;
} }
/* line 217, ../../sass/screen.scss */ /* line 220, ../../sass/screen.scss */
article.stage section.misc ul.infos li { article.stage section.misc ul.infos li {
display: inline-block; display: inline-block;
padding: 5px; padding: 5px;
@ -286,42 +286,42 @@ article.stage section.misc ul.infos li {
font-size: 0.9em; font-size: 0.9em;
border-radius: 4px; border-radius: 4px;
} }
/* line 226, ../../sass/screen.scss */ /* line 229, ../../sass/screen.scss */
article.stage section.misc ul.infos li.thematique { article.stage section.misc ul.infos li.thematique {
background-color: #f99b20; background-color: #f99b20;
} }
/* line 229, ../../sass/screen.scss */ /* line 232, ../../sass/screen.scss */
article.stage section.misc ul.infos li.matiere { article.stage section.misc ul.infos li.matiere {
background-color: #8fcc33; background-color: #8fcc33;
} }
/* line 236, ../../sass/screen.scss */ /* line 239, ../../sass/screen.scss */
article.stage section .chapo, article.stage section .avis-texte { article.stage section .chapo, article.stage section .avis-texte {
margin-bottom: 15px; margin-bottom: 15px;
background: #fff; background: #fff;
padding: 20px; padding: 20px;
} }
/* line 241, ../../sass/screen.scss */ /* line 244, ../../sass/screen.scss */
article.stage section .chapo { article.stage section .chapo {
font-size: 1.1em; font-size: 1.1em;
font-weight: 500; font-weight: 500;
font-variant: small-caps; font-variant: small-caps;
} }
/* line 246, ../../sass/screen.scss */ /* line 249, ../../sass/screen.scss */
article.stage section .avis-texte { article.stage section .avis-texte {
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
padding-left: 15px; padding-left: 15px;
} }
/* line 251, ../../sass/screen.scss */ /* line 254, ../../sass/screen.scss */
article.stage section .plusmoins { article.stage section .plusmoins {
max-width: 600px; max-width: 600px;
margin: 15px auto; margin: 15px auto;
} }
/* line 255, ../../sass/screen.scss */ /* line 258, ../../sass/screen.scss */
article.stage section .plusmoins > div { article.stage section .plusmoins > div {
display: table; display: table;
width: 100%; width: 100%;
} }
/* line 259, ../../sass/screen.scss */ /* line 262, ../../sass/screen.scss */
article.stage section .plusmoins > div:before { article.stage section .plusmoins > div:before {
content: "&nbsp"; content: "&nbsp";
width: 100px; width: 100px;
@ -330,101 +330,101 @@ article.stage section .plusmoins > div:before {
text-align: right; text-align: right;
padding-right: 12px; padding-right: 12px;
} }
/* line 268, ../../sass/screen.scss */ /* line 271, ../../sass/screen.scss */
article.stage section .plusmoins > div > *, article.stage section .plusmoins > div:before { article.stage section .plusmoins > div > *, article.stage section .plusmoins > div:before {
display: table-cell; display: table-cell;
} }
/* line 272, ../../sass/screen.scss */ /* line 275, ../../sass/screen.scss */
article.stage section .plusmoins > div > div { article.stage section .plusmoins > div > div {
padding: 15px; padding: 15px;
color: #fff; color: #fff;
} }
/* line 275, ../../sass/screen.scss */ /* line 278, ../../sass/screen.scss */
article.stage section .plusmoins > div > div h4 { article.stage section .plusmoins > div > div h4 {
font-weight: normal; font-weight: normal;
margin-left: -5px; margin-left: -5px;
font-size: 0.9em; font-size: 0.9em;
opacity: 0.9; opacity: 0.9;
} }
/* line 281, ../../sass/screen.scss */ /* line 284, ../../sass/screen.scss */
article.stage section .plusmoins > div > div p { article.stage section .plusmoins > div > div p {
font-weight: bold; font-weight: bold;
margin: 2px; margin: 2px;
} }
/* line 289, ../../sass/screen.scss */ /* line 292, ../../sass/screen.scss */
article.stage section .plusmoins .plus > div { article.stage section .plusmoins .plus > div {
background: #1775c6; background: #1775c6;
} }
/* line 292, ../../sass/screen.scss */ /* line 295, ../../sass/screen.scss */
article.stage section .plusmoins .plus:before { article.stage section .plusmoins .plus:before {
content: "Les +"; content: "Les +";
vertical-align: bottom; vertical-align: bottom;
color: #1567af; color: #1567af;
} }
/* line 299, ../../sass/screen.scss */ /* line 302, ../../sass/screen.scss */
article.stage section .plusmoins .moins > div { article.stage section .plusmoins .moins > div {
background: #df076c; background: #df076c;
} }
/* line 302, ../../sass/screen.scss */ /* line 305, ../../sass/screen.scss */
article.stage section .plusmoins .moins:before { article.stage section .plusmoins .moins:before {
content: "Les -"; content: "Les -";
vertical-align: top; vertical-align: top;
color: #c70660; color: #c70660;
} }
/* line 312, ../../sass/screen.scss */ /* line 315, ../../sass/screen.scss */
.edit-box { .edit-box {
background: #eee; background: #eee;
margin: 10px; margin: 10px;
padding: 10px 20px; padding: 10px 20px;
text-align: center; text-align: center;
} }
/* line 318, ../../sass/screen.scss */ /* line 321, ../../sass/screen.scss */
.edit-box.public { .edit-box.public {
background: #cae3f9; background: #cae3f9;
border: 1px solid #125b9b; border: 1px solid #125b9b;
} }
/* line 323, ../../sass/screen.scss */ /* line 326, ../../sass/screen.scss */
.edit-box.prive { .edit-box.prive {
background: #fdcfe4; background: #fdcfe4;
border: 1px solid #ad0654; border: 1px solid #ad0654;
} }
/* line 330, ../../sass/screen.scss */ /* line 333, ../../sass/screen.scss */
.article-wrapper { .article-wrapper {
display: table; display: table;
} }
/* line 332, ../../sass/screen.scss */ /* line 335, ../../sass/screen.scss */
.article-wrapper .toc-wrapper, .article-wrapper article { .article-wrapper .toc-wrapper, .article-wrapper article {
display: table-cell; display: table-cell;
vertical-align: top; vertical-align: top;
} }
/* line 336, ../../sass/screen.scss */ /* line 339, ../../sass/screen.scss */
.article-wrapper .toc-wrapper { .article-wrapper .toc-wrapper {
max-width: 250px; max-width: 250px;
width: 25%; width: 25%;
} }
/* line 340, ../../sass/screen.scss */ /* line 343, ../../sass/screen.scss */
.article-wrapper .toc { .article-wrapper .toc {
position: -webkit-sticky; position: -webkit-sticky;
position: sticky; position: sticky;
top: 0; top: 0;
} }
/* line 344, ../../sass/screen.scss */ /* line 347, ../../sass/screen.scss */
.article-wrapper .toc a { .article-wrapper .toc a {
color: inherit; color: inherit;
font-weight: normal; font-weight: normal;
} }
/* line 351, ../../sass/screen.scss */ /* line 354, ../../sass/screen.scss */
.article-wrapper .toc .toc-h3 a { .article-wrapper .toc .toc-h3 a {
font-weight: 300; font-weight: 300;
} }
/* line 354, ../../sass/screen.scss */ /* line 357, ../../sass/screen.scss */
.article-wrapper .toc .toc-active a { .article-wrapper .toc .toc-active a {
color: #8fcc33; color: #8fcc33;
} }
/* line 363, ../../sass/screen.scss */ /* line 366, ../../sass/screen.scss */
input, textarea, select, div.tinymce { input, textarea, select, div.tinymce {
background: #fff; background: #fff;
font-size: 1em; font-size: 1em;
@ -434,7 +434,7 @@ input, textarea, select, div.tinymce {
padding: 5px; padding: 5px;
} }
/* line 372, ../../sass/screen.scss */ /* line 375, ../../sass/screen.scss */
input[type='text'], input[type='password'], input[type='email'], textarea, select { input[type='text'], input[type='password'], input[type='email'], textarea, select {
border: none; border: none;
border-bottom: 1px solid #8fcc33; border-bottom: 1px solid #8fcc33;
@ -442,14 +442,15 @@ input[type='text'], input[type='password'], input[type='email'], textarea, selec
max-width: 100%; max-width: 100%;
transition: border 1s ease-out, background 1s ease-out; transition: border 1s ease-out, background 1s ease-out;
} }
/* line 379, ../../sass/screen.scss */ /* line 382, ../../sass/screen.scss */
input[type='text']:focus, input[type='password']:focus, input[type='email']:focus, textarea:focus, select:focus { input[type='text']:focus, input[type='password']:focus, input[type='email']:focus, textarea:focus, select:focus {
background-color: white; background-color: white;
} }
/* line 384, ../../sass/screen.scss */ /* line 387, ../../sass/screen.scss */
input[type="submit"], input[type="submit"],
.btn { .btn {
font: 19px "Dosis", sans-serif;
background-color: #8fcc33; background-color: #8fcc33;
color: #fff; color: #fff;
border: 1px solid #648f24; border: 1px solid #648f24;
@ -460,13 +461,14 @@ input[type="submit"],
margin-right: 0; margin-right: 0;
} }
/* line 396, ../../sass/screen.scss */ /* line 400, ../../sass/screen.scss */
p input[type="submit"], p input[type="submit"],
p .btn { p .btn,
h1 .btn {
display: inline-block; display: inline-block;
} }
/* line 402, ../../sass/screen.scss */ /* line 407, ../../sass/screen.scss */
select { select {
-moz-appearance: none; -moz-appearance: none;
appearance: none; appearance: none;
@ -475,7 +477,7 @@ select {
cursor: pointer; cursor: pointer;
} }
/* line 410, ../../sass/screen.scss */ /* line 415, ../../sass/screen.scss */
textarea, div.tinymce { textarea, div.tinymce {
border: none; border: none;
border-left: 1px solid #8fcc33; border-left: 1px solid #8fcc33;
@ -484,26 +486,26 @@ textarea, div.tinymce {
transition: border 1s ease-out, background 1s ease-out; transition: border 1s ease-out, background 1s ease-out;
} }
/* line 418, ../../sass/screen.scss */ /* line 423, ../../sass/screen.scss */
div.tinymce.mce-edit-focus { div.tinymce.mce-edit-focus {
background-color: white; background-color: white;
outline: none; outline: none;
} }
/* line 423, ../../sass/screen.scss */ /* line 428, ../../sass/screen.scss */
textarea { textarea {
height: 200px; height: 200px;
resize: vertical; resize: vertical;
} }
/* line 429, ../../sass/screen.scss */ /* line 434, ../../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 435, ../../sass/screen.scss */ /* line 440, ../../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;
@ -512,33 +514,33 @@ form .field label, form .field .label {
padding-top: 5px; padding-top: 5px;
flex-shrink: 0; flex-shrink: 0;
} }
/* line 443, ../../sass/screen.scss */ /* line 448, ../../sass/screen.scss */
form .field label { form .field label {
font-family: Podkova, serif; font-family: Podkova, serif;
font-weight: bold; font-weight: bold;
} }
/* line 447, ../../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 451, ../../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 460, ../../sass/screen.scss */ /* line 465, ../../sass/screen.scss */
ul.as-selections { ul.as-selections {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
/* line 464, ../../sass/screen.scss */ /* line 469, ../../sass/screen.scss */
ul.as-selections li { ul.as-selections li {
display: inline-block; display: inline-block;
} }
/* line 468, ../../sass/screen.scss */ /* line 473, ../../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;
@ -547,57 +549,57 @@ ul.as-selections .as-selection-item {
border-radius: 2px; border-radius: 2px;
font-weight: 500; font-weight: 500;
} }
/* line 476, ../../sass/screen.scss */ /* line 481, ../../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 483, ../../sass/screen.scss */ /* line 488, ../../sass/screen.scss */
ul.as-selections .as-selection-item.selected { ul.as-selections .as-selection-item.selected {
background: #8fcc33; background: #8fcc33;
} }
/* line 488, ../../sass/screen.scss */ /* line 493, ../../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 492, ../../sass/screen.scss */ /* line 497, ../../sass/screen.scss */
ul.as-selections .as-original input { ul.as-selections .as-original input {
width: 100%; width: 100%;
} }
/* line 498, ../../sass/screen.scss */ /* line 503, ../../sass/screen.scss */
div.as-results { div.as-results {
position: relative; position: relative;
} }
/* line 500, ../../sass/screen.scss */ /* line 505, ../../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 507, ../../sass/screen.scss */ /* line 512, ../../sass/screen.scss */
div.as-results ul li { div.as-results ul li {
padding: 3px 5px; padding: 3px 5px;
} }
/* line 513, ../../sass/screen.scss */ /* line 518, ../../sass/screen.scss */
div.as-results ul li.as-result-item.active { div.as-results ul li.as-result-item.active {
background: white; background: white;
} }
/* line 518, ../../sass/screen.scss */ /* line 523, ../../sass/screen.scss */
div.as-results ul li.as-message { div.as-results ul li.as-message {
font-style: italic; font-style: italic;
} }
/* line 525, ../../sass/screen.scss */ /* line 530, ../../sass/screen.scss */
#map_addlieu { #map_addlieu {
height: 500px; height: 500px;
} }
/* line 529, ../../sass/screen.scss */ /* line 534, ../../sass/screen.scss */
.window { .window {
display: none; display: none;
position: fixed; position: fixed;
@ -608,11 +610,11 @@ div.as-results ul li.as-message {
left: 0; left: 0;
z-index: 10; z-index: 10;
} }
/* line 539, ../../sass/screen.scss */ /* line 544, ../../sass/screen.scss */
.window.visible { .window.visible {
display: block; display: block;
} }
/* line 543, ../../sass/screen.scss */ /* line 548, ../../sass/screen.scss */
.window .window-bg { .window .window-bg {
background: #000; background: #000;
opacity: 0.7; opacity: 0.7;
@ -623,7 +625,7 @@ div.as-results ul li.as-message {
top: 0; top: 0;
z-index: -1; z-index: -1;
} }
/* line 554, ../../sass/screen.scss */ /* line 559, ../../sass/screen.scss */
.window .window-content { .window .window-content {
position: relative; position: relative;
margin: 0 auto; margin: 0 auto;
@ -637,7 +639,7 @@ div.as-results ul li.as-message {
max-height: 100%; max-height: 100%;
overflow: auto; overflow: auto;
} }
/* line 569, ../../sass/screen.scss */ /* line 574, ../../sass/screen.scss */
.window .window-closer { .window .window-closer {
position: absolute; position: absolute;
top: 0; top: 0;
@ -645,31 +647,31 @@ div.as-results ul li.as-message {
padding: 12px; padding: 12px;
z-index: 3; z-index: 3;
} }
/* line 575, ../../sass/screen.scss */ /* line 580, ../../sass/screen.scss */
.window .window-closer:after { .window .window-closer:after {
content: "×"; content: "×";
} }
/* line 582, ../../sass/screen.scss */ /* line 587, ../../sass/screen.scss */
.lieu-ui .map { .lieu-ui .map {
height: 400px; height: 400px;
width: 100%; width: 100%;
} }
/* line 586, ../../sass/screen.scss */ /* line 591, ../../sass/screen.scss */
.lieu-ui .hidden { .lieu-ui .hidden {
display: none; display: none;
} }
/* line 589, ../../sass/screen.scss */ /* line 594, ../../sass/screen.scss */
.lieu-ui .masked { .lieu-ui .masked {
visibility: hidden; visibility: hidden;
} }
/* line 594, ../../sass/screen.scss */ /* line 599, ../../sass/screen.scss */
#avis_lieu_vide { #avis_lieu_vide {
display: none; display: none;
} }
/* line 598, ../../sass/screen.scss */ /* line 603, ../../sass/screen.scss */
a.lieu-change { a.lieu-change {
color: #fff; color: #fff;
background: #f99b20; background: #f99b20;
@ -682,19 +684,19 @@ a.lieu-change {
border-radius: 5px; border-radius: 5px;
margin-right: 7px; margin-right: 7px;
} }
/* line 610, ../../sass/screen.scss */ /* line 615, ../../sass/screen.scss */
a.lieu-change.ajout:before { a.lieu-change.ajout:before {
content: "+"; content: "+";
margin-right: 5px; margin-right: 5px;
} }
/* line 616, ../../sass/screen.scss */ /* line 621, ../../sass/screen.scss */
#stages-map { #stages-map {
width: 100%; width: 100%;
height: 600px; height: 600px;
} }
/* line 621, ../../sass/screen.scss */ /* line 626, ../../sass/screen.scss */
#feedback-button { #feedback-button {
position: fixed; position: fixed;
left: 0; left: 0;
@ -707,13 +709,13 @@ a.lieu-change.ajout:before {
transform-origin: bottom left; transform-origin: bottom left;
} }
/* line 634, ../../sass/screen.scss */ /* line 639, ../../sass/screen.scss */
.betacadre { .betacadre {
background: #fa6cae; background: #fa6cae;
padding: 10px; padding: 10px;
} }
/* line 639, ../../sass/screen.scss */ /* line 644, ../../sass/screen.scss */
.entrer { .entrer {
background: #fff; background: #fff;
max-width: 500px; max-width: 500px;
@ -722,27 +724,43 @@ a.lieu-change.ajout:before {
margin: 15px auto; margin: 15px auto;
} }
/* line 647, ../../sass/screen.scss */ /* line 652, ../../sass/screen.scss */
article.promo { article.promo {
display: block; display: block;
font-size: 1.1em; font-size: 1.1em;
} }
/* line 651, ../../sass/screen.scss */ /* line 656, ../../sass/screen.scss */
article.promo .explications { article.promo .explications {
display: table; display: table;
} }
/* line 655, ../../sass/screen.scss */ /* line 660, ../../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 660, ../../sass/screen.scss */ /* line 665, ../../sass/screen.scss */
article.promo .explications > div p { article.promo .explications > div p {
margin: 15px 15px; margin: 15px 15px;
} }
/* line 667, ../../sass/screen.scss */ /* line 672, ../../sass/screen.scss */
#id_stage-thematiques { #id_stage-thematiques {
display: none; display: none;
} }
/* line 676, ../../sass/screen.scss */
.edit-btn {
border-color: #706c00;
color: #000;
background: url("/experiens/static/images/edit.svg") no-repeat right center;
background-color: #fff83d;
background-origin: content-box;
background-size: contain;
}
/* line 684, ../../sass/screen.scss */
.edit-btn:after {
content: "";
width: 30px;
display: inline-block;
}

View file

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="30"
height="30"
viewBox="0 0 30 30"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="edit-blanc.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="86.228624"
inkscape:cy="18.753803"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1366"
inkscape:window-height="720"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1022.3622)">
<g
id="g4372"
transform="matrix(0.1950975,0.12792324,-0.12792324,0.1950975,12.575109,970.01712)"
inkscape:transform-center-x="9.426612"
inkscape:transform-center-y="-184.76167"
style="fill:#ffffff">
<rect
y="178.07649"
x="153.93788"
height="108.57143"
width="25.714285"
id="rect4136"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" />
<path
inkscape:transform-center-y="2.4737558"
transform="matrix(0.67322984,0,0,0.45859357,53.904262,157.37111)"
d="m 186.37143,291.03041 -9.34305,16.18265 -9.34306,16.18266 -9.34306,-16.18266 -9.34306,-16.18265 18.68612,0 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="false"
sodipodi:arg2="0.52359878"
sodipodi:arg1="-0.52359878"
sodipodi:r2="10.788434"
sodipodi:r1="21.576868"
sodipodi:cy="301.81885"
sodipodi:cx="167.68532"
sodipodi:sides="3"
id="path4138"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"
sodipodi:type="star" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="30"
height="30"
viewBox="0 0 30 30"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="edit.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="86.228624"
inkscape:cy="18.753803"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1366"
inkscape:window-height="720"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1022.3622)">
<g
id="g4372"
transform="matrix(0.1950975,0.12792324,-0.12792324,0.1950975,12.575109,970.01712)"
inkscape:transform-center-x="9.426612"
inkscape:transform-center-y="-184.76167">
<rect
y="178.07649"
x="153.93788"
height="108.57143"
width="25.714285"
id="rect4136"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-opacity:1" />
<path
inkscape:transform-center-y="2.4737558"
transform="matrix(0.67322984,0,0,0.45859357,53.904262,157.37111)"
d="m 186.37143,291.03041 -9.34305,16.18265 -9.34306,16.18266 -9.34306,-16.18266 -9.34306,-16.18265 18.68612,0 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="false"
sodipodi:arg2="0.52359878"
sodipodi:arg1="-0.52359878"
sodipodi:r2="10.788434"
sodipodi:r1="21.576868"
sodipodi:cy="301.81885"
sodipodi:cx="167.68532"
sodipodi:sides="3"
id="path4138"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-opacity:1"
sodipodi:type="star" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -243,6 +243,7 @@ function SelectLieuWidget(STATIC_ROOT, API_LIEU, target, callback) {
content_el.append(form_el); content_el.append(form_el);
} else { } else {
lieux_db.suggestion.id = data.id; lieux_db.suggestion.id = data.id;
lieux_db.suggestion.nom = form_el.find("#id_nom").val();
callback(lieux_db.suggestion); callback(lieux_db.suggestion);
} }
} }

View file

@ -0,0 +1,293 @@
(function(exports) {
/*
* tile.stamen.js v1.3.0
*/
var SUBDOMAINS = "a. b. c. d.".split(" "),
MAKE_PROVIDER = function(layer, type, minZoom, maxZoom) {
return {
"url": ["//stamen-tiles-{s}a.ssl.fastly.net/", layer, "/{Z}/{X}/{Y}.", type].join(""),
"type": type,
"subdomains": SUBDOMAINS.slice(),
"minZoom": minZoom,
"maxZoom": maxZoom,
"attribution": [
'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, ',
'under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. ',
'Data by <a href="http://openstreetmap.org/">OpenStreetMap</a>, ',
'under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.'
].join("")
};
},
PROVIDERS = {
"toner": MAKE_PROVIDER("toner", "png", 0, 20),
"terrain": MAKE_PROVIDER("terrain", "png", 0, 18),
"terrain-classic": MAKE_PROVIDER("terrain-classic", "png", 0, 18),
"watercolor": MAKE_PROVIDER("watercolor", "jpg", 1, 18),
"trees-cabs-crime": {
"url": "http://{S}.tiles.mapbox.com/v3/stamen.trees-cabs-crime/{Z}/{X}/{Y}.png",
"type": "png",
"subdomains": "a b c d".split(" "),
"minZoom": 11,
"maxZoom": 18,
"extent": [
{"lat": 37.853, "lon": -122.577},
{"lat": 37.684, "lon": -122.313}
],
"attribution": [
'Design by Shawn Allen at <a href="http://stamen.com/">Stamen</a>.',
'Data courtesy of <a href="http://fuf.net/">FuF</a>,',
'<a href="http://www.yellowcabsf.com/">Yellow Cab</a>',
'&amp; <a href="http://sf-police.org/">SFPD</a>.'
].join(" ")
}
};
PROVIDERS["terrain-classic"].url = "//stamen-tiles-{s}a.ssl.fastly.net/terrain/{Z}/{X}/{Y}.png";
// set up toner and terrain flavors
setupFlavors("toner", ["hybrid", "labels", "lines", "background", "lite"]);
setupFlavors("terrain", ["background", "labels", "lines"]);
// toner 2010
deprecate("toner", ["2010"]);
// toner 2011 flavors
deprecate("toner", ["2011", "2011-lines", "2011-labels", "2011-lite"]);
var odbl = [
"toner",
"toner-hybrid",
"toner-labels",
"toner-lines",
"toner-background",
"toner-lite",
"terrain",
"terrain-background",
"terrain-lines",
"terrain-labels",
"terrain-classic"
];
for (var i = 0; i < odbl.length; i++) {
var key = odbl[i];
PROVIDERS[key].retina = true;
PROVIDERS[key].attribution = [
'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, ',
'under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. ',
'Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, ',
'under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.'
].join("");
}
/*
* Export stamen.tile to the provided namespace.
*/
exports.stamen = exports.stamen || {};
exports.stamen.tile = exports.stamen.tile || {};
exports.stamen.tile.providers = PROVIDERS;
exports.stamen.tile.getProvider = getProvider;
function deprecate(base, flavors) {
var provider = getProvider(base);
for (var i = 0; i < flavors.length; i++) {
var flavor = [base, flavors[i]].join("-");
PROVIDERS[flavor] = MAKE_PROVIDER(flavor, provider.type, provider.minZoom, provider.maxZoom);
PROVIDERS[flavor].deprecated = true;
}
};
/*
* A shortcut for specifying "flavors" of a style, which are assumed to have the
* same type and zoom range.
*/
function setupFlavors(base, flavors, type) {
var provider = getProvider(base);
for (var i = 0; i < flavors.length; i++) {
var flavor = [base, flavors[i]].join("-");
PROVIDERS[flavor] = MAKE_PROVIDER(flavor, type || provider.type, provider.minZoom, provider.maxZoom);
}
}
/*
* Get the named provider, or throw an exception if it doesn't exist.
*/
function getProvider(name) {
if (name in PROVIDERS) {
var provider = PROVIDERS[name];
if (provider.deprecated && console && console.warn) {
console.warn(name + " is a deprecated style; it will be redirected to its replacement. For performance improvements, please change your reference.");
}
return provider;
} else {
throw 'No such provider (' + name + ')';
}
}
/*
* StamenTileLayer for modestmaps-js
* <https://github.com/modestmaps/modestmaps-js/>
*
* Works with both 1.x and 2.x by checking for the existence of MM.Template.
*/
if (typeof MM === "object") {
var ModestTemplate = (typeof MM.Template === "function")
? MM.Template
: MM.TemplatedMapProvider;
MM.StamenTileLayer = function(name) {
var provider = getProvider(name);
this._provider = provider;
MM.Layer.call(this, new ModestTemplate(provider.url, provider.subdomains));
this.provider.setZoomRange(provider.minZoom, provider.maxZoom);
this.attribution = provider.attribution;
};
MM.StamenTileLayer.prototype = {
setCoordLimits: function(map) {
var provider = this._provider;
if (provider.extent) {
map.coordLimits = [
map.locationCoordinate(provider.extent[0]).zoomTo(provider.minZoom),
map.locationCoordinate(provider.extent[1]).zoomTo(provider.maxZoom)
];
return true;
} else {
return false;
}
}
};
MM.extend(MM.StamenTileLayer, MM.Layer);
}
/*
* StamenTileLayer for Leaflet
* <http://leaflet.cloudmade.com/>
*
* Tested with version 0.3 and 0.4, but should work on all 0.x releases.
*/
if (typeof L === "object") {
L.StamenTileLayer = L.TileLayer.extend({
initialize: function(name, options) {
var provider = getProvider(name),
url = provider.url.replace(/({[A-Z]})/g, function(s) {
return s.toLowerCase();
}),
opts = L.Util.extend({}, options, {
"minZoom": provider.minZoom,
"maxZoom": provider.maxZoom,
"subdomains": provider.subdomains,
"scheme": "xyz",
"attribution": provider.attribution,
sa_id: name
});
L.TileLayer.prototype.initialize.call(this, url, opts);
}
});
/*
* Factory function for consistency with Leaflet conventions
*/
L.stamenTileLayer = function (options, source) {
return new L.StamenTileLayer(options, source);
};
}
/*
* StamenTileLayer for OpenLayers
* <http://openlayers.org/>
*
* Tested with v2.1x.
*/
if (typeof OpenLayers === "object") {
// make a tile URL template OpenLayers-compatible
function openlayerize(url) {
return url.replace(/({.})/g, function(v) {
return "$" + v.toLowerCase();
});
}
// based on http://www.bostongis.com/PrinterFriendly.aspx?content_name=using_custom_osm_tiles
OpenLayers.Layer.Stamen = OpenLayers.Class(OpenLayers.Layer.OSM, {
initialize: function(name, options) {
var provider = getProvider(name),
url = provider.url,
subdomains = provider.subdomains,
hosts = [];
if (url.indexOf("{S}") > -1) {
for (var i = 0; i < subdomains.length; i++) {
hosts.push(openlayerize(url.replace("{S}", subdomains[i])));
}
} else {
hosts.push(openlayerize(url));
}
options = OpenLayers.Util.extend({
"numZoomLevels": provider.maxZoom,
"buffer": 0,
"transitionEffect": "resize",
// see: <http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/OSM-js.html#OpenLayers.Layer.OSM.tileOptions>
// and: <http://dev.openlayers.org/apidocs/files/OpenLayers/Tile/Image-js.html#OpenLayers.Tile.Image.crossOriginKeyword>
"tileOptions": {
"crossOriginKeyword": null
},
"attribution": provider.attribution
}, options);
return OpenLayers.Layer.OSM.prototype.initialize.call(this, name, hosts, options);
}
});
}
/*
* StamenMapType for Google Maps API V3
* <https://developers.google.com/maps/documentation/javascript/>
*/
if (typeof google === "object" && typeof google.maps === "object") {
// Extending Google class based on a post by Bogart Salzberg of Portland Webworks,
// http://www.portlandwebworks.com/blog/extending-googlemapsmap-object
google.maps.ImageMapType = (function(_constructor){
var f = function() {
if (!arguments.length) {
return;
}
_constructor.apply(this, arguments);
}
f.prototype = _constructor.prototype;
return f;
})(google.maps.ImageMapType);
google.maps.StamenMapType = function(name) {
var provider = getProvider(name),
subdomains = provider.subdomains;
return google.maps.ImageMapType.call(this, {
"getTileUrl": function(coord, zoom) {
var numTiles = 1 << zoom,
wx = coord.x % numTiles,
x = (wx < 0) ? wx + numTiles : wx,
y = coord.y,
index = (zoom + x + y) % subdomains.length;
return provider.url
.replace("{S}", subdomains[index])
.replace("{Z}", zoom)
.replace("{X}", x)
.replace("{Y}", y);
},
"tileSize": new google.maps.Size(256, 256),
"name": name,
"minZoom": provider.minZoom,
"maxZoom": provider.maxZoom
});
};
// FIXME: is there a better way to extend classes in Google land?
// Possibly fixed, see above ^^^ | SC
google.maps.StamenMapType.prototype = new google.maps.ImageMapType;
}
})(typeof exports === "undefined" ? this : exports);

View file

@ -1,13 +1,13 @@
# coding: utf-8 # coding: utf-8
DEPARTEMENTS_DEFAUT = ( DEPARTEMENTS_DEFAUT = (
('phy', 'Physique'), ('phy', u'Physique'),
('maths', 'Maths'), ('maths', u'Maths'),
('bio', 'Biologie'), ('bio', u'Biologie'),
('chimie', 'Chimie'), ('chimie', u'Chimie'),
('geol', u'Géosciences'), ('geol', u'Géosciences'),
('dec', 'DEC'), ('dec', u'DEC'),
('info', 'Informatique'), ('info', u'Informatique'),
('litt', u'Littéraire'), ('litt', u'Littéraire'),
('guests', u'Pensionnaires étrangers'), ('guests', u'Pensionnaires étrangers'),
('pei', u'PEI'), ('pei', u'PEI'),

View file

@ -4,10 +4,11 @@
{% block title %}Profil de {{ object.nom }} - ExperiENS{% endblock %} {% block title %}Profil de {{ object.nom }} - ExperiENS{% endblock %}
{% block content %} {% block content %}
<h1>Profil de {{ object.nom }}</h1> <h1>Profil de {{ object.nom }}
{% if object.user == user %} {% if object.user == user %}
<p><a href="{% url "avisstage:profil_edit" %}">Modifier mes infos</a></p> <a href="{% url "avisstage:profil_edit" %}" class="btn edit-btn">Modifier mes infos</a>
{% endif %} {% endif %}
</h1>
<p><b>Promotion :</b> {{ object.promotion }}</p> <p><b>Promotion :</b> {{ object.promotion }}</p>
<p>Adresse de contact : <a href="mailto:{{ object.mail }}">{{ object.mail }}</a></p> <p>Adresse de contact : <a href="mailto:{{ object.mail }}">{{ object.mail }}</a></p>
<article> <article>

View file

@ -7,7 +7,7 @@
<script src="{% static 'js/toc.min.js' %}" type="text/javascript"></script> <script src="{% static 'js/toc.min.js' %}" type="text/javascript"></script>
<script type="text/javascript" src="{% static "js/leaflet.js" %}"></script> <script type="text/javascript" src="{% static "js/leaflet.js" %}"></script>
<link rel="stylesheet" type="text/css" href="{% static "css/leaflet.css" %}" /> <link rel="stylesheet" type="text/css" href="{% static "css/leaflet.css" %}" />
<script type="text/javascript" src="//maps.stamen.com/js/tile.stamen.js?v1.3.0"></script> <script type="text/javascript" src="{% static "js/tile.stamen.js" %}"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function(){$(".toc").toc({container:'.content'});}); $(function(){$(".toc").toc({container:'.content'});});
var STATIC_ROOT = "{{ STATIC_URL|escapejs }}"; var STATIC_ROOT = "{{ STATIC_URL|escapejs }}";
@ -42,7 +42,7 @@
<h1>{{ object.sujet }}</h1> <h1>{{ object.sujet }}</h1>
{% if object.auteur == user.profil %} {% if object.auteur == user.profil %}
<div class="edit-box {{ object.public|yesno:"public,prive" }}"> <div class="edit-box {{ object.public|yesno:"public,prive" }}">
<p><a href="{% url "avisstage:stage_edit" object.id %}" class="edit-stage">Modifier ce stage</a></p> <p><a href="{% url "avisstage:stage_edit" object.id %}" class="edit-btn btn">Modifier ce stage</a></p>
<form action="{% url "avisstage:stage_publication" object.id %}" method="POST"> <form action="{% url "avisstage:stage_publication" object.id %}" method="POST">
{% csrf_token %} {% csrf_token %}
{% if object.public %} {% if object.public %}

View file

@ -5,7 +5,7 @@
{% block content %} {% block content %}
<h1>Mon espace personnel</h1> <h1>Mon espace personnel</h1>
<p><a href="{% url "avisstage:profil" user.username %}">{{ user.profil.nom }}</a> <a href="{% url "avisstage:profil_edit" %}">Modifier mes infos</a></p> <p>Bonjour <a href="{% url "avisstage:profil" user.username %}">{{ user.profil.nom }}</a> ! <a href="{% url "avisstage:profil_edit" %}" class="edit-btn btn">Modifier mes infos</a></p>
<article> <article>
<h2>Mes stages</h2> <h2>Mes stages</h2>

View file

@ -10,7 +10,7 @@
<link rel="stylesheet" type="text/css" href="{% static "css/leaflet.css" %}" /> <link rel="stylesheet" type="text/css" href="{% static "css/leaflet.css" %}" />
<link rel="stylesheet" type="text/css" href="{% static "css/MarkerCluster.css" %}" /> <link rel="stylesheet" type="text/css" href="{% static "css/MarkerCluster.css" %}" />
<link rel="stylesheet" type="text/css" href="{% static "css/MarkerCluster.Default.css" %}" /> <link rel="stylesheet" type="text/css" href="{% static "css/MarkerCluster.Default.css" %}" />
<script type="text/javascript" src="//maps.stamen.com/js/tile.stamen.js?v1.3.0"></script> <script type="text/javascript" src="{% static "js/tile.stamen.js" %}"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
var STATIC_ROOT = "{{ STATIC_URL|escapejs }}"; var STATIC_ROOT = "{{ STATIC_URL|escapejs }}";

View file

@ -10,6 +10,7 @@ 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 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
@ -89,6 +90,9 @@ class StageView(DetailView, LoginRequiredMixin):
model = Stage model = Stage
template_name = 'avisstage/detail/stage.html' template_name = 'avisstage/detail/stage.html'
def get_queryset(self):
filtre = Q(auteur__user_id=self.request.user.id) | Q(public=True)
return Stage.objects.filter(filtre)
# Lieux des stages # Lieux des stages
class LieuAjout(CreateView, LoginRequiredMixin): class LieuAjout(CreateView, LoginRequiredMixin):

5
experiENS/auth.py Normal file
View file

@ -0,0 +1,5 @@
from django_cas_ng.backends import CASBackend
class ENSCASBackend(CASBackend):
def clean_username(self, username):
return username.lower().strip()

View file

@ -99,7 +99,7 @@ STATIC_URL = '/static/'
AUTHENTICATION_BACKENDS = ( AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend', 'django.contrib.auth.backends.ModelBackend',
'django_cas_ng.backends.CASBackend', 'experiENS.auth.ENSCASBackend',
) )
CAS_SERVER_URL = "https://cas.eleves.ens.fr/" CAS_SERVER_URL = "https://cas.eleves.ens.fr/"

View file

@ -24,3 +24,5 @@ SPATIALITE_LIBRARY_PATH = 'mod_spatialite'
STATIC_ROOT = "/home/evarin/Bureau/experiENS/static/" STATIC_ROOT = "/home/evarin/Bureau/experiENS/static/"
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
STATIC_URL = "/experiens/static/"