diff --git a/club/templates/club/club_detail.jinja b/club/templates/club/club_detail.jinja
index bc1a1c0b..2c663a88 100644
--- a/club/templates/club/club_detail.jinja
+++ b/club/templates/club/club_detail.jinja
@@ -26,6 +26,15 @@
{% endblock %}
{% block content %}
+ {% if user.can_edit(club) %}
+
+ {% trans %}Edit{% endtrans %}
+
+ {% endif %}
+
diff --git a/club/views.py b/club/views.py
index 6f2c7716..77e59721 100644
--- a/club/views.py
+++ b/club/views.py
@@ -106,42 +106,35 @@ class ClubTabsMixin(TabedViewMixin):
return self.object.get_display_name()
def get_list_of_tabs(self):
+ if not self.request.user.has_perm("club.view_club"):
+ # The user will still be able to see the club main page,
+ # but nothing else.
+ # It's useless to display a tab with only one item, so return nothing.
+ return []
tab_list = [
{
"url": reverse("club:club_view", kwargs={"club_id": self.object.id}),
"slug": "infos",
"name": _("Infos"),
- }
+ },
+ {
+ "url": reverse("club:club_members", kwargs={"club_id": self.object.id}),
+ "slug": "members",
+ "name": _("Members"),
+ },
+ {
+ "url": reverse(
+ "club:club_old_members", kwargs={"club_id": self.object.id}
+ ),
+ "slug": "elderlies",
+ "name": _("Old members"),
+ },
+ {
+ "url": reverse("club:club_hist", kwargs={"club_id": self.object.id}),
+ "slug": "history",
+ "name": _("History"),
+ },
]
- if self.request.user.has_perm("club.view_club"):
- tab_list.extend(
- [
- {
- "url": reverse(
- "club:club_members", kwargs={"club_id": self.object.id}
- ),
- "slug": "members",
- "name": _("Members"),
- },
- {
- "url": reverse(
- "club:club_old_members", kwargs={"club_id": self.object.id}
- ),
- "slug": "elderlies",
- "name": _("Old members"),
- },
- ]
- )
- if self.object.page:
- tab_list.append(
- {
- "url": reverse(
- "club:club_hist", kwargs={"club_id": self.object.id}
- ),
- "slug": "history",
- "name": _("History"),
- }
- )
if self.request.user.can_edit(self.object):
tab_list.extend(
[
@@ -159,21 +152,6 @@ class ClubTabsMixin(TabedViewMixin):
"slug": "edit",
"name": _("Edit"),
},
- ]
- )
- if self.object.page and self.request.user.can_edit(self.object.page):
- tab_list.append(
- {
- "url": reverse(
- "core:page_edit",
- kwargs={"page_name": self.object.page.get_full_name()},
- ),
- "slug": "page_edit",
- "name": _("Edit club page"),
- }
- )
- tab_list.extend(
- [
{
"url": reverse(
"club:club_sellings", kwargs={"club_id": self.object.id}
diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po
index eadaed9e..be490ca0 100644
--- a/locale/fr/LC_MESSAGES/django.po
+++ b/locale/fr/LC_MESSAGES/django.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2026-10-09 21:44+0200\n"
+"POT-Creation-Date: 2026-10-15 14:50+0200\n"
"PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Maréchal \n"
@@ -517,6 +517,22 @@ msgstr "Url dupliquée"
msgid "This link doesn't match with the url base of its type."
msgstr "Ce lien ne correspond pas à l'url de base de son type."
+#: club/templates/club/club_detail.jinja club/views.py
+#: com/templates/com/news_admin_list.jinja com/templates/com/poster_list.jinja
+#: com/templates/com/screen_list.jinja com/templates/com/weekmail.jinja
+#: core/templates/core/file.jinja core/templates/core/group_list.jinja
+#: core/templates/core/page/base.jinja core/templates/core/user_tools.jinja
+#: core/views/user.py counter/templates/counter/cash_summary_list.jinja
+#: counter/templates/counter/counter_list.jinja
+#: election/templates/election/election_detail.jinja
+#: forum/templates/forum/macros.jinja
+#: pedagogy/templates/pedagogy/fragments/ue_detail/comments.jinja
+#: pedagogy/templates/pedagogy/guide.jinja sas/templates/sas/album.jinja
+#: trombi/templates/trombi/detail.jinja
+#: trombi/templates/trombi/edit_profile.jinja
+msgid "Edit"
+msgstr "Éditer"
+
#: club/templates/club/club_detail.jinja com/templates/com/news_list.jinja
msgid "Links"
msgstr "Liens"
@@ -1019,26 +1035,6 @@ msgstr "Historique"
msgid "Tools"
msgstr "Outils"
-#: club/views.py com/templates/com/news_admin_list.jinja
-#: com/templates/com/poster_list.jinja com/templates/com/screen_list.jinja
-#: com/templates/com/weekmail.jinja core/templates/core/file.jinja
-#: core/templates/core/group_list.jinja core/templates/core/page/base.jinja
-#: core/templates/core/user_tools.jinja core/views/user.py
-#: counter/templates/counter/cash_summary_list.jinja
-#: counter/templates/counter/counter_list.jinja
-#: election/templates/election/election_detail.jinja
-#: forum/templates/forum/macros.jinja
-#: pedagogy/templates/pedagogy/fragments/ue_detail/comments.jinja
-#: pedagogy/templates/pedagogy/guide.jinja sas/templates/sas/album.jinja
-#: trombi/templates/trombi/detail.jinja
-#: trombi/templates/trombi/edit_profile.jinja
-msgid "Edit"
-msgstr "Éditer"
-
-#: club/views.py
-msgid "Edit club page"
-msgstr "Éditer la page de club"
-
#: club/views.py
msgid "Sellings"
msgstr "Vente"