From 193ffc76d5a20e3247c1bb5ecf3a9ef16457efb1 Mon Sep 17 00:00:00 2001 From: James Polley Date: Sun, 24 Dec 2017 13:52:51 +1100 Subject: [PATCH] List rooms in slot admin In many parts of the schedule there are multiple slots with the same start/end times, and it can be hard to find the one you want to edit. Make this slightly simpler by listing the room names in the admin list. --- vendor/symposion/schedule/admin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vendor/symposion/schedule/admin.py b/vendor/symposion/schedule/admin.py index ed9d29df..858c59ab 100644 --- a/vendor/symposion/schedule/admin.py +++ b/vendor/symposion/schedule/admin.py @@ -27,10 +27,14 @@ class SlotRoomInline(admin.TabularInline): class SlotAdmin(admin.ModelAdmin): list_filter = ("day", "kind","exclusive") - list_display = ("day", "start", "end", "kind", "content_override","exclusive") + list_display = ("day", "start", "end", "kind", "room_names", + "content_override","exclusive") list_editable = ("exclusive",) inlines = [SlotRoomInline] + def room_names(self, slot): + return ", ".join(room.name for room in slot.rooms.all()) + class RoomAdmin(admin.ModelAdmin): list_display = ["name", "order", "schedule"]