summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-05-24 14:54:53 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-05-24 14:54:58 -0400
commitc839624b845c98c3531ba5b582bbce5b24519cf2 (patch)
treeeb55e07b36f2034cf39a2d6e4a825dd7e71e57f2
parent753e82946529ce55351168483ff9f51a92b293af (diff)
downloadaskbot-c839624b845c98c3531ba5b582bbce5b24519cf2.tar.gz
askbot-c839624b845c98c3531ba5b582bbce5b24519cf2.tar.bz2
askbot-c839624b845c98c3531ba5b582bbce5b24519cf2.zip
fixed regex for the email reply separator and a bug in sending email alerts
-rw-r--r--askbot/const/__init__.py2
-rw-r--r--askbot/models/__init__.py4
-rw-r--r--askbot/skins/default/media/style/style.less5
-rw-r--r--askbot/skins/default/templates/question.html1
-rw-r--r--askbot/skins/default/templates/question/content.html2
5 files changed, 9 insertions, 5 deletions
diff --git a/askbot/const/__init__.py b/askbot/const/__init__.py
index f3091800..ae1d7d2d 100644
--- a/askbot/const/__init__.py
+++ b/askbot/const/__init__.py
@@ -59,7 +59,7 @@ REPLY_WITH_COMMENT_TEMPLATE = _(
'Note: to reply with a comment, '
'please use <a href="mailto://%(addr)s">this link</a>'
)
-REPLY_SEPARATOR_REGEX = re.compile('==== .* -=-==', re.MULTILINE)
+REPLY_SEPARATOR_REGEX = re.compile(r'==== .* -=-==', re.MULTILINE|re.DOTALL)
ANSWER_SORT_METHODS = (#no translations needed here
'latest', 'oldest', 'votes'
diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py
index a87ab96d..90336e6c 100644
--- a/askbot/models/__init__.py
+++ b/askbot/models/__init__.py
@@ -2726,7 +2726,7 @@ def send_instant_notifications_about_activity_in_post(
#of executive function with the activity log recording
#TODO check user reputation
headers = mail.thread_headers(post, origin_post, update_activity.activity_type)
- reply_with_comment_address = None#only used for questions in some cases
+ reply_to_with_comment = None#only used for questions in some cases
if askbot_settings.REPLY_BY_EMAIL:
reply_addr = "noreply"
if user.reputation >= askbot_settings.MIN_REP_TO_POST_BY_EMAIL:
@@ -2746,7 +2746,7 @@ def send_instant_notifications_about_activity_in_post(
**reply_args
).address
reply_to_with_comment = 'reply-%s@%s' % (
- reply_addr,
+ reply_with_comment_address,
askbot_settings.REPLY_BY_EMAIL_HOSTNAME
)
#default action is to post answer
diff --git a/askbot/skins/default/media/style/style.less b/askbot/skins/default/media/style/style.less
index f015ae0c..1cc1be4b 100644
--- a/askbot/skins/default/media/style/style.less
+++ b/askbot/skins/default/media/style/style.less
@@ -1730,7 +1730,10 @@ ul#related-tags li {
}
#fmanswer_button{
- margin:8px 0px ;
+ margin:8px 0px;
+ }
+ #fmanswer_button.answer-own-question {
+ width: 150px;
}
.question-img-favorite:hover {
background: url(../images/vote-favorite-on.png)
diff --git a/askbot/skins/default/templates/question.html b/askbot/skins/default/templates/question.html
index f22796db..bd48bd54 100644
--- a/askbot/skins/default/templates/question.html
+++ b/askbot/skins/default/templates/question.html
@@ -130,6 +130,7 @@
var add_answer_btn = document.getElementById('add-answer-btn');
if (askbot['data']['userIsAuthenticated']){
if (askbot['data']['userId'] == {{question.author_id}}){
+ add_answer_btn.className += ' answer-own-question';
add_answer_btn.setAttribute(
'value',
'{% trans %}Answer Your Own Question{% endtrans %}'
diff --git a/askbot/skins/default/templates/question/content.html b/askbot/skins/default/templates/question/content.html
index 738738dd..58b1bcca 100644
--- a/askbot/skins/default/templates/question/content.html
+++ b/askbot/skins/default/templates/question/content.html
@@ -37,5 +37,5 @@
{% include "question/new_answer_form.html" %}
{# ==== END: question/new_answer_form.html ==== #}
{% if request.user == question.author %}{# this is outside the form on purpose #}
- <input type="button" class="submit after-editor" id="fmanswer_button" value="{% trans %}Answer Your Own Question{% endtrans %}"/>
+ <input type="button" class="submit after-editor answer-own-question" id="fmanswer_button" value="{% trans %}Answer Your Own Question{% endtrans %}"/>
{%endif%}