removed set unavailable from normal users

This commit is contained in:
Yaman 2015-01-08 21:05:52 -05:00
parent 751bb05ec3
commit 5877967634
4 changed files with 16 additions and 12 deletions

View File

@ -18,4 +18,8 @@
.remove { .remove {
margin-bottom: 4%; margin-bottom: 4%;
}
.row {
min-width: 80%;
} }

View File

@ -7,7 +7,7 @@
<div class="row"> <div class="row">
{{> chromebook}} {{> chromebook}}
<!-- fa-times --> <!-- fa-times -->
<i class="icons cross fa fa-exclamation-triangle fa-lg"></i> <!-- <i class="icons cross fa fa-exclamation-triangle fa-lg"></i> -->
</div> </div>
{{/each}} {{/each}}
<i class="icons edit fa fa-pencil-square-o fa-lg"></i> <i class="icons edit fa fa-pencil-square-o fa-lg"></i>

View File

@ -15,8 +15,8 @@ body {
box-shadow: 3px 3px 10px #c2c2c2; box-shadow: 3px 3px 10px #c2c2c2;
color: #000000; color: #000000;
height: 10%; height: 10%;
max-width: 80%; /* max-width: 100%;*/
min-width: 80%; min-width: 92%;
} }
.chromebook:hover { .chromebook:hover {

View File

@ -22,15 +22,15 @@ Template.chromebook.helpers({
}); });
Template.chromebook.events({ Template.chromebook.events({
'click .available, click .unavailable, click .checkedout': function() { // 'click .available, click .unavailable, click .checkedout': function() {
if (Roles.userIsInRole(Meteor.userId(), ['admin']) // if (Roles.userIsInRole(Meteor.userId(), ['admin'])
&& Router.current().route.path() === '/admin') { // && Router.current().route.path() === '/admin') {
var chromebook_number = $("input[name='anumber']")[0].value; // var chromebook_number = $("input[name='anumber']")[0].value;
var chromebook_serial = $("input[name='anumber']")[0].nextElementSibling.value; // var chromebook_serial = $("input[name='anumber']")[0].nextElementSibling.value;
chromebook_number = this.number; // chromebook_number = this.number;
chromebook_serial = this.serial; // chromebook_serial = this.serial;
} // }
}, // },
'click .available': function() { 'click .available': function() {
if ((Chromebooks.findOne({userid: Meteor.userId()}) === undefined) if ((Chromebooks.findOne({userid: Meteor.userId()}) === undefined)
|| (Roles.userIsInRole(Meteor.userId(), ['admin', 'teacher']))) { || (Roles.userIsInRole(Meteor.userId(), ['admin', 'teacher']))) {