Don't allow KitRequests to be edited on the Item form.
Note the addition of new fields to PersonRole.
Changed the grid-cell listing of people to use ItemPerson again instead of just Person, so that we can see whether the person is visible. Added a method to ItemPerson to return a different CSS class name according to visibility, and added a style to show_grid.css, to make those appear as italic.
NOTE: Needed to re-run collectstatic admin command after this, because show_grid.css is a static file.
Comments from discussions during LonCon3. No changes to code.
- Added some initial (untested) support for KonOpas output. The dates and times are going to need some work, at least, and there's going to be a problem with public names.
- Added fields for head shots, home pages, twitter names and Facebook profiles.
__init__.py should always have been included, even though it's empty.
Some initial work to support drag and drop, using a REST framework (specifically, Django REST Framework).
- serializers.py defines serialisers for Grids, Items, Slots, and People, but only for some fields (at present, all we're expecting to change is an item's room and start).
- URLs maps things at /api/ onto some new views via APIViews.
- Grid now has an items() method, to return the relevant items.
The plan is that we should be able to have the grid page pull /api/grid/N/, and get the necessary slots, items and people to be able to render a table, and then be able to PUT (or post) an item back to /api/item/M/, to overwrite the room and slot.
I have a standalone page, with HTML, JS, CSS and data, which does a drag-and-drop grid. I've separated this into drag.js, drag.css, drag_grid.html and the drag_grid() view, accessible as /streampunk/drag/N/. This doesn't use the data format from the REST API yet.
Oh yeah, we need to include an API for retrieving the rooms as well, don't we?
Rather significant rewrite to allow for items occupying multiple slots. At time of writing, this is still buggy in the drag and drop.
Oops. Forgot to define the array that supports finding updated info on the moved item. This is just a temporary measure, because when we actually move the item in the database, we'll get the updated item back, including the new slots.
There's a bug, though: We use the slot startText and room name as components of table cell's id, but such ids cannot contain spaces, and our room names do. Currently, have just edited those out of the static room info, and we're not using day/startText combos yet, but will have to do something about that.
Added a mapping operation to remove spaces when creating classes and ids.
Retrieve the room and grid info dynamically.
Render the people in the grid, as well, and include links, too.
Don't hard-code the links to the grid and room info.
Separate the moving of the item from cell to cell into a different function, in preparation for converting into a POST operation.
Communicate with the server to change the item's location, and then re-draw it.
Include the CSRF token in the script, and pass it back as a header.
A status update of outstanding actions. No functional changes.
Add URLs to the Room/Item/Person serialisers, and an API attribute to the Item serialiser, so that we aren't hard-coding those paths.
Also corrected a minor bug where we were making the new item global, when moving it.