ets-berkeley-edu/calcentral — pull request #1172 by ctweney (2013-06-11 20:35:56+00:00)
Title: CLC-1464 Use Rails_Admin to manage My Campus Links

The user-facing My Campus pages uses a feature flag to determine whether the old static campuslinks.json file is used, or the new /api/my/campuslinks feed, which is based on the database records.

CampusLinkLoader gives us a way to create db records based on a JSON file. This will let us export data from one server and make it the default set of links for other machines (by writing a new db migration that reads the new JSON). That way we can develop a linkset on qa, say, and not have it interfere with anything until we're ready to put it into the code base.

To administer links hit /ccadmin. You must be superuser to do this.

JIRA: https://jira.media.berkeley.edu/jira/browse/CLC-1464

Squashed commit of the following:

commit 72ae22ea9140770acbd28cff3a349848204b4c52
Author: Chris Tweney
Date: Tue Jun 11 13:16:53 2013 -0700

CLC-1464 Fix labels, only allow root cats as root cat of sections

commit aa81fd1bce3cd1284f9e625f49c61136c3503e06
Author: Chris Tweney
Date: Tue Jun 11 12:41:31 2013 -0700

CLC-1464 Provide way for admin to expire the link cache

commit 310148005b7610c2b740665bfc960a7fe8cfa790
Author: Chris Tweney
Date: Tue Jun 11 12:32:16 2013 -0700

CLC-1464 Import campuslinks.json as a migration

commit b1488755838d16dba2bd63ccfe07f54986eda842
Author: Chris Tweney
Date: Tue Jun 11 08:29:19 2013 -0700

CLC-1464 Renaming main_cat to root_cat

commit d4c80f99c8e789fd407b2612c2d19edbee10a821
Author: Chris Tweney
Date: Mon Jun 10 16:05:59 2013 -0700

CLC-1464 First start at data loading for campus links

commit 2e690a6968a7a342beef00e15da19210e763b12e
Author: Chris Tweney
Date: Mon Jun 10 15:04:49 2013 -0700

CLC-1464 Rename migration file

commit 30b2f5d4a612c8b38696f472d864fd9bff028098
Author: Chris Tweney
Date: Mon Jun 10 14:43:03 2013 -0700

CLC-1464 Consolidate migrations into one file

commit e49c5f51f53ef5e41e24d7fe37bb1c04289659e4
Author: Scot Hacker
Date: Fri May 31 17:59:02 2013 -0700

CLC-1464 RailsAdmin for data management; CampusLinks generation
https://jira.media.berkeley.edu/jira/browse/CLC-1464

- This commit should satisfy all notes from Chris' code review.

- Reference to the new JSON feed is commented out in campusController.js so this can go live any time without affecting anything else. Just toggle that when ready.

- Sorry I didn't have time to work on data import/export, but we felt it was more important to get the data structure right.