37 lines
1.7 KiB
HTML
37 lines
1.7 KiB
HTML
{% extends "combo/cell_form.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block cell-form %}
|
|
{{ form.as_p }}
|
|
{% with cell.get_maplayer_options as options %}
|
|
{% if options %}
|
|
<p><label>{% trans "Layers:" %}</label></p>
|
|
<div>
|
|
<ul class="objects-list list-of-layers">
|
|
{% for option in options %}
|
|
<li>
|
|
<span>{{ option.map_layer.label }} {% if option.map_layer.kind == 'tiles' %}({{ option.map_layer.get_kind_display }}){% endif %}</span>
|
|
{% if option.map_layer.kind == 'tiles' %}
|
|
<a rel="popup" title="{% trans "Edit" %}" class="link-action-icon edit" href="{% url 'maps-manager-cell-edit-layer' page_pk=page.pk cell_reference=cell.get_reference layeroptions_pk=option.pk %}">{% trans "Edit" %}</a>
|
|
{% endif %}
|
|
<a rel="popup" title="{% trans "Delete" %}" class="link-action-icon delete" href="{% url 'maps-manager-cell-delete-layer' page_pk=page.pk cell_reference=cell.get_reference layeroptions_pk=option.pk %}">{% trans "Delete" %}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% with cell.get_free_geojson_layers.exists as free_geojson and cell.get_free_tiles_layers.exists as free_tiles %}
|
|
{% if free_geojson or free_tiles %}
|
|
<div class="buttons">
|
|
{% if free_geojson %}
|
|
<a rel="popup" href="{% url 'maps-manager-cell-add-layer' page_pk=page.pk cell_reference=cell.get_reference kind='geojson' %}">{% trans "Add a GeoJSON layer" %}</a>
|
|
{% endif %}
|
|
{% if free_tiles %}
|
|
{% if free_geojson %}|{% endif%} <a rel="popup" href="{% url 'maps-manager-cell-add-layer' page_pk=page.pk cell_reference=cell.get_reference kind='tiles' %}">{% trans "Add a tiles layer" %}</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% endblock %}
|