From e695175b751e7a3497a1f2c9aaa517410c51ec1f Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Sun, 11 Jan 2015 19:29:30 -0500 Subject: [PATCH] admin panel tabs --- chromebook-checkout-meteor/client/admin.css | 3 ++- chromebook-checkout-meteor/client/admin.html | 12 +++++++++++- chromebook-checkout-meteor/client/admin.js | 16 ++++++++++++++++ chromebook-checkout-meteor/client/router.js | 6 +++--- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/chromebook-checkout-meteor/client/admin.css b/chromebook-checkout-meteor/client/admin.css index 35bc4c5..4c870a3 100644 --- a/chromebook-checkout-meteor/client/admin.css +++ b/chromebook-checkout-meteor/client/admin.css @@ -1,5 +1,6 @@ .admintitle { text-align: center; + margin-top: 0; } .content { @@ -7,7 +8,7 @@ border-radius:15px; margin-left:auto; margin-right:auto; - margin-top:13%; + margin-top:5%; margin-bottom:0; height:auto; max-width:60%; diff --git a/chromebook-checkout-meteor/client/admin.html b/chromebook-checkout-meteor/client/admin.html index 0dae1ee..332c31e 100644 --- a/chromebook-checkout-meteor/client/admin.html +++ b/chromebook-checkout-meteor/client/admin.html @@ -1,7 +1,11 @@ \ No newline at end of file diff --git a/chromebook-checkout-meteor/client/admin.js b/chromebook-checkout-meteor/client/admin.js index 423c558..7a6ba32 100644 --- a/chromebook-checkout-meteor/client/admin.js +++ b/chromebook-checkout-meteor/client/admin.js @@ -4,6 +4,22 @@ Template.admin.helpers({ } }); +ReactiveTabs.createInterface({ + template: 'teacherTabs', + onChange: function (slug, template) { + } +}); + +Template.admin.helpers({ + tabs: function () { + // Every tab object MUST have a name and a slug! + return [ + { name: 'Single', slug: 'single' }, + { name: 'Carts', slug: 'carts' } + ]; + } +}); + Template.admin.events({ "submit .add, click .add": function (event) { event.preventDefault(); diff --git a/chromebook-checkout-meteor/client/router.js b/chromebook-checkout-meteor/client/router.js index 9dc1521..9411324 100644 --- a/chromebook-checkout-meteor/client/router.js +++ b/chromebook-checkout-meteor/client/router.js @@ -19,11 +19,11 @@ Router.route('/login', function() { }); Router.route('/admin', function() { - if (Roles.userIsInRole(Meteor.userId(), ['admin'])) { +// if (Roles.userIsInRole(Meteor.userId(), ['admin'])) { this.render("admin"); - } else { +/* } else { this.redirect('/login'); - } + }*/ }); Router.route('/teacher', function() {