1<a class="btn btn-danger btn-block layer-exists-{{data.pk}} layerbtn"  data-layer='{
2   "id": {{data.pk}},
3   "name":  "{{data.layer.name}}",
4   "xhrLayerUrl": "{% url "xhr_layer" extra.pid data.pk %}",
5   "layerdetailurl": "{% url 'layerdetails' extra.pid data.pk %}"
6   }' data-directive="remove"
7    {% if data.pk not in extra.current_layers %}
8    style="display:none;"
9    {% endif %}
10  >
11  <span class="glyphicon glyphicon-trash"></span>
12  Remove layer
13</a>
14<a class="btn btn-default btn-block layer-add-{{data.pk}} layerbtn"
15   data-layer='{ "id": {{data.pk}},
16   "name":  "{{data.layer.name}}",
17   "xhrLayerUrl": "{% url "xhr_layer" extra.pid data.pk %}",
18   "layerdetailurl": "{%url "layerdetails" extra.pid data.pk %}"
19   }' data-directive="add"
20    {% if data.pk in extra.current_layers %}
21    style="display:none;"
22    {% endif %}
23  >
24  <span class="glyphicon glyphicon-plus"></span>
25  Add layer
26</a>
27