Show user ranks in raid details.
This commit is contained in:
parent
2bda918954
commit
7820021864
|
@ -93,7 +93,7 @@ class RaidResponse(models.Model):
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ["-status", "role", "character__klass", "character__name"]
|
ordering = ["-status", "role", "character__klass", "character__user__rank", "character__name"]
|
||||||
constraints = [
|
constraints = [
|
||||||
models.UniqueConstraint(fields=["raid", "character"], name="unique_character_raid_signup")
|
models.UniqueConstraint(fields=["raid", "character"], name="unique_character_raid_signup")
|
||||||
]
|
]
|
||||||
|
|
|
@ -70,7 +70,14 @@
|
||||||
{% regroup role_responses by character.klass as class_responses_list %}
|
{% regroup role_responses by character.klass as class_responses_list %}
|
||||||
{% for class, class_responses in class_responses_list %}
|
{% for class, class_responses in class_responses_list %}
|
||||||
<div class="d-flex flex-column mr-2 mb-4">
|
<div class="d-flex flex-column mr-2 mb-4">
|
||||||
{% for response in class_responses %}
|
{% regroup class_responses by character.user.rank as rank_responses_list %}
|
||||||
|
{% for rank, rank_responses in rank_responses_list %}
|
||||||
|
<div class="d-flex justify-content-center align-items-center">
|
||||||
|
<hr class="flex-grow-1 my-0">
|
||||||
|
<div class="mx-2 my-0 font-weight-light text-muted small">{{ rank }}</div>
|
||||||
|
<hr class="flex-grow-1 my-0">
|
||||||
|
</div>
|
||||||
|
{% for response in rank_responses %}
|
||||||
<a class="btn response-character-button mb-1 btn-class-{{ response.character.klass }}" role="button" href="#">
|
<a class="btn response-character-button mb-1 btn-class-{{ response.character.klass }}" role="button" href="#">
|
||||||
{% if response.character != response.character.user.main %}
|
{% if response.character != response.character.user.main %}
|
||||||
<abbr title="{{ response.character.user.main }}">{{ response.character.name }}</abbr>
|
<abbr title="{{ response.character.user.main }}">{{ response.character.name }}</abbr>
|
||||||
|
@ -79,6 +86,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue