admin panel tabs
This commit is contained in:
parent
0d91daa858
commit
e695175b75
@ -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%;
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
<template name="admin">
|
||||
<div id="center">
|
||||
<h5 class="admintitle">Admin Panel</h5>
|
||||
<div class="content">
|
||||
<h5 class="admintitle">Admin Panel</h5>
|
||||
|
||||
{{#teacherTabs tabs=tabs}}
|
||||
<!-- Single -->
|
||||
<div>
|
||||
<div class="Adding">
|
||||
<h6>Add a Chromebook</h6>
|
||||
<form class="new-task">
|
||||
@ -21,5 +25,11 @@
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Carts -->
|
||||
<div>
|
||||
|
||||
</div>
|
||||
{{/teacherTabs}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -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();
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user