2016-07-07 18:54:16 -07:00
|
|
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
|
|
//
|
|
|
|
// This software (Documize Community Edition) is licensed under
|
|
|
|
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
|
|
//
|
|
|
|
// You can operate outside the AGPL restrictions by purchasing
|
|
|
|
// Documize Enterprise Edition and obtaining a commercial license
|
|
|
|
// by contacting <sales@documize.com>.
|
|
|
|
//
|
|
|
|
// https://documize.com
|
|
|
|
|
2017-11-16 13:28:05 +00:00
|
|
|
import EmberRouter from '@ember/routing/router';
|
2016-07-07 18:54:16 -07:00
|
|
|
import config from './config/environment';
|
|
|
|
|
2017-11-16 13:28:05 +00:00
|
|
|
var Router = EmberRouter.extend({
|
2016-11-05 14:53:44 -07:00
|
|
|
location: config.locationType
|
2016-07-07 18:54:16 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
export default Router.map(function () {
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('folders', {
|
|
|
|
path: '/'
|
2016-11-06 20:11:21 -08:00
|
|
|
});
|
2016-11-08 16:10:19 -08:00
|
|
|
|
2016-11-06 20:11:21 -08:00
|
|
|
this.route('folder', {
|
|
|
|
path: 's/:folder_id/:folder_slug'
|
2017-09-13 19:22:38 +01:00
|
|
|
}, function() {
|
2017-11-27 15:38:39 +00:00
|
|
|
this.route('category', {
|
|
|
|
path: 'category'
|
2017-09-18 13:02:15 +01:00
|
|
|
})
|
2016-11-06 20:11:21 -08:00
|
|
|
});
|
|
|
|
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('document', {
|
|
|
|
path: 's/:folder_id/:folder_slug/d/:document_id/:document_slug'
|
|
|
|
}, function () {
|
2016-11-09 15:16:44 -08:00
|
|
|
this.route('section', {
|
|
|
|
path: 'section/:page_id'
|
|
|
|
});
|
2017-01-21 17:28:31 -08:00
|
|
|
this.route('block', {
|
|
|
|
path: 'block/:block_id'
|
|
|
|
});
|
2017-03-08 17:32:46 +00:00
|
|
|
this.route('history', {
|
|
|
|
path: 'history'
|
|
|
|
});
|
2016-11-05 14:53:44 -07:00
|
|
|
});
|
2016-07-07 18:54:16 -07:00
|
|
|
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('customize', {
|
|
|
|
path: 'settings'
|
|
|
|
}, function () {
|
|
|
|
this.route('general', {
|
|
|
|
path: 'general'
|
|
|
|
});
|
|
|
|
this.route('users', {
|
|
|
|
path: 'users'
|
|
|
|
});
|
|
|
|
this.route('folders', {
|
|
|
|
path: 'folders'
|
|
|
|
});
|
2016-10-18 19:20:51 -07:00
|
|
|
this.route('global', {
|
2016-11-05 14:53:44 -07:00
|
|
|
path: 'global'
|
|
|
|
});
|
2017-03-14 17:19:53 +00:00
|
|
|
this.route('auth', {
|
|
|
|
path: 'auth'
|
|
|
|
});
|
2016-11-05 14:53:44 -07:00
|
|
|
});
|
2016-07-07 18:54:16 -07:00
|
|
|
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('setup', {
|
|
|
|
path: 'setup'
|
|
|
|
});
|
2016-07-07 18:54:16 -07:00
|
|
|
|
2017-03-22 12:21:18 +00:00
|
|
|
this.route('secure', {
|
|
|
|
path: 'secure/:token'
|
|
|
|
});
|
|
|
|
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('auth', {
|
|
|
|
path: 'auth'
|
|
|
|
}, function () {
|
|
|
|
this.route('sso', {
|
|
|
|
path: 'sso/:token'
|
|
|
|
});
|
2017-03-16 11:46:09 +00:00
|
|
|
this.route('keycloak', {
|
|
|
|
path: 'keycloak'
|
|
|
|
});
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('login', {
|
|
|
|
path: 'login'
|
|
|
|
});
|
|
|
|
this.route('forgot', {
|
|
|
|
path: 'forgot'
|
|
|
|
});
|
|
|
|
this.route('reset', {
|
|
|
|
path: 'reset/:token'
|
|
|
|
});
|
|
|
|
this.route('logout', {
|
|
|
|
path: 'logout'
|
|
|
|
});
|
|
|
|
this.route('share', {
|
|
|
|
path: 'share/:id/:slug/:serial'
|
|
|
|
});
|
|
|
|
});
|
2016-07-07 18:54:16 -07:00
|
|
|
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('profile', {
|
|
|
|
path: 'profile'
|
|
|
|
});
|
|
|
|
this.route('search', {
|
|
|
|
path: 'search'
|
|
|
|
});
|
|
|
|
this.route('accounts', {
|
|
|
|
path: 'accounts'
|
|
|
|
});
|
2016-07-07 18:54:16 -07:00
|
|
|
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('widgets', {
|
|
|
|
path: 'widgets'
|
|
|
|
});
|
2016-07-07 18:54:16 -07:00
|
|
|
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('not-found', {
|
|
|
|
path: '/*wildcard'
|
|
|
|
});
|
2016-07-07 18:54:16 -07:00
|
|
|
|
2016-11-05 14:53:44 -07:00
|
|
|
// this.route('pods', function () {});
|
2016-07-07 18:54:16 -07:00
|
|
|
});
|