TestSuiteDetails = RouteController.extend({
template: 'baseTestsuiteLayout',
//yieldRegions: {
// 'testsuiteDetails': {to: 'tabContent'}
//},
waitOn: function(){
return Meteor.subscribe('ftests', parseInt(this.params.id))
},
onBeforeAction: function(){
Session.set('activeTestSuiteId', parseInt(this.params.id));
this.next();
},
action: function(){
if (this.ready()){
var ts = TestSuites.findOne({id: Session.get('activeTestSuiteId')});
if (ts == undefined){
this.render('error404',
{
data: {text: 'This test suite is not alive anymore :('}
}
);
return
}
TabsManager.setMainTab(ts.name,
Router.path('testsuiteDetails', {id: ts.id})
);
TabsManager.setActiveTab();
this.render('testsuiteDetails',
{
to: 'tabContent'
});
}
}
});