Commit a3abc08f authored by Thijs de Jong's avatar Thijs de Jong
Browse files

Merge branch 'fix/committee-admin' into 'master'

Re-add committee admin

See merge request thalia/concrexit!1007
parents 8b9359ba 11fcaeb8
......@@ -40,7 +40,7 @@ class MemberGroupMembershipInline(admin.StackedInline):
autocomplete_fields = ('member',)
@admin.register(models.Society)
@admin.register(models.Committee)
class CommitteeAdmin(TranslatedModelAdmin):
"""Manage the societies"""
inlines = (MemberGroupMembershipInline,)
......@@ -61,6 +61,27 @@ class CommitteeAdmin(TranslatedModelAdmin):
return None
@admin.register(models.Society)
class SocietyAdmin(TranslatedModelAdmin):
"""Manage the societies"""
inlines = (MemberGroupMembershipInline,)
form = MemberGroupForm
list_display = ('name', 'since', 'until', 'active', 'email')
list_filter = ('until', 'active',)
search_fields = ('name', 'description')
filter_horizontal = ('permissions',)
fields = ('name', 'description', 'photo', 'permissions', 'since',
'until', 'contact_mailinglist', 'contact_email', 'active')
def email(self, instance):
if instance.contact_email:
return instance.contact_email
elif instance.contact_mailinglist:
return instance.contact_mailinglist.name + '@thalia.nu'
return None
@admin.register(models.Board)
class BoardAdmin(TranslatedModelAdmin):
"""Manage the board"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment