diff --git a/static/js/posts.js b/static/js/posts.js index dfc30b7..17a31a8 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -188,7 +188,7 @@ var movePostHTML = function(postID) { } return $tmpl.innerHTML.replace(/POST_ID/g, postID); } -var createPostEl = function(post, owned) { +var createPostEl = function(post, owned, singleUser) { var $post = document.createElement('div'); let p = H.createPost(post.id, "", post.body) var title = (post.title || p.title || post.id); @@ -202,7 +202,7 @@ var createPostEl = function(post, owned) { posted = getFormattedDate(new Date(post.created)) } var hasDraft = H.exists('draft' + post.id); - $post.innerHTML += '

' + posted + ' edit' + (hasDraft ? 'ed' : '') + ' delete '+movePostHTML(post.id)+'

'; + $post.innerHTML += '

' + posted + ' edit' + (hasDraft ? 'ed' : '') + ' delete '+movePostHTML(post.id)+'

'; if (post.error) { $post.innerHTML += '

Sync error: ' + post.error + '

'; diff --git a/templates/user/articles.tmpl b/templates/user/articles.tmpl index 92f9c40..3e50863 100644 --- a/templates/user/articles.tmpl +++ b/templates/user/articles.tmpl @@ -202,8 +202,9 @@ function loadMorePosts() { if (http.readyState == 4) { if (http.status == 200) { var data = JSON.parse(http.responseText); + var singleUser = {{ .SingleUser }}; for (var i=0; i