Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
21de4ce797
@ -144,9 +144,11 @@ function getLabelClass(pos_or_neg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function popup(feature, layer) {
|
function popup(feature, layer) {
|
||||||
layer.bindPopup(
|
var str = '';
|
||||||
"<img src='"+feature.properties.images[0].file+"' width='100%'>"+
|
if(feature.properties.images.length > 0) {
|
||||||
"<div class='popup-head'>"+
|
str = "<img src='"+feature.properties.images[0].file+"' width='100%'>";
|
||||||
|
}
|
||||||
|
str += ("<div class='popup-head'>"+
|
||||||
"<h5>"+feature.properties.entry_name+"</h5>" +
|
"<h5>"+feature.properties.entry_name+"</h5>" +
|
||||||
"<i>"+feature.properties.country_name+"</i>"+
|
"<i>"+feature.properties.country_name+"</i>"+
|
||||||
"</div>"+
|
"</div>"+
|
||||||
@ -154,8 +156,8 @@ function popup(feature, layer) {
|
|||||||
"<span class='label label-default'>"+feature.properties.sector_of_economy+"</span> "+
|
"<span class='label label-default'>"+feature.properties.sector_of_economy+"</span> "+
|
||||||
"<span class='label label-"+getLabelClass(feature.properties.positive_or_negative)+"'>"+ feature.properties.positive_or_negative_display+"</span>"+
|
"<span class='label label-"+getLabelClass(feature.properties.positive_or_negative)+"'>"+ feature.properties.positive_or_negative_display+"</span>"+
|
||||||
"</div>"+
|
"</div>"+
|
||||||
"<a class='btn btn-sm btn-primary' href='case-study/"+feature.properties.slug+"'>{% trans "View full case study" %}</a>"
|
"<a class='btn btn-sm btn-primary' href='case-study/"+feature.properties.slug+"'>{% trans "View full case study" %}</a>")
|
||||||
);
|
layer.bindPopup(str);
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is called when the map is initialized
|
// This is called when the map is initialized
|
||||||
|
Loading…
Reference in New Issue
Block a user