summaryrefslogtreecommitdiffstats
path: root/askbot/templates/question.html
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/templates/question.html')
-rw-r--r--askbot/templates/question.html11
1 files changed, 9 insertions, 2 deletions
diff --git a/askbot/templates/question.html b/askbot/templates/question.html
index 3364cc2f..9a508a2f 100644
--- a/askbot/templates/question.html
+++ b/askbot/templates/question.html
@@ -62,6 +62,13 @@
return null;
};
+ var postIsComment = function(postId) {
+ if (document.getElementById('comment-' + postId)) {
+ return true;
+ }
+ return false;
+ };
+
var removeNode = function(node) {
node.parentNode.removeChild(node);
};
@@ -186,9 +193,9 @@
) {
removeNode(closeBtn[0]);
}
+ var repLow = (data['userReputation'] < {{settings.MIN_REP_TO_EDIT_OTHERS_POSTS}});
if (//maybe remove "edit" button
- data['userReputation'] <
- {{settings.MIN_REP_TO_EDIT_OTHERS_POSTS}}
+ repLow || postIsComment(post_id)//only authors edit comments
){
var edit_btn = document.getElementById(
'post-' + post_id + '-edit'