mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-22 22:48:03 +01:00
Improve character display on group details
This commit is contained in:
parent
3272737780
commit
cd2ab27f3a
2 changed files with 15 additions and 15 deletions
|
@ -9,9 +9,18 @@
|
|||
{{ 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 }}
|
||||
</p>
|
||||
<a href="{% url "character:view" pk=character.pk %}" class="btn btn-sm btn-success">
|
||||
{% if character.player == user %}
|
||||
<div class="btn-group btn-group-sm">
|
||||
<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>
|
||||
|
|
|
@ -7,18 +7,9 @@
|
|||
{% block content %}
|
||||
<h1>{{ party.name }}</h1>
|
||||
<p>MJ : {{ party.game_master.get_full_name|default:party.game_master.username }}</p>
|
||||
<p>Personnages :</p>
|
||||
<ul>
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4 g-4">
|
||||
{% for character in party.characters.all %}
|
||||
<li>
|
||||
<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>
|
||||
{% include "character/snippets/characters_list/character_card.html" %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue