ui and settings ready

This commit is contained in:
Senad Uka
2016-10-15 15:58:41 +02:00
parent a85be6c2b6
commit 31b355f381
15 changed files with 269 additions and 16 deletions

View File

@@ -6,3 +6,27 @@ Template.body.helpers({
return Session.get("templateName");
}
});
controller_state = function() {
var controller = Session.get('controller_id');
var result = {}
if (controller) {
result = ControllerState.findOne({
controller_id: controller
});
}
if (!result) {
result = {}
};
return result;
};
accessible = function(feature) {
var controller = controller_state();
console.log('cotnroller ', controller);
if (!controller.features) return false;
return controller.features[feature] === true;
}