learningequality/ka-lite — pull request #636 by dylanjbarth (2013-09-05 19:16:24+00:00)
Title: Make orgs & zones deletable

Solves https://github.com/learningequality/ka-lite/issues/593.

- Organizations should always be deletable, but only by the owner.
- Zones should be deletable, as long as no models depend on them.

Changes:

- Can now delete orgs from the org management page.
- Can now delete zones from the zone management page _if_ they don't have any facilities or devices.
- Also made a few tiny styling changes, e.g. pluralizing "My Organizations" when there are multiple, and making all buttons look the same with Arnaud's slick styling.

Testing:
- Deleting orgs works and if they have zones attached, the zone becomes a headless zone
- Deleting zones works - the button to delete only appears if the zone has no facility or devices, and even if you try the URL to delete, it won't delete if it has a facility or a device.

Known Issues:
- Messages for success and failure won't render for some reason, hoping @bcipolli can help there

Screenshots:
- Can delete orgs:
![screen shot 2013-09-05 at 12 12 42 pm](https://f.cloud.github.com/assets/1319950/1090934/524c03a4-165f-11e3-8a9c-7aa78c7cb848.png)
- Can delete zones without facilities or devices:
![screen shot 2013-09-05 at 12 13 03 pm](https://f.cloud.github.com/assets/1319950/1090936/59f612d4-165f-11e3-8115-5226d24c0452.png)
- Can't delete zones with facilites or devices:
![screen shot 2013-09-05 at 12 12 55 pm](https://f.cloud.github.com/assets/1319950/1090940/697fa210-165f-11e3-9f48-e18ed2d218a9.png)