2017-03-26 00:52:31 +08:00
|
|
|
(function () {
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
angular
|
|
|
|
|
.module('forums.routes')
|
|
|
|
|
.config(routeConfig);
|
|
|
|
|
|
|
|
|
|
routeConfig.$inject = ['$stateProvider'];
|
|
|
|
|
|
|
|
|
|
function routeConfig($stateProvider) {
|
|
|
|
|
$stateProvider
|
|
|
|
|
.state('forums', {
|
2017-07-06 15:39:51 +08:00
|
|
|
abstract: true,
|
2017-03-26 00:52:31 +08:00
|
|
|
url: '/forums',
|
2017-10-11 15:21:42 +08:00
|
|
|
template: '<ui-view/>',
|
|
|
|
|
data: {
|
|
|
|
|
roles: ['user', 'oper', 'admin']
|
|
|
|
|
}
|
2017-07-06 15:39:51 +08:00
|
|
|
})
|
|
|
|
|
.state('forums.list', {
|
|
|
|
|
url: '',
|
2017-05-04 17:49:33 +08:00
|
|
|
templateUrl: '/modules/forums/client/views/index.client.view.html',
|
2017-03-26 00:52:31 +08:00
|
|
|
data: {
|
2017-05-04 17:49:33 +08:00
|
|
|
pageTitle: 'PAGETITLE.FORUM'
|
2017-03-26 00:52:31 +08:00
|
|
|
}
|
2017-07-06 15:39:51 +08:00
|
|
|
})
|
2017-07-19 15:57:00 +08:00
|
|
|
.state('forums.search', {
|
|
|
|
|
url: '/search?forumId&keys',
|
|
|
|
|
templateUrl: '/modules/forums/client/views/search-result.client.view.html',
|
|
|
|
|
data: {
|
|
|
|
|
pageTitle: 'PAGETITLE.FORUM'
|
|
|
|
|
}
|
|
|
|
|
})
|
2017-07-06 18:04:47 +08:00
|
|
|
.state('forums.post', {
|
|
|
|
|
url: '/:forumId/post',
|
|
|
|
|
templateUrl: '/modules/forums/client/views/post.client.view.html',
|
|
|
|
|
data: {
|
|
|
|
|
pageTitle: 'PAGETITLE.FORUM'
|
|
|
|
|
}
|
|
|
|
|
})
|
2017-07-06 15:39:51 +08:00
|
|
|
.state('forums.view', {
|
|
|
|
|
url: '/:forumId',
|
|
|
|
|
templateUrl: '/modules/forums/client/views/view.client.view.html',
|
|
|
|
|
data: {
|
|
|
|
|
pageTitle: 'PAGETITLE.FORUM'
|
|
|
|
|
}
|
2017-07-08 01:40:50 +08:00
|
|
|
})
|
|
|
|
|
.state('forums.topic', {
|
|
|
|
|
url: '/:forumId/:topicId',
|
|
|
|
|
templateUrl: '/modules/forums/client/views/topic.client.view.html',
|
|
|
|
|
data: {
|
|
|
|
|
pageTitle: 'PAGETITLE.FORUM'
|
|
|
|
|
}
|
2017-03-26 00:52:31 +08:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}());
|