Attention ! Gitlab fournissant maintenant nativement des certificats Let’s Encrypt aux domaines personnalisés des Gitlab Pages, nous avons coupé notre service qui le faisait automatiquement pour vous.

Il est impératif, pour que votre domaine personnalisé continue à avoir un certificat Let’s Encrypt à jour, d’activer la fonctionnalité native dans les paramètres de votre projet. Cette activation remplacera votre certificat actuel par un nouveau certificat Let’s Encrypt géré par Gitlab.

Voir les détails sur https://docs.framasoft.org/fr/gitlab/gitlab-pages-le.html

Commit bb5f8757 authored by Bastien Zigmann's avatar Bastien Zigmann Committed by Vincent Dubois

Changement du fonctionnement des déclérations d'erreur. Elles se font...

Changement du fonctionnement des déclérations d'erreur. Elles se font désormais avec le tag fixme ET note
parent 80b05f2c
......@@ -577,7 +577,7 @@ class Geocropping {
<div class='collapse element-signal col-xs-12 toto' id='${properties.id}Signal'>`;
if (tags.fixme && tags.fixme !== "") {
content += `
<a style='color:red;' href="https://www.openstreetmap.org/edit?${properties.type}=${properties.id}" target="_blank"><span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span> L'objet a déjà été déclaré comme erronné, raison : "${tags.fixme}"</a>`
<a style='color:red;' href="https://www.openstreetmap.org/edit?${properties.type}=${properties.id}" target="_blank"><span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span> L'objet a déjà été déclaré comme erronné, raison : "${tags.note}"</a>`
}
content += `
<form onsubmit="return false;" role="form" data-id="${properties.id}" data-type="${properties.type}">
......@@ -676,21 +676,27 @@ class Geocropping {
let id = $errorForm.data('id');
let type = $errorForm.data('type');
let text = ``;
let fixme = ``;
let note = ``;
switch ((e.target as any).elements.errorType.value) {
case 'errorPos':
text += `La position de l'élément n'est pas bonne`;
fixme += `location`;
note += `Location is incorrect or moved`;
break;
case 'errorExist':
text += `L'élément n'existe pas ou plus`;
fixme += `absent`;
note += `The object dispappeared or never happened to be there`;
break;
case 'errorInfo':
text += `Les informations de l'élément ne sont pas correctes`;
fixme += `tags`;
note += `Object tags should be updates`;
break;
case 'errorWorks':
text += `L'objet n'est pas/plus celui indiqué, mais il y a du changement en cours`;
fixme = `transient`;
note = `Ongoing transformation`;
case 'other':
text += (e.target as any).elements.comment.value
fixme = `resurvey`;
note += (e.target as any).elements.comment.value
break
default:
return;
......@@ -734,7 +740,7 @@ class Geocropping {
let updated = false;
for (let index = 0; index < element.tag.length; index++) {
let tag = element.tag[index];
if (tag['@attributes'].k === 'fixme') {
if (tag['@attributes'].k === 'fixme' || tag['@attributes'].k === 'note') {
// TODODO: On fais quoi ?
updated = true;
break;
......@@ -742,7 +748,8 @@ class Geocropping {
}
// Si le tag n'existe pas, le créer
if (!updated) {
element.tag.push({ '@attributes': { k: "fixme", v: text } })
element.tag.push({ '@attributes': { k: "fixme", v: fixme } });
element.tag.push({ '@attributes': { k: "note", v: note } });
}
} else {
......
......@@ -78,8 +78,8 @@ if (empty($_SERVER['HTTPS'])) {
</div>
<div id="userInfo"><br>
<div id="userName">User Name</div><br>
<div id="userNbValid">Nombre d'éléments validés : </div>
<div id="userNbInvalid">Nombre d'éléments signalés : </div>
<div id="userNbValid">Validatons : </div>
<div id="userNbInvalid">Signalements : </div>
</div>
<hr>
<div id="menu">
......
......@@ -459,7 +459,7 @@ var Geocropping = (function () {
content += "\n <div class=\"col-xs-12\" role=\"group\">\n <button type=\"button\" id=\"btnValidate\" data-id=\"" + properties.id + "\" data-type=\"" + properties.type + "\" class='btn btn-success col-xs-4'><span class=\"glyphicon glyphicon-ok\" aria-hidden=\"true\"></span></button>\n <button data-toggle=\"button\" aria-pressed\"false\" type=\"button\" id=\"btnError\" class='btn btn-danger col-xs-4'><span class=\"glyphicon glyphicon-remove\" aria-hidden=\"true\"></span></button>\n <button type=\"button\" id=\"btnSendToOSM\" class='btn btn-warning col-xs-4' onclick=\"window.location.href='https://www.openstreetmap.org/edit?" + properties.type + "=" + properties.id + "'\"><span class=\"glyphicon glyphicon-edit\" aria-hidden=\"true\"></span></button>\n <!--<a target=\"_blank\" id=\"btnSendToOSM\" class='btn btn-warning col-xs-4' role='button' href=\"https://www.openstreetmap.org/edit?" + properties.type + "=" + properties.id + "\"><span class=\"glyphicon glyphicon-edit\" aria-hidden=\"true\"></span></a>-->\n </div>\n </div>\n <div class='element-info row'>\n <!--div><span class='label label-info'>type</span> " + properties.type + "</div-->\n <!--div><span class='label label-info'>id</span> " + properties.id + "</div-->\n <div class=\"col-xs-12\">\n <!--span class='label label-info'>tags</span-->" + toTable(properties.tags) + "\n </div><br/><hr>\n <!--div><span class='label label-info'>relations</span> " + properties.relations.join(', ') + "</div-->\n <!--div><span class='label label-info'>meta</span> " + toTable(properties.meta) + "</div-->\n <!--pre>" + JSON.stringify(properties, null, 4) + "</pre-->\n <div class='row valide-element'>";
content += "\n <div class='collapse element-signal col-xs-12 toto' id='" + properties.id + "Signal'>";
if (tags.fixme && tags.fixme !== "") {
content += "\n <a style='color:red;' href=\"https://www.openstreetmap.org/edit?" + properties.type + "=" + properties.id + "\" target=\"_blank\"><span class=\"glyphicon glyphicon-warning-sign\" aria-hidden=\"true\"></span> L'objet a d\u00E9j\u00E0 \u00E9t\u00E9 d\u00E9clar\u00E9 comme erronn\u00E9, raison : \"" + tags.fixme + "\"</a>";
content += "\n <a style='color:red;' href=\"https://www.openstreetmap.org/edit?" + properties.type + "=" + properties.id + "\" target=\"_blank\"><span class=\"glyphicon glyphicon-warning-sign\" aria-hidden=\"true\"></span> L'objet a d\u00E9j\u00E0 \u00E9t\u00E9 d\u00E9clar\u00E9 comme erronn\u00E9, raison : \"" + tags.note + "\"</a>";
}
content += "\n <form onsubmit=\"return false;\" role=\"form\" data-id=\"" + properties.id + "\" data-type=\"" + properties.type + "\">\n <h3 class=\"signalTitle\">Signaler une erreur</h3>\n <div class=\"form-group\">\n <select name=\"errorType\" id=\"errorType\" class=\"form-control\" required=\"required\">\n <option value=\"\" hidden disabled selected>Choisir l'erreur...</option>\n <option value=\"errorPos\">Position incorrecte</option>\n <option value=\"errorExist\">N'existe pas</option>\n <option value=\"errorInfo\">Informations \u00E9rron\u00E9es</option>\n <option value=\"errorWorks\">En cours de transformation</option>\n <option value=\"other\">Autre</option>\n </select>\n <textarea name=\"comment\" id=\"comment\" maxlength=\"255\" class=\"form-control\" rows=\"1\" placeholder=\"Commentaire\" style=\"resize:none; overflow:hidden; display:none;\"></textarea>\n </div>\n <div class='valide-element checkbox'>\n <label><input type=\"checkbox\" id=\"followChanges\"> Je souhaite \u00EAtre notifi\u00E9 de la prochaine mise \u00E0 jour de cet \u00E9l\u00E9ment.</label>\n </div>\n <div align=\"center\">\n <input value=\"Signaler\" type=\"submit\" class=\"btn btn-primary\">\n <input value=\"Annuler\" type=\"button\" id=\"btnAnnulation\" class=\"btn btn-primary\">\n </div>\n </form>\n </div>";
}
......@@ -520,21 +520,27 @@ var Geocropping = (function () {
// Invalider l'élément
var id = $errorForm.data('id');
var type = $errorForm.data('type');
var text = "";
var fixme = "";
var note = "";
switch (e.target.elements.errorType.value) {
case 'errorPos':
text += "La position de l'\u00E9l\u00E9ment n'est pas bonne";
fixme += "location";
note += "Location is incorrect or moved";
break;
case 'errorExist':
text += "L'\u00E9l\u00E9ment n'existe pas ou plus";
fixme += "absent";
note += "The object dispappeared or never happened to be there";
break;
case 'errorInfo':
text += "Les informations de l'\u00E9l\u00E9ment ne sont pas correctes";
fixme += "tags";
note += "Object tags should be updates";
break;
case 'errorWorks':
text += "L'objet n'est pas/plus celui indiqu\u00E9, mais il y a du changement en cours";
fixme = "transient";
note = "Ongoing transformation";
case 'other':
text += e.target.elements.comment.value;
fixme = "resurvey";
note += e.target.elements.comment.value;
break;
default:
return;
......@@ -574,7 +580,7 @@ var Geocropping = (function () {
var updated = false;
for (var index = 0; index < element.tag.length; index++) {
var tag = element.tag[index];
if (tag['@attributes'].k === 'fixme') {
if (tag['@attributes'].k === 'fixme' || tag['@attributes'].k === 'note') {
// TODODO: On fais quoi ?
updated = true;
break;
......@@ -582,7 +588,8 @@ var Geocropping = (function () {
}
// Si le tag n'existe pas, le créer
if (!updated) {
element.tag.push({ '@attributes': { k: "fixme", v: text } });
element.tag.push({ '@attributes': { k: "fixme", v: fixme } });
element.tag.push({ '@attributes': { k: "note", v: note } });
}
}
else {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment