Compare commits
2 commits
a2d1e753c1
...
7820021864
Author | SHA1 | Date | |
---|---|---|---|
Casper V. Kristensen | 7820021864 | ||
Casper V. Kristensen | 2bda918954 |
|
@ -93,7 +93,7 @@ class RaidResponse(models.Model):
|
|||
)
|
||||
|
||||
class Meta:
|
||||
ordering = ["-status", "role", "character__klass", "character__name"]
|
||||
ordering = ["-status", "role", "character__klass", "character__user__rank", "character__name"]
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=["raid", "character"], name="unique_character_raid_signup")
|
||||
]
|
||||
|
|
|
@ -70,10 +70,22 @@
|
|||
{% regroup role_responses by character.klass as class_responses_list %}
|
||||
{% for class, class_responses in class_responses_list %}
|
||||
<div class="d-flex flex-column mr-2 mb-4">
|
||||
{% for response in class_responses %}
|
||||
<a class="btn response-character-button mb-1 btn-class-{{ response.character.klass }}" role="button" href="#">
|
||||
{{ response.character.name }}
|
||||
</a>
|
||||
{% 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="#">
|
||||
{% if response.character != response.character.user.main %}
|
||||
<abbr title="{{ response.character.user.main }}">{{ response.character.name }}</abbr>
|
||||
{% else %}
|
||||
{{ response.character.name }}
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue