hide drawing widget and text of the comments for not logged in
This commit is contained in:
parent
874e417791
commit
5c78c2c87f
@ -75,11 +75,12 @@
|
|||||||
<div class="card mb-5">
|
<div class="card mb-5">
|
||||||
{# Comment text #}
|
{# Comment text #}
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
<div class="comment-text"><p id="comment-text-{{ comment.id }}">{{ comment.text }}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if is_logged_in %}
|
{% if is_logged_in %}
|
||||||
|
|
||||||
|
<div class="comment-text"><p
|
||||||
|
id="comment-text-{{ comment.id }}">{{ comment.text }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% if current_user.id == comment.user_id or current_user.id == 1 or current_user.id == sar.SARCall.user_id %}
|
{% if current_user.id == comment.user_id or current_user.id == 1 or current_user.id == sar.SARCall.user_id %}
|
||||||
<button class="edit-comment-btn" data-comment-id="{{ comment.id }}"
|
<button class="edit-comment-btn" data-comment-id="{{ comment.id }}"
|
||||||
data-comment-text="{{ comment.text }}"> ✎ {# EDIT #}
|
data-comment-text="{{ comment.text }}"> ✎ {# EDIT #}
|
||||||
@ -367,6 +368,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// context menu
|
// context menu
|
||||||
|
{% if is_logged_in %}
|
||||||
|
|
||||||
var markers = L.layerGroup().addTo(map);
|
var markers = L.layerGroup().addTo(map);
|
||||||
var circleCount = 0;
|
var circleCount = 0;
|
||||||
@ -378,7 +380,6 @@
|
|||||||
var coords = e.latlng.lat.toFixed(5) + ", " + e.latlng.lng.toFixed(5);
|
var coords = e.latlng.lat.toFixed(5) + ", " + e.latlng.lng.toFixed(5);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
coordControl.getContainer().innerHTML = "<strong>To clipboard: </strong> " + e.latlng.lat.toFixed(5) + ", " + e.latlng.lng.toFixed(5);
|
coordControl.getContainer().innerHTML = "<strong>To clipboard: </strong> " + e.latlng.lat.toFixed(5) + ", " + e.latlng.lng.toFixed(5);
|
||||||
|
|
||||||
addMarker(e);
|
addMarker(e);
|
||||||
@ -402,6 +403,8 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
map.addControl(drawControl);
|
map.addControl(drawControl);
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
// Create a control for displaying the coordinates.
|
// Create a control for displaying the coordinates.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user