diff --git a/scheduleac/client/client.html b/scheduleac/client/client.html index 25735c3..e7c3429 100644 --- a/scheduleac/client/client.html +++ b/scheduleac/client/client.html @@ -9,10 +9,30 @@ + + + + + \ No newline at end of file diff --git a/scheduleac/client/client.js b/scheduleac/client/client.js index 2023b9a..0a1736b 100644 --- a/scheduleac/client/client.js +++ b/scheduleac/client/client.js @@ -6,15 +6,17 @@ var done = false; Meteor.subscribe('schedule'); -Template.client.rendered=function() { - -} - - -// schedule.find({}, {sort: {timestamp: 1}, limit: 2}).fetch() Template.client.helpers({ + sched: function() { + return schedule.find({}, {sort: {timestamp: 1}, limit: 5}).fetch(); + }, + + mostrecent: function() { + return schedule.find({}, {sort: {timestamp: 1}, limit: 1}).fetch(); + }, + allowed: function() { if (!(Meteor.user() === undefined) && Meteor.user().services.google.email in allowedu) { return true @@ -24,7 +26,7 @@ Template.client.helpers({ } -}) +}); Template.client.events({ "focus input": function() { @@ -47,4 +49,22 @@ Template.client.events({ post = document.getElementById('post').value; Meteor.call('add_button', this, pre, post); } -}) \ No newline at end of file +}); + +Template.day.helpers({ + pretext: function() { + return this.pretext; + }, + aftertext: function() { + return this.aftertext; + } +}); + +Template.recent.helpers({ + pretext: function() { + return this.pretext; + }, + aftertext: function() { + return this.aftertext; + } +}); \ No newline at end of file