2014-02-26 23:45:45 -05:00
|
|
|
/*global Ember */
|
2014-02-25 23:58:00 -05:00
|
|
|
|
2014-02-26 23:45:45 -05:00
|
|
|
// ensure we don't share routes between all Router instances
|
|
|
|
var Router = Ember.Router.extend();
|
|
|
|
|
2014-03-02 09:30:35 -05:00
|
|
|
Router.reopen({
|
2014-03-09 19:56:56 -05:00
|
|
|
location: 'history', // use HTML5 History API instead of hash-tag based URLs
|
2014-03-02 09:30:35 -05:00
|
|
|
rootURL: '/ghost/ember/' // admin interface lives under sub-directory /ghost
|
|
|
|
});
|
|
|
|
|
2014-02-26 23:45:45 -05:00
|
|
|
Router.map(function () {
|
2014-03-09 22:44:08 -05:00
|
|
|
this.route('signin');
|
|
|
|
this.route('signup');
|
|
|
|
this.route('forgotten');
|
2014-03-31 04:57:50 -05:00
|
|
|
this.route('reset', { path: '/reset/:token' });
|
2014-03-02 09:30:35 -05:00
|
|
|
this.resource('posts', { path: '/' }, function () {
|
2014-03-02 15:12:06 -05:00
|
|
|
this.route('post', { path: ':post_id' });
|
2014-03-02 09:30:35 -05:00
|
|
|
});
|
|
|
|
this.resource('editor', { path: '/editor/:post_id' });
|
|
|
|
this.route('new', { path: '/editor' });
|
2014-03-09 22:44:08 -05:00
|
|
|
this.resource('settings', function () {
|
|
|
|
this.route('general');
|
|
|
|
this.route('user');
|
|
|
|
this.route('debug');
|
|
|
|
this.route('apps');
|
2013-06-01 18:45:02 -05:00
|
|
|
});
|
2014-04-07 17:01:46 -05:00
|
|
|
this.route('debug');
|
2014-02-25 23:58:00 -05:00
|
|
|
});
|
2014-02-26 23:45:45 -05:00
|
|
|
|
2014-05-07 16:28:29 -05:00
|
|
|
export default Router;
|