-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.js
49 lines (40 loc) · 1.21 KB
/
routes.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
/*
* @Author: philipp
* @Date: 2016-11-03 11:27:12
* @Last Modified by: philipp
* @Last Modified time: 2016-11-03 15:45:02
*/
'use strict';
import {FlowRouter} from 'meteor/kadira:flow-router';
import {BlazeLayout} from 'meteor/kadira:blaze-layout';
import './admin/blog.js';
import './client/blog.js';
import './client/blog-entry.js';
import './layout.js';
// client
FlowRouter.route(['/blog'], {
action: function(params, queryParams) {
BlazeLayout.render('Attic_Studio_Blog_Body', {main: 'blogView'});
}
});
FlowRouter.route(['/blog/:_blogId'], {
action: function(params, queryParams) {
BlazeLayout.render('Attic_Studio_Blog_Body', {main: 'blogEntryView'});
}
});
// admin
FlowRouter.route(['/admin/blog'], {
action: function(params, queryParams) {
BlazeLayout.render('Attic_Studio_Blog_Body', {main: 'blog'});
}
});
FlowRouter.route(['/admin/blog/new'], {
action: function(params, queryParams) {
BlazeLayout.render('Attic_Studio_Blog_Body', {main: 'editBlogEntry'});
}
});
FlowRouter.route(['/admin/blog/edit/:_blogId'], {
action: function(params, queryParams) {
BlazeLayout.render('Attic_Studio_Blog_Body', {main: 'editBlogEntry'});
}
});