codeforamerica/ticket-to-ride — pull request #271 by plusjeff (2014-09-04 22:23:49+00:00)
Title: "Come Together" or First draft of admin screens

@codesliced @andrewmaier @markGiansanti I'm opening this pull request early so that I can use this space to list notes about things that have changed, particularly if it has impact on the guardian side. Please feel free to comment or review though as I go. This will be a big change set. **Please don't merge until I give the thumbs up.**

# Admin Changes

This pull request includes backend functionality and skeleton pages for the admin screens. It does not include authentication, and the authorization that is included is also pretty rough. There is very little styling here, so pages are very barebones. I've applied CSS from the prototypes, but most of it is either non-functional or I've applied it incorrectly or gotten the semantics messed up (@andrewmaier will work on this -- please branch off `admin-first-draft` though if you do jump in before Monday).

# Guardian Changes

Did cleanup on the schema such that only fields we're going to use (i.e. the ones we can use with Aspen) are there. Right now, this mostly includes changes to the `Student` and `ContactPerson` models.

# URLs to Try Stuff

With most of these pages, you'll need to bounce to the Admin Login page first to establish a session.

## Initial Setup and Admin Login

`/admin`

This allows you to create a central admin user, but it is also the URL to go to login as either a central or district admin. No password is asked for yet, and the admin is chosen via a populated select box. Come back to this page when you want to switch between roles. If you run `rake db:seed`, you'll get 1 central admin and 2 district admins.

## Central admin pages

`/admin/central`

Will initially take you to the supplemental materials list for the state / central authority. Has navigation to other central admin functions. File uploads are not currently working for supplemental materials.

## Central admin adds district admin

`/admin/central/people`

Allows district admins to be added. The confirmation function does not currently send an e-mail, so the Resend confirmation link change is merely cosmetic.

`/admin/central/people/{admin_user_id}`

If you look up `AdminUser.last` in `rails console`, you can get the ID for a newly added admin. Take the ID and add it onto the URL. I've left a debug checkbox that allows you to enable their account for now. You can also do this in `rails console` too:

```
> a = AdminUser.last
> a.active = true
> a.save
```

# District Admin functions

`/admin/district`

Will drop a district admin on the screen for applications received (i.e. applications for review).