diff --git a/chromebook-checkout-meteor/client/admin.css b/chromebook-checkout-meteor/client/admin.css new file mode 100644 index 0000000..a6bfc05 --- /dev/null +++ b/chromebook-checkout-meteor/client/admin.css @@ -0,0 +1,3 @@ +.admintitle { + text-align: center; +} \ No newline at end of file diff --git a/chromebook-checkout-meteor/client/admin.html b/chromebook-checkout-meteor/client/admin.html index d44cab5..57700d6 100644 --- a/chromebook-checkout-meteor/client/admin.html +++ b/chromebook-checkout-meteor/client/admin.html @@ -1,8 +1,13 @@ \ No newline at end of file diff --git a/chromebook-checkout-meteor/client/checkout.js b/chromebook-checkout-meteor/client/checkout.js index 25ba41e..1e02fba 100644 --- a/chromebook-checkout-meteor/client/checkout.js +++ b/chromebook-checkout-meteor/client/checkout.js @@ -24,5 +24,13 @@ Template.checkout.events({ else { alert("Access Denied"); } + }, + 'click .edit': function() { + if (Roles.userIsInRole(Meteor.userId(), ['admin'])) { + Router.go('/admin'); + } + else { + alert("Access Denied"); + } } }); \ No newline at end of file diff --git a/chromebook-checkout-meteor/client/chromebook.js b/chromebook-checkout-meteor/client/chromebook.js index 49d74d4..217d880 100644 --- a/chromebook-checkout-meteor/client/chromebook.js +++ b/chromebook-checkout-meteor/client/chromebook.js @@ -37,13 +37,5 @@ Template.chromebook.events({ Chromebooks.update(this._id, {$set: {last_checkout: null}}); Chromebooks.update(this._id, {$set: {userid: null}}); } - }, - 'click .cross': function() { - if (Roles.userIsInRole(Meteor.userId(), ['admin'])) { - Router.go('/admin'); - } - else { - alert("Access Denied"); - } } }); \ No newline at end of file