diff options
-rw-r--r-- | askbot/templates/question.html | 8 | ||||
-rw-r--r-- | askbot/templates/question/answer_controls.html | 2 | ||||
-rw-r--r-- | askbot/templates/question/question_controls.html | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/askbot/templates/question.html b/askbot/templates/question.html index 1557eb38..6d5df517 100644 --- a/askbot/templates/question.html +++ b/askbot/templates/question.html @@ -202,7 +202,7 @@ }; - function render_post_controls(post_id){ + function render_post_controls(post_id, is_wiki){ //in this case remove all post controls if (askbot['settings']['readOnlyModeEnabled'] === true) { @@ -246,10 +246,10 @@ ) { removeNode(closeBtn[0]); } - - var repLow = (data['userReputation'] < {{settings.MIN_REP_TO_EDIT_OTHERS_POSTS}}); + var enoughRep = (data['userReputation'] >= {{settings.MIN_REP_TO_EDIT_OTHERS_POSTS}} || + (is_wiki && data['userReputation'] >= {{ settings.MIN_REP_TO_EDIT_WIKI }})); if (//maybe remove "edit" button - repLow || data['userIsReadOnly']//only authors edit comments + !enoughRep || data['userIsReadOnly']//only authors edit comments ){ var edit_btn = document.getElementById( 'post-' + post_id + '-edit' diff --git a/askbot/templates/question/answer_controls.html b/askbot/templates/question/answer_controls.html index 022287a1..e4993c2b 100644 --- a/askbot/templates/question/answer_controls.html +++ b/askbot/templates/question/answer_controls.html @@ -93,5 +93,5 @@ <script type="text/javascript"> askbot['functions']['hideConvertAnswerLinks']('{{ answer.id }}'); askbot['functions']['hidePublishAnswerLink']('{{ answer.id }}'); - askbot['functions']['renderPostControls']('{{ answer.id }}'); + askbot['functions']['renderPostControls']('{{ answer.id }}'{{ ', true' if answer.wiki }}); </script> diff --git a/askbot/templates/question/question_controls.html b/askbot/templates/question/question_controls.html index e38157c2..5ebb7a44 100644 --- a/askbot/templates/question/question_controls.html +++ b/askbot/templates/question/question_controls.html @@ -36,5 +36,5 @@ class="question-delete" >{% if question.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %}</a> <script type="text/javascript"> - askbot['functions']['renderPostControls']('{{question.id}}'); + askbot['functions']['renderPostControls']('{{question.id}}'{{ ', true' if question.wiki }}); </script> |