maps: include icon in layer list (#21288)

This commit is contained in:
Frédéric Péters 2018-01-21 10:29:45 +01:00
parent c7a35ead5d
commit 18d8aa95ae
2 changed files with 22 additions and 2 deletions

View File

@ -50,11 +50,13 @@ div.leaflet-div-icon span i:before {
/* leaflet markers icons */
.layers a::before,
select#id_icon option::before,
i.leaflet-marker-icon {
font: normal normal normal 1em/1 FontAwesome;
}
.layers a::before,
select#id_icon option::before {
padding-right: 1ex;
display: inline-block;
@ -62,91 +64,109 @@ select#id_icon option::before {
text-align: center;
}
a.layer-icon-house::before,
select#id_icon option[value=house]::before,
i.leaflet-marker-icon.house::before {
content: "\f015"; /* home */
}
a.layer-icon-building::before,
select#id_icon option[value=building]::before,
i.leaflet-marker-icon.building::before {
content: "\f0f7"; /* building */
}
a.layer-icon-hospital::before,
select#id_icon option[value=hospital]::before,
i.leaflet-marker-icon.hospital::before {
content: "\f0f8"; /* hospital */
}
a.layer-icon-ambulance::before,
select#id_icon option[value=ambulance]::before,
i.leaflet-marker-icon.ambulance::before {
content: "\f0f9"; /* ambulance */
}
a.layer-icon-taxi::before,
select#id_icon option[value=taxi]::before,
i.leaflet-marker-icon.taxi::before {
content: "\f1ba"; /* taxi */
}
a.layer-icon-subway::before,
select#id_icon option[value=subway]::before,
i.leaflet-marker-icon.subway::before {
content: "\f239"; /* subway */
}
a.layer-icon-wheelchair::before,
select#id_icon option[value=wheelchair]::before,
i.leaflet-marker-icon.wheelchair::before {
content: "\f193"; /* wheelchair */
}
a.layer-icon-bicycle::before,
select#id_icon option[value=bicycle]::before,
i.leaflet-marker-icon.bicycle::before {
content: "\f206"; /* bicycle */
}
a.layer-icon-car::before,
select#id_icon option[value=car]::before,
i.leaflet-marker-icon.car::before {
content: "\f1b9"; /* car */
}
a.layer-icon-train::before,
select#id_icon option[value=train]::before,
i.leaflet-marker-icon.train::before {
content: "\f238"; /* train */
}
a.layer-icon-bus::before,
select#id_icon option[value=bus]::before,
i.leaflet-marker-icon.bus::before {
content: "\f207"; /* bus */
}
a.layer-icon-motorcycle::before,
select#id_icon option[value=motorcycle]::before,
i.leaflet-marker-icon.motorcycle::before {
content: "\f21c"; /* motorcycle */
}
a.layer-icon-truck::before,
select#id_icon option[value=truck]::before,
i.leaflet-marker-icon.truck::before {
content: "\f0d1"; /* truck */
}
a.layer-icon-book::before,
select#id_icon option[value=book]::before,
i.leaflet-marker-icon.book::before {
content: "\f02d"; /* book */
}
a.layer-icon-shower::before,
select#id_icon option[value=shower]::before,
i.leaflet-marker-icon.shower::before {
content: "\f2cc"; /* shower */
}
a.layer-icon-trash::before,
select#id_icon option[value=trash]::before,
i.leaflet-marker-icon.trash::before {
content: "\f1f8"; /* trash */
}
a.layer-icon-recycle::before,
select#id_icon option[value=recycle]::before,
i.leaflet-marker-icon.recycle::before {
content: "\f1b8"; /* recycle */
}
a.layer-icon-university::before,
select#id_icon option[value=university]::before,
i.leaflet-marker-icon.university::before {
content: "\f19c"; /* university */

View File

@ -8,10 +8,10 @@
{% block content %}
{% if object_list %}
<div class="objects-list">
<div class="objects-list layers">
{% for layer in object_list %}
<div>
<a href="{% url 'maps-manager-layer-edit' slug=layer.slug %}">{{ layer.label }}</a>
<a class="layer-icon-{{ layer.icon }}" href="{% url 'maps-manager-layer-edit' slug=layer.slug %}">{{ layer.label }}</a>
</div>
{% endfor %}
</div>