Implement group management features and update templates for improved navigation

This commit is contained in:
Edgar P. Burkhart 2025-06-15 09:56:08 +02:00
parent f3e914aed8
commit 088bb52c07
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
9 changed files with 80 additions and 37 deletions

View file

@ -1,26 +1,33 @@
<p>Bienvenue {{ user.username }} !</p>
<h2>
<i class="ri-group-2-fill"></i> Mes groupes
</h2>
<p>
<a href="{% url "group_create" %}" role="button"><i class="ri-add-box-fill"></i> Créer un groupe</a>
{% if not user.youtubecredentials.credentials %}
<a href="{% url "youtube_login" %}" role="button"><i class="ri-youtube-fill"></i> Me connecter au compte Youtube</a>
{% extends "base.html" %}
{% load form %}
{% block content %}
<h1>
<i class="ri-music-ai-fill"></i> Musik
</h1>
<p>Bienvenue {{ user.username }} !</p>
<h2>
<i class="ri-group-2-fill"></i> Mes groupes
</h2>
<p>
{% if not user.youtubecredentials.credentials %}
<a href="{% url "youtube_login" %}" role="button"><i class="ri-youtube-fill"></i> Me connecter au compte Youtube</a>
{% endif %}
</p>
{% if user.owned_group_set.exists or user.group_set.exists %}
{% for group in user.owned_group_set.all %}
<a class="group" href="{{ group.get_absolute_url }}">
<article>
<i class="ri-vip-crown-fill owner i"></i> {{ group.name }}
</article>
</a>
{% endfor %}
{% for group in user.group_set.all %}
<a class="group" href="{{ group.get_absolute_url }}">
<article>
<i class="ri-group-2-fill i"></i> {{ group.name }} <span class="group-owner">{{ group.owner }}</span>
</article>
</a>
{% endfor %}
{% endif %}
</p>
{% if user.owned_group_set.exists or user.group_set.exists %}
{% for group in user.owned_group_set.all %}
<a class="group" href="{{ group.get_absolute_url }}">
<article>
<i class="ri-vip-crown-fill owner i"></i> {{ group.name }}
</article>
</a>
{% endfor %}
{% for group in user.group_set.all %}
<a class="group" href="{{ group.get_absolute_url }}">
<article>
<i class="ri-group-2-fill i"></i> {{ group.name }} <span class="group-owner">{{ group.owner }}</span>
</article>
</a>
{% endfor %}
{% endif %}
{% inline_form group_form action="group_create" submit="Créer" %}
{% endblock content %}