diff --git a/client/app.js b/client/app.js index 7cca7edaf..150af90b4 100644 --- a/client/app.js +++ b/client/app.js @@ -74,7 +74,7 @@ var newPostsHandle = postListSubscription(FIND_APPROVED, {sort: {sticky: -1, sub var bestPostsHandle = postListSubscription(FIND_APPROVED, {sort: {sticky: -1, baseScore: -1}}, 10); var pendingPostsHandle = postListSubscription( {$or: [{status: STATUS_PENDING}, {status: STATUS_REJECTED}]}, - {sort: {score: -1}}, + {sort: {createdAt: -1}}, 10 ); diff --git a/client/views/posts/post_edit.html b/client/views/posts/post_edit.html index 78c848ac1..464e11861 100644 --- a/client/views/posts/post_edit.html +++ b/client/views/posts/post_edit.html @@ -29,6 +29,12 @@ {{#if isAdmin}} +
+ +
+ {{inactive}} +
+
diff --git a/client/views/posts/post_edit.js b/client/views/posts/post_edit.js index 945bfdd66..1dcc679de 100644 --- a/client/views/posts/post_edit.js +++ b/client/views/posts/post_edit.js @@ -95,8 +95,13 @@ Template.post_edit.events = { if(isAdmin(Meteor.user())){ if(status == STATUS_APPROVED){ - // if post is approved, set submitted timestamp to current date or form field date - properties.submitted = (post.submitted == '') ? new Date().getTime() : parseInt(moment($('#submitted_date').val()+$('#submitted_time').val(), "MM/DD/YYYY HH:mm").valueOf()); + if(post.submitted == ''){ + // this is the first time we are approving the post + properties.submitted = new Date().getTime(); + properties.inactive = false; + }else{ + properties.submitted = parseInt(moment($('#submitted_date').val()+$('#submitted_time').val(), "MM/DD/YYYY HH:mm").valueOf()); + } } adminProperties = { sticky: !!$('#sticky').attr('checked'), diff --git a/client/views/posts/post_submit.html b/client/views/posts/post_submit.html index 06629cd68..82e70f7e3 100644 --- a/client/views/posts/post_submit.html +++ b/client/views/posts/post_submit.html @@ -30,7 +30,7 @@
- +