Verified Commit 6c7627df authored by Thibaut Broggi's avatar Thibaut Broggi
Browse files

Change the way groups are written in templates

parent e270e8fa
Pipeline #1760 passed with stages
in 1 minute and 58 seconds
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
<td>{{user.id}}</td> <td>{{user.id}}</td>
<td>{{user.username}}</td> <td>{{user.username}}</td>
<td>{{user.email}}</td> <td>{{user.email}}</td>
<td>{{user.date_joined |date:'d/m/Y - H:i:s'}}</td> <td>{{user.date_joined | date:'d/m/Y - H:i:s'}}</td>
<td>{{user.groups.all.0.name}}</td> <td>{{user.groups.last.name}}</td>
<td></td> <td></td>
</tr> </tr>
{% endfor %} {% endfor %}
......
...@@ -57,17 +57,17 @@ ...@@ -57,17 +57,17 @@
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link"> <a class="nav-link">
Vous êtes {{user.groups.all.0.name}} Vous êtes {{user.groups.last.name}}
{% if user.groups.all.0.name == "padawan" %} {% if user.groups.last.name == "padawan" %}
<img class="inline-image ml-2" role="img" src="{% static 'img/padawan.svg' %}" /> <img class="inline-image ml-2" role="img" src="{% static 'img/padawan.svg' %}" />
{% elif user.groups.all.0.name == "Jedi" %} {% elif user.groups.last.name == "jedi" %}
<img class="inline-image ml-2" role="img" src="{% static 'img/jedi.svg' %}" /> <img class="inline-image ml-2" role="img" src="{% static 'img/jedi.svg' %}" />
{% endif %} {% endif %}
</a> </a>
</li> </li>
</ul> </ul>
{% else %} {% else %}
<span class="navbar-text ml-auto text-muted">For jedis by jedis</span> <span class="navbar-text ml-auto text-muted">For jedi by jedi</span>
{% endif %} {% endif %}
</div> </div>
</nav> </nav>
......
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