Commit 4b06a369 authored by Moreau Elise's avatar Moreau Elise
Browse files

show map and messages button only to members

parent 12fa918d
......@@ -15,7 +15,7 @@
</div>
<div class="extra content" id="icons_users">
<div class="ui small basic icon buttons">
{% if session.userId %}
{% if group.hasUser(session.userId) %}
<button class="ui button">
<a href="/groups/{{group.getId}}/messages"><i class="envelope icon"></i></a>
</button>
......@@ -38,8 +38,9 @@
</div>
</div>
</div>
<div id="map" class="col s10 m10 l10 xl10" style="max-width:90%">
</div>
{% if group.hasUser(session.userId) %}
<div id="map" class="col s10 m10 l10 xl10" style="max-width:90%"></div>
{% endif %}
</div>
<div class="list">
<h2> Members </h2>
......@@ -86,6 +87,7 @@
{% endif %}
<script type="text/javascript" src="/assets/js/users-search.js"></script>
{% if group.hasUser(session.userId) %}
<script>
window.addEventListener('load', function(){
const { viewMap } = parcelRequire('map.js');
......@@ -100,4 +102,5 @@ window.addEventListener('load', function(){
});
});
</script>
{% endif %}
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment