Skip to content

Instantly share code, notes, and snippets.

@armetiz
Created April 10, 2013 14:54
Show Gist options
  • Save armetiz/5355333 to your computer and use it in GitHub Desktop.
Save armetiz/5355333 to your computer and use it in GitHub Desktop.
Template.boxes.helpers({
ifHourEnabled: function(conditional, options) {
if(0 !== (conditional & maskHours[this])) {
return options.fn(this);
} else {
return options.inverse(this);
}
}
});
@armetiz
Copy link
Author

armetiz commented Apr 10, 2013

Use like that
{{ifHourEnabled this}}display true{{else}}display false{{/ifHourEnabled}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment