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 15:30:35 +01:00
|
|
|
Router.reopen({
|
2014-05-14 01:52:31 +00:00
|
|
|
location: 'trailing-history', // use HTML5 History API instead of hash-tag based URLs
|
2014-03-02 15:30:35 +01: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 23:44:08 -04:00
|
|
|
this.route('signin');
|
|
|
|
this.route('signup');
|
|
|
|
this.route('forgotten');
|
2014-03-31 11:57:50 +02:00
|
|
|
this.route('reset', { path: '/reset/:token' });
|
2014-03-02 15:30:35 +01:00
|
|
|
this.resource('posts', { path: '/' }, function () {
|
2014-03-02 15:12:06 -05:00
|
|
|
this.route('post', { path: ':post_id' });
|
2014-03-02 15:30:35 +01:00
|
|
|
});
|
|
|
|
this.resource('editor', { path: '/editor/:post_id' });
|
|
|
|
this.route('new', { path: '/editor' });
|
2014-03-09 23:44:08 -04:00
|
|
|
this.resource('settings', function () {
|
|
|
|
this.route('general');
|
|
|
|
this.route('user');
|
|
|
|
this.route('debug');
|
|
|
|
this.route('apps');
|
2013-06-01 19:45:02 -04:00
|
|
|
});
|
2014-04-08 00:01:46 +02:00
|
|
|
this.route('debug');
|
2014-05-14 18:11:46 -06:00
|
|
|
//Redirect legacy content to posts
|
|
|
|
this.route('content');
|
2014-02-25 23:58:00 -05:00
|
|
|
});
|
2014-02-26 23:45:45 -05:00
|
|
|
|
2014-05-14 18:11:46 -06:00
|
|
|
export default Router;
|