Improve character display on group details

This commit is contained in:
Gabriel Augendre 2022-11-06 14:35:57 +01:00
parent 3272737780
commit cd2ab27f3a
2 changed files with 15 additions and 15 deletions

View file

@ -9,9 +9,18 @@
{{ character.get_gender_display }}, {{ character.age }} ans, {{ character.height_m }}m, {{ character.weight }}kg<br> {{ character.get_gender_display }}, {{ character.age }} ans, {{ character.height_m }}m, {{ character.weight }}kg<br>
PV {{ character.health_remaining }}/{{ character.health_max }}, PM {{ character.mana_remaining }}/{{ character.mana_max }} PV {{ character.health_remaining }}/{{ character.health_max }}, PM {{ character.mana_remaining }}/{{ character.mana_max }}
</p> </p>
<a href="{% url "character:view" pk=character.pk %}" class="btn btn-sm btn-success"> {% if character.player == user %}
<i class="fa-solid fa-user"></i> Jouer <div class="btn-group btn-group-sm">
</a> <a href="{% url "character:view" pk=character.pk %}" class="btn btn-success">
<i class="fa-solid fa-user"></i> Jouer
</a>
{% if party %}
<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
</a>
{% endif %}
</div>
{% endif %}
</div> </div>
</div> </div>
</div> </div>

View file

@ -7,18 +7,9 @@
{% block content %} {% block content %}
<h1>{{ party.name }}</h1> <h1>{{ party.name }}</h1>
<p>MJ : {{ party.game_master.get_full_name|default:party.game_master.username }}</p> <p>MJ : {{ party.game_master.get_full_name|default:party.game_master.username }}</p>
<p>Personnages :</p> <div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4 g-4">
<ul>
{% for character in party.characters.all %} {% for character in party.characters.all %}
<li> {% include "character/snippets/characters_list/character_card.html" %}
<a href="{% url "character:view" pk=character.pk %}">
{{ character.name }}</a>
{% if character.player == user %}
(<a href="{% url "party:leave" pk=party.pk character_pk=character.pk %}">Quitter</a>)
{% endif %}
</li>
{% empty %}
<li>Aucun...</li>
{% endfor %} {% endfor %}
</ul> </div>
{% endblock %} {% endblock %}