diff --git a/game/templates/game/group_detail.html b/game/templates/game/group_detail.html
index 8fc9186..e3b5f56 100644
--- a/game/templates/game/group_detail.html
+++ b/game/templates/game/group_detail.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-{% load form %}
+{% load form youtube %}
{% block content %}
{% if group.owner == user %}
@@ -39,6 +39,9 @@
{% if group.owner == user %} | {% endif %}
Date |
+
+ Playlists
+ |
Joueurs |
@@ -52,6 +55,11 @@
{{ game.date }}
|
+
+ {% if game.playlist %}
+ Playlist
+ {% endif %}
+ |
{{ game.players.all|join:", " }} |
{% endfor %}
diff --git a/game/templates/game/musikgame_detail.html b/game/templates/game/musikgame_detail.html
index 7d16d64..444c7f1 100644
--- a/game/templates/game/musikgame_detail.html
+++ b/game/templates/game/musikgame_detail.html
@@ -1,4 +1,5 @@
{% extends "base.html" %}
+{% load youtube %}
{% block content %}
{{ musikgame.date }}
@@ -6,7 +7,7 @@
{% if musikgame.playlist or musikgame.playlist_loading %}
Playlist
diff --git a/game/templates/tags/youtube/playlist.html b/game/templates/tags/youtube/playlist.html
new file mode 100644
index 0000000..3270d81
--- /dev/null
+++ b/game/templates/tags/youtube/playlist.html
@@ -0,0 +1 @@
+{{ text }}
diff --git a/game/templatetags/__init__.py b/game/templatetags/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/game/templatetags/youtube.py b/game/templatetags/youtube.py
new file mode 100644
index 0000000..6fc1ac1
--- /dev/null
+++ b/game/templatetags/youtube.py
@@ -0,0 +1,8 @@
+from django import template
+
+register = template.Library()
+
+
+@register.simple_tag
+def yt_playlist(game):
+ return f"https://youtube.com/watch?v={game.musicgameorder_set.first().music_video.yt_id}&list={game.playlist}"