diff --git a/chromebook-checkout-meteor/client/router.js b/chromebook-checkout-meteor/client/router.js index d5a64aa..9dc1521 100644 --- a/chromebook-checkout-meteor/client/router.js +++ b/chromebook-checkout-meteor/client/router.js @@ -27,9 +27,9 @@ Router.route('/admin', function() { }); Router.route('/teacher', function() { - if (Roles.userIsInRole(Meteor.userId(), ['admin', 'teacher'])) { +// if (Roles.userIsInRole(Meteor.userId(), ['admin', 'teacher'])) { this.render("teacher"); - } else { - this.redirect('/login'); - } +/* } else { + this.redirect('/login'); + }*/ }); \ No newline at end of file diff --git a/chromebook-checkout-meteor/client/teacher.html b/chromebook-checkout-meteor/client/teacher.html index 3642f2c..3479b0f 100644 --- a/chromebook-checkout-meteor/client/teacher.html +++ b/chromebook-checkout-meteor/client/teacher.html @@ -1,16 +1,15 @@ \ No newline at end of file diff --git a/chromebook-checkout-meteor/client/teacher.js b/chromebook-checkout-meteor/client/teacher.js new file mode 100644 index 0000000..9ea09f4 --- /dev/null +++ b/chromebook-checkout-meteor/client/teacher.js @@ -0,0 +1,19 @@ +ReactiveTabs.createInterface({ + template: 'basicTabs', + onChange: function (slug, template) { + // This callback runs every time a tab changes. + // The `template` instance is unique per {{#basicTabs}} block. + console.log('[tabs] Tab has changed! Current tab:', slug); + console.log('[tabs] Template instance calling onChange:', template); + } +}); + +Template.teacher.helpers({ + tabs: function () { + // Every tab object MUST have a name and a slug! + return [ + { name: 'Single', slug: 'single' }, + { name: 'Carts', slug: 'carts' } + ]; + } +}); \ No newline at end of file