summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-05-30 16:06:08 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-05-30 16:06:08 -0400
commitad74fdd061fcf4811d90458c2e29bbe124d3e12e (patch)
tree995c895452e5a92f87413744c4ec21d0deaedcb9
parent4aacfd1cd9dc827e8259daa622e1e2cc872e0162 (diff)
downloadaskbot-ad74fdd061fcf4811d90458c2e29bbe124d3e12e.tar.gz
askbot-ad74fdd061fcf4811d90458c2e29bbe124d3e12e.tar.bz2
askbot-ad74fdd061fcf4811d90458c2e29bbe124d3e12e.zip
added subject to the post with comment mailto link
-rw-r--r--askbot/const/__init__.py2
-rw-r--r--askbot/models/__init__.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/askbot/const/__init__.py b/askbot/const/__init__.py
index 0a36879e..8e7ba9e6 100644
--- a/askbot/const/__init__.py
+++ b/askbot/const/__init__.py
@@ -58,7 +58,7 @@ SIMPLE_REPLY_SEPARATOR_TEMPLATE = '==== %s -=-=='
REPLY_SEPARATOR_TEMPLATE = '==== %(user_action)s %(instruction)s -=-=='
REPLY_WITH_COMMENT_TEMPLATE = _(
'Note: to reply with a comment, '
- 'please use <a href="mailto:%(addr)s">this link</a>'
+ 'please use <a href="mailto:%(addr)s?subject=%(subject)s">this link</a>'
)
REPLY_SEPARATOR_REGEX = re.compile(r'==== .* -=-==', re.MULTILINE|re.DOTALL)
diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py
index fadbe450..1583b2e5 100644
--- a/askbot/models/__init__.py
+++ b/askbot/models/__init__.py
@@ -2685,7 +2685,12 @@ def format_instant_notification_email(
'instruction': _('To reply, PLEASE WRITE ABOVE THIS LINE.')
}
if post.post_type == 'question' and alt_reply_address:
- data = {'addr': alt_reply_address}
+ data = {
+ 'addr': alt_reply_address,
+ 'subject': urllib.quote(
+ ('Re: ' + post.thread.title).encode('utf-8')
+ )
+ }
reply_separator += '<br>' + \
const.REPLY_WITH_COMMENT_TEMPLATE % data
else: