Created
October 16, 2015 23:34
-
-
Save michaltakac/ccfa343536da5cb111ec to your computer and use it in GitHub Desktop.
Braintree demo - dashboard.js (v2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template.dashboard.onCreated(function() { | |
var instance = this; | |
instance.autorun(function() { | |
instance.subscribe('items'); | |
}); | |
}); | |
Template.dashboard.helpers({ | |
items: function(){ | |
return Items.find(); | |
}, | |
showForm: function() { | |
var userId = Meteor.userId(); | |
return Roles.userIsInRole(userId, 'paid') ? false : true; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment