Display profile pics in group members links

This commit is contained in:
Gabriel Augendre 2022-12-09 19:35:42 +01:00
parent 2b7e071e71
commit 279b8ed186
3 changed files with 14 additions and 3 deletions

View file

@ -15,7 +15,18 @@
<p>
Groupe : <a href="{{ party.get_absolute_url }}">{{ party }}</a>
&bullet;
Joueurs : {% for other in party.characters.all %}<a href="{% url "character:view" pk=other.pk %}?party={{ party.pk }}">{{ other }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
Joueurs :
{% for other in party.characters.all %}
<a href="{% url "character:view" pk=other.pk %}?party={{ party.pk }}">
{% if other.profile_picture %}
<img class="rounded-5 profile-pic-small"
src="{{ other.profile_picture.url }}"
alt="Image de profil"
>
{% endif %}
{{ other }}
</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if character|managed_by:user %}

View file

@ -5,7 +5,7 @@
<h5 class="card-title">
{% if character.profile_picture %}
<img src="{{ character.profile_picture.url }}"
class="profile-pic rounded-5"
class="profile-pic-small rounded-5"
alt="Image de profil"
>
{% endif %}

View file

@ -11,7 +11,7 @@ blockquote {
border-left: solid #d5d5d5 4px;
}
.card img.profile-pic {
img.profile-pic-small {
width: 28px;
height: 28px;
object-fit: cover;