diff --git a/tournaments/templates/tournaments/matches.html b/tournaments/templates/tournaments/matches.html
index 8df8f07..0bc561a 100644
--- a/tournaments/templates/tournaments/matches.html
+++ b/tournaments/templates/tournaments/matches.html
@@ -6,7 +6,20 @@
{% block content %}
+{% if rounds or group_stages %}
+
+ {% endif %}
+
{% if matches %}
+
{% for match in matches %}
{% include 'tournaments/match_cell.html' %}
diff --git a/tournaments/views.py b/tournaments/views.py
index b5fc2ba..769f0d5 100644
--- a/tournaments/views.py
+++ b/tournaments/views.py
@@ -35,10 +35,19 @@ def index(request):
)
def tournament(request, tournament_id):
+
tournament = get_object_or_404(Tournament, pk=tournament_id)
- live_matches = list(tournament.live_matches(broadcasted=False))
+
+ round_id = request.GET.get('round')
+ group_stage_id = request.GET.get('group_stage')
+ live_matches = list(tournament.live_matches(False, group_stage_id, round_id))
+
+ rounds = tournament.round_set.order_by('index')
+ group_stages = tournament.groupstage_set.order_by('index')
return render(request, 'tournaments/matches.html', {
'tournament': tournament,
+ 'rounds': rounds,
+ 'group_stages': group_stages,
'matches': live_matches,
})