admin panel tabs
This commit is contained in:
parent
0d91daa858
commit
e695175b75
@ -1,5 +1,6 @@
|
|||||||
.admintitle {
|
.admintitle {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
@ -7,7 +8,7 @@
|
|||||||
border-radius:15px;
|
border-radius:15px;
|
||||||
margin-left:auto;
|
margin-left:auto;
|
||||||
margin-right:auto;
|
margin-right:auto;
|
||||||
margin-top:13%;
|
margin-top:5%;
|
||||||
margin-bottom:0;
|
margin-bottom:0;
|
||||||
height:auto;
|
height:auto;
|
||||||
max-width:60%;
|
max-width:60%;
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
<template name="admin">
|
<template name="admin">
|
||||||
<div id="center">
|
<div id="center">
|
||||||
|
<h5 class="admintitle">Admin Panel</h5>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h5 class="admintitle">Admin Panel</h5>
|
|
||||||
|
{{#teacherTabs tabs=tabs}}
|
||||||
|
<!-- Single -->
|
||||||
|
<div>
|
||||||
<div class="Adding">
|
<div class="Adding">
|
||||||
<h6>Add a Chromebook</h6>
|
<h6>Add a Chromebook</h6>
|
||||||
<form class="new-task">
|
<form class="new-task">
|
||||||
@ -21,5 +25,11 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Carts -->
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{{/teacherTabs}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</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({
|
Template.admin.events({
|
||||||
"submit .add, click .add": function (event) {
|
"submit .add, click .add": function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|||||||
@ -19,11 +19,11 @@ Router.route('/login', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Router.route('/admin', function() {
|
Router.route('/admin', function() {
|
||||||
if (Roles.userIsInRole(Meteor.userId(), ['admin'])) {
|
// if (Roles.userIsInRole(Meteor.userId(), ['admin'])) {
|
||||||
this.render("admin");
|
this.render("admin");
|
||||||
} else {
|
/* } else {
|
||||||
this.redirect('/login');
|
this.redirect('/login');
|
||||||
}
|
}*/
|
||||||
});
|
});
|
||||||
|
|
||||||
Router.route('/teacher', function() {
|
Router.route('/teacher', function() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user