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 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<div class="extra content" id="icons_users"> <div class="extra content" id="icons_users">
<div class="ui small basic icon buttons"> <div class="ui small basic icon buttons">
{% if session.userId %} {% if group.hasUser(session.userId) %}
<button class="ui button"> <button class="ui button">
<a href="/groups/{{group.getId}}/messages"><i class="envelope icon"></i></a> <a href="/groups/{{group.getId}}/messages"><i class="envelope icon"></i></a>
</button> </button>
...@@ -38,8 +38,9 @@ ...@@ -38,8 +38,9 @@
</div> </div>
</div> </div>
</div> </div>
<div id="map" class="col s10 m10 l10 xl10" style="max-width:90%"> {% if group.hasUser(session.userId) %}
</div> <div id="map" class="col s10 m10 l10 xl10" style="max-width:90%"></div>
{% endif %}
</div> </div>
<div class="list"> <div class="list">
<h2> Members </h2> <h2> Members </h2>
...@@ -86,6 +87,7 @@ ...@@ -86,6 +87,7 @@
{% endif %} {% endif %}
<script type="text/javascript" src="/assets/js/users-search.js"></script> <script type="text/javascript" src="/assets/js/users-search.js"></script>
{% if group.hasUser(session.userId) %}
<script> <script>
window.addEventListener('load', function(){ window.addEventListener('load', function(){
const { viewMap } = parcelRequire('map.js'); const { viewMap } = parcelRequire('map.js');
...@@ -100,4 +102,5 @@ window.addEventListener('load', function(){ ...@@ -100,4 +102,5 @@ window.addEventListener('load', function(){
}); });
}); });
</script> </script>
{% endif %}
{% endblock %} {% 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