Make displayed group dynamic

     "padawan" was hard-coded before
parent 9f0e8e24
Pipeline #1467 passed with stages
in 1 minute and 59 seconds
......@@ -57,7 +57,12 @@
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link">
Vous êtes Padawan<img class="inline-image ml-2" role="img" src="{% static 'img/padawan.svg' %}" />
Vous êtes {{user.groups.all.0.name}}
{% if user.groups.all.0.name == "Padawan" %}
<img class="inline-image ml-2" role="img" src="{% static 'img/padawan.svg' %}" />
{% elif user.groups.all.0.name == "Jedi" %}
<img class="inline-image ml-2" role="img" src="{% static 'img/jedi.svg' %}" />
{% endif %}
</a>
</li>
</ul>
......
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