var subscriptions = new SubsManager();

Router.configure({
	loadingTemplate: 'loading',
	notFoundTemplate: 'notFound'
});

Router.route('/', {
	layoutTemplate: 'layout',
	name: 'home',
	waitOn() {
		return subscriptions.subscribe('allVolunteers');
	},
	fastRender: true
});

Router.route('/myProfile', {
	layoutTemplate: 'layout',
	name: 'myProfile',
	waitOn() {
		return [
			subscriptions.subscribe('allQuestionsGroups'),
			subscriptions.subscribe('allUniversesLinkableToWorkshop'),
			subscriptions.subscribe('allWorkshopsLinkableToUniverse'),
			subscriptions.subscribe('userQuestionsNotAnswered', Meteor.userId()),
			subscriptions.subscribe('resultForQuestionsAnswered', Meteor.userId())
		];
	}
});

Router.route('/answerQuestions', {
	layoutTemplate: 'layout',
	name: 'answerQuestions',
	waitOn() {
		return subscriptions.subscribe('tenQuestionAtATime', Meteor.userId());
	}
});

Router.route('/myDay', {
	layoutTemplate: 'layout',
	name: 'myDay'
});

Router.route('/meeting', {
	layoutTemplate: 'layout',
	name: 'meeting'
});

Router.route('/admin', {
	layoutTemplate: 'adminLayout',
	name: 'admin',
	waitOn() {
		return [
			subscriptions.subscribe('allUniverses'),
			subscriptions.subscribe('allWorkshops'),
			subscriptions.subscribe('allQuestionsGroups'),
			subscriptions.subscribe('allEkloreQuestions')
		];
	},
	fastRender: true
});

Router.route('/admin/universes/new', {
	layoutTemplate: 'adminLayout',
	name: 'newUniverse'
});

Router.route('/admin/universes/:_id/edit', {
	layoutTemplate: 'adminLayout',
	name: 'editUniverse',
	waitOn() {
		return [subscriptions.subscribe('anUniverse', this.params._id), subscriptions.subscribe('allWorkshopsLinkableToUniverse')];
	},
	data() {
		return Universes.findOne(this.params._id);
	},
	fastRender: true
});

Router.route('/admin/workshops/new', {
	layoutTemplate: 'adminLayout',
	name: 'newWorkshop'
});

Router.route('/admin/workshops/:_id/edit', {
	layoutTemplate: 'adminLayout',
	name: 'editWorkshop',
	waitOn() {
		return [subscriptions.subscribe('aWorkshop', this.params._id), subscriptions.subscribe('allUniversesLinkableToWorkshop')];
	},
	data() {
		return Workshops.findOne(this.params._id);
	},
	fastRender: true
});

Router.route('/admin/questionsGroups/new', {
	layoutTemplate: 'adminLayout',
	name: 'newQuestionsGroup'
});

Router.route('/admin/questionsGroups/:_id/edit', {
	layoutTemplate: 'adminLayout',
	name: 'editQuestionsGroup',
	waitOn() {
		return [
			subscriptions.subscribe('aQuestionsGroup', this.params._id),
			subscriptions.subscribe('ekloreQuestionsLinkedToQuestionsGroup', this.params._id)
		];
	},
	data() {
		return QuestionsGroups.findOne(this.params._id);
	},
	fastRender: true
});

Router.route('/admin/ekloreQuestions/new', {
	layoutTemplate: 'adminLayout',
	name: 'newEkloreQuestion'
});

Router.route('/admin/ekloreQuestions/:_id/edit', {
	layoutTemplate: 'adminLayout',
	name: 'editEkloreQuestion',
	waitOn() {
		return [
			subscriptions.subscribe('anEkloreQuestion', this.params._id),
			subscriptions.subscribe('allQuestionsGroups'),
			subscriptions.subscribe('allUniverses'),
			subscriptions.subscribe('allWorkshops')
		];
	},
	data() {
		return EkloreQuestions.findOne(this.params._id);
	},
	fastRender: true
});

@@ -948,16 +948,91 @@
  'myDay'
+,%0A%09waitOn() %7B%0A%09%09return subscriptions.subscribe('allWorkshopsForTheDay');%0A%09%7D
 %0A%7D);%0A%0ARo

Add subscriptions