Revision history [back]
Hello, to get it done quickly - please change these two things:
(1) - function askbot.models.user_assert_can_unaccept_best_answer
in the file askbot/models/__init__.py
- this assertion is used for both accepting and unaccepting the best answer.
(2) - show icon "accept answer" to admins - around line 207 in askbot/skins/default/templates/question.html
by changing it from
{% if request.user == question.author %}
<img id="answer-img-accept-{{ answer.id }} ...
to
{% if request.user == question.author or request.user.is_administrator() %}
<img id="answer-img-accept-{{ answer.id }} ...
Properly it would require adding a couple of settings to the configuration and updating test cases and fix the rep awarding.
Edit: one more thing -
change file askbot/skins/default/media/js/post.js
around line 288
var bindEvents = function(){
// accept answers
if(true){//edit on this line: was questionAuthorId == currentUserId){
var acceptedButtons = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixAccept +']';
Hello, to get it done quickly - please change these two things:
(1) - function askbot.models.user_assert_can_unaccept_best_answer
in the file askbot/models/__init__.py
- this assertion is used for both accepting and unaccepting the best answer.
(2) - show icon "accept answer" to admins - around line 207 in askbot/skins/default/templates/question.html
by changing it from
{% if request.user == question.author %}
<img id="answer-img-accept-{{ answer.id }} ...
to
{% if request.user == question.author or request.user.is_administrator() %}
<img id="answer-img-accept-{{ answer.id }} ...
Properly it would require adding a couple of settings to the configuration and updating test cases and fix the rep awarding.
Edit: one more thing -
change file askbot/skins/default/media/js/post.js
around line 288
var bindEvents = function(){
// accept answers
if(true){//edit on this line: was questionAuthorId == currentUserId){
var acceptedButtons = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixAccept +']';
Hello, to get it done quickly - please change these two things:
(1) - function askbot.models.user_assert_can_unaccept_best_answer
in the file askbot/models/__init__.py
- this assertion is used for both accepting and unaccepting the best answer.
(2) - show icon "accept answer" to admins - around line 207 in askbot/skins/default/templates/question.html
by changing it from
{% if request.user == question.author %}
<img id="answer-img-accept-{{ answer.id }} ...
to
{% if request.user == question.author or request.user.is_administrator() %}
<img id="answer-img-accept-{{ answer.id }} ...
Properly it would require adding a couple of settings to the configuration and updating test cases and fix the rep awarding.cases.