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.
This commit is contained in:
parent
cabad1c7d5
commit
193ffc76d5
1 changed files with 5 additions and 1 deletions
6
vendor/symposion/schedule/admin.py
vendored
6
vendor/symposion/schedule/admin.py
vendored
|
@ -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"]
|
||||
|
|
Loading…
Reference in a new issue