Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2018-06-18 19:28:49 +00:00
commit 21de4ce797

View File

@ -144,18 +144,20 @@ function getLabelClass(pos_or_neg) {
}
function popup(feature, layer) {
layer.bindPopup(
"<img src='"+feature.properties.images[0].file+"' width='100%'>"+
"<div class='popup-head'>"+
"<h5>"+feature.properties.entry_name+"</h5>" +
"<i>"+feature.properties.country_name+"</i>"+
"</div>"+
"<div class='popup-labels'>"+
"<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>"+
"</div>"+
"<a class='btn btn-sm btn-primary' href='case-study/"+feature.properties.slug+"'>{% trans "View full case study" %}</a>"
);
var str = '';
if(feature.properties.images.length > 0) {
str = "<img src='"+feature.properties.images[0].file+"' width='100%'>";
}
str += ("<div class='popup-head'>"+
"<h5>"+feature.properties.entry_name+"</h5>" +
"<i>"+feature.properties.country_name+"</i>"+
"</div>"+
"<div class='popup-labels'>"+
"<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>"+
"</div>"+
"<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