Commit graph

12 commits

Author SHA1 Message Date
James Polley
96a24489b6 Fix off-by-one error in rowspan calcuations 2017-12-24 19:20:14 +11:00
James Polley
b833b7d869 Order slots by room order first
* lca2018 has a situation where we have multiple slots starting at the
  same time, but ending at different times
* The headers of the timetable grid are sorted by room sort order
* In sqlite at least, ordering by start,order seems to implicitly
  resolve duplicate start times by looking at the other sort fields
  first, and will only sort on order if all other fields are identical

* This results in the slot that ends first going in column 1, which
  gets out of sync with the room listed in the header

* I can't figure out how to solve this in the database, so...

* Force the slots to be sorted by room order.
* Then, for each start_time, select out slots starting at that time
  and operate on them
* This both gets the slots in the right order *and* keeps multi-room
  slots with the right colspan. Yay!

* It's possible that this wouldn't be needed on some DBs which might
do the sorting differently.
2017-12-24 19:20:04 +11:00
James Polley
193ffc76d5 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.
2017-12-24 13:54:57 +11:00
James Polley
a880bc27fb Enhance track admin 2017-12-03 18:11:39 +11:00
James Polley
3239bbe29a Don't duplicate existing rooms when importing schedule CSV
* Old implementation needs to see exactly the same rooms in exactly
  the same order every time it loads new data, otherwise it will
  create a duplicate entry for the room that differs only in display
  order.
* New implementation ignores the display order when checking to see
  if the room already exists.
2017-12-03 16:15:19 +11:00
James Polley
1eb28f2c80 Enhance Schedule list display 2017-10-15 15:58:43 +10:00
James Polley
fab25ad0f5 Room needs dunder-str as well as dunder-unicode 2017-10-15 15:33:56 +10:00
James Polley
e48c8c171a Display (editably) the exclusvity of the slot in the admin
(Also add filtering so that we can easily find eg all plenaries which
are not yet flagged as exclusive)
2017-10-15 15:14:55 +10:00
James Polley
6b17e021ca Add a __unicode__ method to the Room model
Closes #25
2017-10-15 15:07:56 +10:00
James Polley
b154d90eed Wrap input CSV in an TextIOWrapper
Closes #24
2017-10-15 14:59:57 +10:00
James Polley
183dea0b6e Python3 compatibility in timetable listing
itertools changed a little between py2 and py3
2017-09-17 22:08:39 +10:00
Sachi King
d95d66dac8 Taking one out of PyCon's (US) book
We're lock-step with symposion, and upstream is dead.
Vendor it.
2017-05-27 20:11:39 +10:00