From ff9c78ed4e6eab5b520104bafed024707e0f3fd0 Mon Sep 17 00:00:00 2001 From: korenstin Date: Sun, 25 Aug 2024 14:29:06 +0200 Subject: [PATCH] added opener in admin and fixed the guest view --- apps/activity/admin.py | 10 +++++++++- apps/permission/fixtures/initial.json | 8 ++++---- locale/fr/LC_MESSAGES/djangojs.po | 8 ++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/apps/activity/admin.py b/apps/activity/admin.py index 88496361..3355d1aa 100644 --- a/apps/activity/admin.py +++ b/apps/activity/admin.py @@ -5,7 +5,7 @@ from django.contrib import admin from note_kfet.admin import admin_site from .forms import GuestForm -from .models import Activity, ActivityType, Entry, Guest +from .models import Activity, ActivityType, Entry, Guest, Opener @admin.register(Activity, site=admin_site) @@ -45,3 +45,11 @@ class EntryAdmin(admin.ModelAdmin): Admin customisation for Entry """ list_display = ('note', 'activity', 'time', 'guest') + + +@admin.register(Opener, site=admin_site) +class OpenerAdmin(admin.ModelAdmin): + """ + Admin customisation for Opener + """ + list_display = ('activity', 'opener') diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index d5a4b118..1b97acac 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -3167,12 +3167,12 @@ "activity", "entry" ], - "query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]], \"activity__open\": true, \"activity__activity_type__manage_entries\":true}", + "query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]]}", "type": "view", "mask": 2, "field": "", "permanent": false, - "description": "Voir les entrées des activités ouvertes dont l'utilisateur⋅rice est ouvreur⋅se" + "description": "Voir les entrées des activités dont l'utilisateur⋅rice est ouvreur⋅se" } }, { @@ -3183,12 +3183,12 @@ "activity", "guest" ], - "query": "{\"activity__pk__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]], \"activity__open\": true, \"activity__activity_type__manage_entries\":true}", + "query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]]}", "type": "view", "mask": 2, "field": "", "permanent": false, - "description": "Voir les invité⋅es des activités ouvertes dont l'utilisateur⋅rice est ouvreur⋅se" + "description": "Voir les invité⋅es des activités dont l'utilisateur⋅rice est ouvreur⋅se" } }, { diff --git a/locale/fr/LC_MESSAGES/djangojs.po b/locale/fr/LC_MESSAGES/djangojs.po index 93be9947..90f85fc4 100644 --- a/locale/fr/LC_MESSAGES/djangojs.po +++ b/locale/fr/LC_MESSAGES/djangojs.po @@ -17,6 +17,14 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +#: apps/member/static/member/js/alias.js:17 +msgid "Opener successfully added" +msgstr "Ouvreureuse ajouté avec succès" + +#: apps/member/static/member/js/alias.js:17 +msgid "Opener successfully deleted" +msgstr "Ouvreureuse supprimé avec succès" + #: apps/member/static/member/js/alias.js:17 msgid "Alias successfully added" msgstr "Alias ajouté avec succès"