-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouter.js
executable file
·90 lines (83 loc) · 1.78 KB
/
router.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Protect all Routes,except some specific url
// support by https://github.com/meteor-useraccounts/iron-routing
// Router.configure({
// layoutTemplate: 'publicLayout',
// loadingTemplate: 'loading',
// notFoundTemplate: 'dataNotFound',
// });
// Router.plugin('ensureSignedIn', {
// except: ['home', 'atSignIn', 'atSignUp', 'atForgotPassword']
// });
// end of account iron-route config //
Router.route('login', function() {
this.render('login');
}, {
name: 'login'
});
Router.route('index', function() {
this.render('index');
}, {
name: 'index'
});
Router.route('pic', function() {
this.render('pic');
}, {
name: 'pic'
});
Router.route('mainheader', function() {
this.render('mainheader');
}, {
name: 'mainheader'
});
Router.route('siderbar', function() {
this.render('siderbar');
}, {
name: 'siderbar'
});
Router.route('content', function() {
this.render('content');
this.layout('publicLayout');
}, {
name: 'content'
});
Router.route('footer', function() {
this.render('footer');
}, {
name: 'footer'
});
Router.route('control-sidebar', function() {
this.render('control-sidebar');
}, {
name: 'control-sidebar'
});
Router.route('chart', function() {
this.render('chart');
this.layout('publicLayout');
}, {
name: 'chart'
});
Router.route('table', function() {
this.render('table');
this.layout('publicLayout');
}, {
name: 'table'
});
Router.route('calendar', function() {
this.render('calendar');
this.layout('publicLayout');
}, {
name: 'calendar'
});
// Router.route('result', function() {
// this.render('result');
// }, {
// name: 'result',
// onBeforeAction: function(){
// var currentUser = Meteor.userId();
// if(currentUser){
// this.next();
// } else {
// this.render("login");
// }
// }
// });