-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrouter.js
101 lines (87 loc) · 2.19 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
91
92
93
94
95
96
97
98
99
100
101
// ROUTER SYSTEM
FlowRouter.route('/',{
name: 'home',
action: function() {
BlazeLayout.render('layout1',{ main: "homePage" });
}
});
// MEMBERS GROUP PAGES
FlowRouter.route('/members',{
name: 'members',
action: function() {
BlazeLayout.render('layout1',{ main: "membersPage" });
}
});
FlowRouter.route('/profile/:id', {
name: 'profile',
action: function() {
BlazeLayout.render('layout1',{ main: "profilePage"});
}
});
FlowRouter.route('/profile/:id/edit', {
name: 'editProfilePage',
action: function() {
BlazeLayout.render('layout1',{ main: "editProfilePage"});
}
});
// PROJECT GROUP PAGES
FlowRouter.route('/projects',{
name: 'projects',
action: function() {
BlazeLayout.render('layout1',{ main: "projectsPage"});
}
});
FlowRouter.route('/project/:id',{
name: 'project',
action: function() {
BlazeLayout.render('layout1',{ main: "projectPage"});
}
});
FlowRouter.route('/create/project', {
name: 'create/project',
loadingTemplate: 'loading',
action: function() {
BlazeLayout.render('layout1',{ main: "createProjectPage"});
}
});
FlowRouter.route('/project/:id/edit', {
name: 'edit/project',
loadingTemplate: 'loading',
action: function() {
BlazeLayout.render('layout1',{ main: "editProjectPage"});
}
});
FlowRouter.route('/create/news/:projectId', {
name: 'createNews',
loadingTemplate: 'loading',
action: function() {
BlazeLayout.render('layout1',{ main: "createNewsPage"});
}
});
FlowRouter.route('/news/:id/edit', {
name: 'editNews',
loadingTemplate: 'loading',
action: function() {
BlazeLayout.render('layout1',{ main: "editNewsPage"});
}
});
// OTHER
FlowRouter.route('/login',{
name: 'login',
action: function() {
BlazeLayout.render('layout1',{ main: "loginPage" });
}
});
FlowRouter.route('/logout',{
name: 'logout',
action: function() {
BlazeLayout.render('layout1',{ main: "logoutPage" });
}
});
FlowRouter.route('/sign-in',{
name: 'signin',
action: function() {
BlazeLayout.render('layout1',{ main: "loginPage" });
}
});
//FS.debug = true;