Skip to content

Commit

Permalink
Disable link to playing members from games card if 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tina-otoge committed Sep 3, 2024
1 parent d223b86 commit 8814f7d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/templates/games.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,17 @@
</div>
</div>
<div class="game-bar">
{% if game.db.users | length %}
<a class="members" href="{{ url_for('users')}}?game={{ game.slug }}">
{{ game.db.users | length }}
<span class="material-icons">group</span>
</a>
{% else %}
<div class="members">
0
<span class="material-icons">group</span>
</div>
{% endif %}
<div class="links">
{% if game.page %}
<a href="{{ url_for('game', slug=game.slug) }}" class="button small">Détails</a>
Expand Down Expand Up @@ -259,10 +266,17 @@
</div>
{% endif %}
<div class="game-bar">
{% if game.db.users | length %}
<a class="members" href="{{ url_for('users')}}?game={{ game.slug }}">
{{ game.db.users | length }}
<span class="material-icons">group</span>
</a>
{% else %}
<div class="members">
0
<span class="material-icons">group</span>
</div>
{% endif %}
{% if game.page %}
<div class="links">
<a href="{{ game.page }}" class="button small">Détails</a>
Expand Down

0 comments on commit 8814f7d

Please sign in to comment.