Improve character card render

This commit is contained in:
Gabriel Augendre 2022-11-06 15:08:31 +01:00
parent 833584a2b7
commit 3cf359744a

View file

@ -24,9 +24,16 @@
</p> </p>
<div class="btn-group btn-group-sm"> <div class="btn-group btn-group-sm">
{% if character|managed_by:user %} {% if character|managed_by:user %}
{% if character.player == user %}
<a href="{% url "character:view" pk=character.pk %}" class="btn btn-success"> <a href="{% url "character:view" pk=character.pk %}" class="btn btn-success">
<i class="fa-solid fa-user"></i> {% if character.player == user %}Jouer{% else %}Gérer{% endif %} <i class="fa-solid fa-user"></i> Jouer
</a> </a>
{% else %}
<a href="{% url "character:view" pk=character.pk %}" class="btn btn-primary">
<i class="fa-solid fa-cog"></i> Gérer
</a>
{% endif %}
{% if party %} {% if party %}
<a href="{% url "party:leave" pk=party.pk character_pk=character.pk %}" class="btn btn-warning"> <a href="{% url "party:leave" pk=party.pk character_pk=character.pk %}" class="btn btn-warning">
<i class="fa-solid fa-person-walking-arrow-right"></i> Quitter le groupe <i class="fa-solid fa-person-walking-arrow-right"></i> Quitter le groupe