44 * support-admin-app
55 */
66angular . module ( 'supportAdminApp' , [
7- 'ngAnimate' ,
8- 'ngCookies' ,
9- 'ngTouch' ,
10- 'ngSanitize' ,
11- 'ngResource' ,
12- 'csvReader' ,
13- 'ui.router' ,
14- 'ui.bootstrap' ,
15- 'app.constants' ,
16- 'angular-clipboard' ,
17- 'ng-file-model' ,
18- 'btorfs.multiselect' ,
19- 'ui.bootstrap.datetimepicker' ,
20- 'angularMoment' ,
21- 'angular-jwt' ,
22- 'ui.tinymce' ] )
7+ 'ngAnimate' ,
8+ 'ngCookies' ,
9+ 'ngTouch' ,
10+ 'ngSanitize' ,
11+ 'ngResource' ,
12+ 'csvReader' ,
13+ 'ui.router' ,
14+ 'ui.bootstrap' ,
15+ 'app.constants' ,
16+ 'angular-clipboard' ,
17+ 'ng-file-model' ,
18+ 'btorfs.multiselect' ,
19+ 'ui.bootstrap.datetimepicker' ,
20+ 'angularMoment' ,
21+ 'angular-jwt' ,
22+ 'ui.tinymce' ] )
2323 // In the run phase of your Angular application
2424 . run ( function ( AuthService ) {
2525 // init AuthService, it has to be done once, when app starts
2626 AuthService . init ( ) ;
2727 } )
2828 . config ( function ( $stateProvider , $urlRouterProvider , $locationProvider , $compileProvider ) {
29- var authenticate = [ 'AuthService' , '$q' , '$state' , function ( AuthService , $q , $state ) {
30- return AuthService . authenticate ( ) . catch ( function ( err ) {
29+ var authenticate = [ 'AuthService' , '$q' , '$state' , function ( AuthService , $q , $state ) {
30+ return AuthService . authenticate ( ) . catch ( function ( err ) {
3131 // if we get error that use doesn't have permissions
3232 // then go to auth page, which will show permissions denied error
3333 if ( err === AuthService . ERROR . NO_PERMISSIONS ) {
@@ -43,9 +43,9 @@ angular.module('supportAdminApp', [
4343 templateUrl : 'app/auth/auth.html' ,
4444 data : { pageTitle : 'Authentication' } ,
4545 resolve : {
46- auth : [ 'AuthService' , '$q' , function ( AuthService , $q ) {
46+ auth : [ 'AuthService' , '$q' , function ( AuthService , $q ) {
4747 // for auth state we use another resolver then all other states
48- return AuthService . authenticate ( ) . catch ( function ( err ) {
48+ return AuthService . authenticate ( ) . catch ( function ( err ) {
4949 // if we get error that use doesn't have permissions
5050 // we still resolve the promise and proceed to auth page
5151 // which will show permissions denied error
@@ -141,10 +141,10 @@ angular.module('supportAdminApp', [
141141 value : 'develop' ,
142142 name : 'Develop'
143143 } ,
144- {
145- value : 'design' ,
146- name : 'Design'
147- } ] ;
144+ {
145+ value : 'design' ,
146+ name : 'Design'
147+ } ] ;
148148
149149 $scope . tagStatuses = [ {
150150 value : 'approved' ,
@@ -154,14 +154,14 @@ angular.module('supportAdminApp', [
154154 name : 'Pending'
155155 } ] ;
156156
157- TagService . getTechnologyStatuses ( ) . then ( function ( techStatuses ) {
158- _ . forEach ( techStatuses , function ( status ) {
157+ TagService . getTechnologyStatuses ( ) . then ( function ( techStatuses ) {
158+ _ . forEach ( techStatuses , function ( status ) {
159159 status . value = _ . lowerCase ( status . description ) ;
160160 status . name = status . description ;
161161 } ) ;
162162 $scope . techStatuses = techStatuses ;
163163 } ) ;
164- $scope . getTagStatuses = function ( domainType ) {
164+ $scope . getTagStatuses = function ( domainType ) {
165165 if ( domainType === 'technology' ) {
166166 return $scope . techStatuses ;
167167 } else {
@@ -415,7 +415,25 @@ angular.module('supportAdminApp', [
415415 . state ( 'index.challenges' , {
416416 url : 'challenges' ,
417417 templateUrl : 'app/challenges/challenges.html' ,
418- data : { pageTitle : 'Challenge Management' } ,
418+ data : { pageTitle : 'Challenge Management' } ,
419+ resolve : { auth : authenticate }
420+ } )
421+ . state ( 'index.v5challenges' , {
422+ url : '/v5-challenges' ,
423+ templateUrl : 'app/v5_challenges/challenges.list.html' ,
424+ data : { pageTitle : 'Challenge Management' } ,
425+ resolve : { auth : authenticate }
426+ } )
427+ . state ( 'index.v5ChallengeDetail' , {
428+ url : '/v5-challenge-details/:id' ,
429+ templateUrl : 'app/v5_challenges/challenge.detail.html' ,
430+ data : { pageTitle : 'Challenge Detail' } ,
431+ resolve : { auth : authenticate }
432+ } )
433+ . state ( 'index.v5ChallengeManageUser' , {
434+ url : '/v5-challenge-manage-users/:id' ,
435+ templateUrl : 'app/v5_challenges/challenge.manage.user.html' ,
436+ data : { pageTitle : 'Manage Users' } ,
419437 resolve : { auth : authenticate }
420438 } )
421439 . state ( 'index.ideas' , {
@@ -464,7 +482,7 @@ angular.module('supportAdminApp', [
464482 templateUrl : 'app/terms/terms.users.list.html' ,
465483 controller : 'terms.ListTermsUsersController' ,
466484 data : { pageTitle : 'Term Users' } ,
467- params :{
485+ params : {
468486 title : null
469487 } ,
470488 resolve : { auth : authenticate }
0 commit comments