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
|
|
|
|
|
|
|
|
import config from './config/environment';
|
2019-01-24 15:28:14 +00:00
|
|
|
import EmberRouter from '@ember/routing/router';
|
2016-07-07 18:54:16 -07:00
|
|
|
|
2017-11-16 13:28:05 +00:00
|
|
|
var Router = EmberRouter.extend({
|
2019-01-24 15:28:14 +00:00
|
|
|
location: config.locationType,
|
|
|
|
rootURL: config.rootURL
|
2016-07-07 18:54:16 -07:00
|
|
|
});
|
|
|
|
|
2018-03-15 17:11:53 +00: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
|
|
|
|
2019-01-04 16:33:30 +00:00
|
|
|
this.route('action', {
|
|
|
|
path: 'action'
|
2018-01-22 10:31:03 +00:00
|
|
|
});
|
|
|
|
|
2018-04-04 14:37:25 +01:00
|
|
|
this.route('analytics', {
|
|
|
|
path: 'analytics'
|
|
|
|
});
|
|
|
|
|
2018-12-26 18:13:00 +00:00
|
|
|
this.route('activity', {
|
|
|
|
path: 'activity'
|
|
|
|
});
|
|
|
|
|
2018-03-09 09:51:44 +00:00
|
|
|
this.route(
|
|
|
|
'folder',
|
|
|
|
{
|
|
|
|
path: 's/:folder_id/:folder_slug'
|
|
|
|
},
|
2018-03-15 17:11:53 +00:00
|
|
|
function () {
|
2018-06-05 14:04:14 +01:00
|
|
|
this.route('settings', {
|
|
|
|
path: 'settings'
|
|
|
|
});
|
|
|
|
this.route('block', {
|
|
|
|
path: 'block/:block_id'
|
|
|
|
});
|
2018-03-09 09:51:44 +00:00
|
|
|
}
|
|
|
|
);
|
2016-11-06 20:11:21 -08:00
|
|
|
|
2018-03-09 09:51:44 +00:00
|
|
|
this.route(
|
|
|
|
'document',
|
|
|
|
{
|
|
|
|
path: 's/:folder_id/:folder_slug/d/:document_id/:document_slug'
|
|
|
|
},
|
2018-03-15 17:11:53 +00:00
|
|
|
function () {
|
2018-03-09 09:51:44 +00:00
|
|
|
this.route('section', {
|
|
|
|
path: 'section/:page_id'
|
|
|
|
});
|
2018-06-15 14:25:05 +01:00
|
|
|
this.route('settings', {
|
|
|
|
path: 'settings'
|
|
|
|
});
|
2018-12-20 13:05:22 +00:00
|
|
|
this.route('revisions', {
|
|
|
|
path: 'revisions'
|
|
|
|
});
|
2018-12-26 18:13:00 +00:00
|
|
|
this.route('activity', {
|
|
|
|
path: 'activity'
|
|
|
|
});
|
2018-03-09 09:51:44 +00:00
|
|
|
}
|
|
|
|
);
|
2016-07-07 18:54:16 -07:00
|
|
|
|
2018-03-09 09:51:44 +00:00
|
|
|
this.route(
|
|
|
|
'customize',
|
|
|
|
{
|
|
|
|
path: 'settings'
|
|
|
|
},
|
2018-03-15 17:11:53 +00:00
|
|
|
function () {
|
2018-03-09 09:51:44 +00:00
|
|
|
this.route('general', {
|
|
|
|
path: 'general'
|
|
|
|
});
|
2019-01-04 16:33:30 +00:00
|
|
|
this.route('labels', {
|
|
|
|
path: 'labels'
|
|
|
|
});
|
2018-03-09 09:51:44 +00:00
|
|
|
this.route('groups', {
|
|
|
|
path: 'groups'
|
|
|
|
});
|
|
|
|
this.route('users', {
|
|
|
|
path: 'users'
|
|
|
|
});
|
|
|
|
this.route('folders', {
|
|
|
|
path: 'folders'
|
|
|
|
});
|
|
|
|
this.route('smtp', {
|
|
|
|
path: 'smtp'
|
|
|
|
});
|
2018-11-07 15:56:05 +00:00
|
|
|
this.route('product', {
|
|
|
|
path: 'product'
|
2018-03-09 09:51:44 +00:00
|
|
|
});
|
|
|
|
this.route('auth', {
|
|
|
|
path: 'auth'
|
|
|
|
});
|
|
|
|
this.route('audit', {
|
|
|
|
path: 'audit'
|
|
|
|
});
|
2018-03-29 12:23:09 +01:00
|
|
|
this.route('search', {
|
|
|
|
path: 'search'
|
|
|
|
});
|
2018-08-06 19:39:31 +01:00
|
|
|
this.route('integrations', {
|
|
|
|
path: 'integrations'
|
|
|
|
});
|
2018-10-04 21:04:31 +01:00
|
|
|
this.route('backup', {
|
|
|
|
path: 'backup'
|
|
|
|
});
|
2018-11-07 15:56:05 +00:00
|
|
|
this.route('billing', {
|
|
|
|
path: 'billing'
|
|
|
|
});
|
2018-03-09 09:51:44 +00: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'
|
|
|
|
});
|
|
|
|
|
2018-03-09 09:51:44 +00:00
|
|
|
this.route(
|
|
|
|
'auth',
|
|
|
|
{
|
|
|
|
path: 'auth'
|
|
|
|
},
|
2018-03-15 17:11:53 +00:00
|
|
|
function () {
|
2018-03-09 09:51:44 +00:00
|
|
|
this.route('sso', {
|
|
|
|
path: 'sso/:token'
|
|
|
|
});
|
|
|
|
this.route('keycloak', {
|
|
|
|
path: 'keycloak'
|
|
|
|
});
|
|
|
|
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'
|
|
|
|
});
|
2017-11-27 19:07:36 +00:00
|
|
|
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('search', {
|
|
|
|
path: 'search'
|
|
|
|
});
|
2017-11-27 19:07:36 +00:00
|
|
|
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('accounts', {
|
|
|
|
path: 'accounts'
|
|
|
|
});
|
2016-07-07 18:54:16 -07:00
|
|
|
|
2018-05-18 20:11:24 +01:00
|
|
|
this.route('theming', {
|
|
|
|
path: 'theming'
|
|
|
|
});
|
|
|
|
|
2018-12-17 10:19:16 +00:00
|
|
|
this.route('updates', {
|
|
|
|
path: 'updates'
|
|
|
|
});
|
|
|
|
|
2016-11-05 14:53:44 -07:00
|
|
|
this.route('not-found', {
|
|
|
|
path: '/*wildcard'
|
|
|
|
});
|
2016-07-07 18:54:16 -07:00
|
|
|
});
|