Skip to content
Snippets Groups Projects
Commit 65b923af authored by Timothee P's avatar Timothee P :sunflower:
Browse files

restrict navigation to shared project in map popups

parent b64ca055
No related branches found
No related tags found
No related merge requests found
...@@ -541,12 +541,16 @@ const mapUtil = { ...@@ -541,12 +541,16 @@ const mapUtil = {
date_maj = formatDate(new Date(feature.properties.updated_on)); date_maj = formatDate(new Date(feature.properties.updated_on));
feature_type_url = '/geocontrib/projet/' + project_slug + '/type-signalement/' + feature_type.slug + '/'; feature_type_url = '/geocontrib/projet/' + project_slug + '/type-signalement/' + feature_type.slug + '/';
feature_url = feature_type_url + 'signalement/' + feature.properties.feature_id + '/'; feature_url = feature_type_url + 'signalement/' + feature.properties.feature_id + '/';
//status=feature.properties.status;
} else { } else {
feature_type = feature.properties ? feature.properties.feature_type : feature.feature_type; feature_type = feature.properties ? feature.properties.feature_type : feature.feature_type;
status = feature.properties ? feature.properties.status.label : feature.status.label; status = feature.properties ? feature.properties.status.label : feature.status.label;
} }
//* adapt link url for shared-project restricted navigation
if (window.location.pathname.includes('projet-partage')) {
feature_url = feature_url.replace('projet', 'projet-partage');
feature_type_url = feature_type_url.replace('projet', 'projet-partage');
}
let author = ''; let author = '';
const creator = feature.properties ? feature.properties.creator : feature.creator; const creator = feature.properties ? feature.properties.creator : feature.creator;
if (creator) { if (creator) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment