169 lines
4.6 KiB
JavaScript
169 lines
4.6 KiB
JavaScript
require('/imports/startup/both/accounts.js'); //Ensure that the user accounts templates are setup first. We have included the AccountTemplates routing in this document to keep all routing in one place.
|
|
|
|
//**** GROUPS
|
|
let pub = FlowRouter.group({
|
|
});
|
|
let pri = FlowRouter.group({
|
|
//TODO: Require SSL
|
|
triggersEnter: [AccountsTemplates.ensureSignedIn]
|
|
});
|
|
|
|
//**** ADMIN
|
|
pri.route("/admin", {
|
|
triggersEnter: [function(context, redirect) {redirect("/Admin/InternshipJobs");}]
|
|
});
|
|
pri.route("/Admin", {
|
|
triggersEnter: [function(context, redirect) {redirect("/Admin/InternshipJobs");}]
|
|
});
|
|
AccountsTemplates.configureRoute('signIn', {
|
|
name: 'SignIn',
|
|
path: '/Login'
|
|
});
|
|
AccountsTemplates.configureRoute('resetPwd', {
|
|
name: 'ResetPwd',
|
|
path: '/ResetPwd'
|
|
});
|
|
AccountsTemplates.configureRoute('forgotPwd', {
|
|
name: 'ForgotPwd',
|
|
path: '/ForgotPwd'
|
|
});
|
|
|
|
pri.route("/Admin/Internships", {
|
|
name: "InternshipsEditor",
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Admin/InternshipsEditor.js");
|
|
BlazeLayout.render("Admin", {content: "InternshipsEditor"})
|
|
}
|
|
});
|
|
pri.route("/Admin/Board", {
|
|
name: "BoardEditor",
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Admin/BoardEditor.js");
|
|
BlazeLayout.render("Admin", {content: "BoardEditor"})
|
|
}
|
|
});
|
|
pri.route("/Admin/Dates", {
|
|
name: "DatesEditor",
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Admin/DatesEditor.js");
|
|
BlazeLayout.render("Admin", {content: "DatesEditor"})
|
|
}
|
|
});
|
|
pri.route("/Admin/UserManagement", {
|
|
name: "UserManagement",
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Admin/UserManagement.js");
|
|
BlazeLayout.render("Admin", {content: "UserManagement"})
|
|
}
|
|
});
|
|
pri.route("/Admin/Appreciation", {
|
|
name: "AppreciationEditor",
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Admin/AppreciationEditor.js");
|
|
BlazeLayout.render("Admin", {content: "AppreciationEditor"})
|
|
}
|
|
});
|
|
|
|
//*** PUBLIC
|
|
pub.route('/', {
|
|
triggersEnter: [function(context, redirect) {redirect("/Home");}]
|
|
});
|
|
pub.route("/Home", {
|
|
name: 'Home',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Home.js");
|
|
BlazeLayout.render("Public", {content: "Home"});
|
|
}
|
|
});
|
|
pub.route("/ImportantDates", {
|
|
name: 'ImportantDates',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/ImportantDates.js");
|
|
BlazeLayout.render("Public", {content: "ImportantDates"});
|
|
}
|
|
});
|
|
pub.route("/Support", {
|
|
name: 'Support',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Support.js");
|
|
BlazeLayout.render("Public", {content: "Support"});
|
|
}
|
|
});
|
|
pub.route("/Programs", {
|
|
name: 'Programs',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Programs.js");
|
|
BlazeLayout.render("Public", {content: "Programs"});
|
|
}
|
|
});
|
|
pub.route("/Contact", {
|
|
name: 'Contact',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Contact.js");
|
|
BlazeLayout.render("Public", {content: "Contact"});
|
|
}
|
|
});
|
|
pub.route("/About", {
|
|
name: 'About',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/About.js");
|
|
BlazeLayout.render("Public", {content: "About"});
|
|
}
|
|
});
|
|
pub.route("/Grants", {
|
|
name: 'Grants',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Grants.js");
|
|
BlazeLayout.render("Public", {content: "Grants"});
|
|
}
|
|
});
|
|
pub.route("/Internships", {
|
|
name: 'Internships',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Internships.js");
|
|
BlazeLayout.render("Public", {content: "Internships"});
|
|
}
|
|
});
|
|
pub.route("/Scholarships", {
|
|
name: 'Scholarships',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Scholarships.js");
|
|
BlazeLayout.render("Public", {content: "Scholarships"});
|
|
}
|
|
});
|
|
pub.route("/Fellowships", {
|
|
name: 'Fellowships',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Fellowships.js");
|
|
BlazeLayout.render("Public", {content: "Fellowships"});
|
|
}
|
|
});
|
|
pub.route("/News&Notices", {
|
|
name: 'News&Notices',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/News&Notices.js");
|
|
BlazeLayout.render("Public", {content: "News&Notices"});
|
|
}
|
|
});
|
|
pub.route("/PhotoGallery", {
|
|
name: 'PhotoGallery',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/PhotoGallery.js");
|
|
BlazeLayout.render("Public", {content: "PhotoGallery"});
|
|
}
|
|
});
|
|
pub.route("/Appreciation", {
|
|
name: 'Appreciation',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Appreciation.js");
|
|
BlazeLayout.render("Public", {content: "Appreciation"});
|
|
}
|
|
});
|
|
pub.route("/HowCanYouHelp", {
|
|
name: 'HowCanYouHelp',
|
|
action: function(params, queryParams) {
|
|
require("/imports/ui/Support.js");
|
|
BlazeLayout.render("Public", {content: "Support"});
|
|
}
|
|
});
|