summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-06-04 10:09:49 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-06-04 10:09:49 -0400
commit8a6373c47ab62499c8be489c35231b8bea0d00a5 (patch)
treeafdcb642a25cdde9ef6e04ee94f2cd2416aeb258
parent27772070e816f979e3d6d6d101e98c7258bfdb65 (diff)
downloadaskbot-8a6373c47ab62499c8be489c35231b8bea0d00a5.tar.gz
askbot-8a6373c47ab62499c8be489c35231b8bea0d00a5.tar.bz2
askbot-8a6373c47ab62499c8be489c35231b8bea0d00a5.zip
small change in a message in auth module + split out a template
-rw-r--r--askbot/deps/django_authopenid/views.py10
-rw-r--r--askbot/templates/user_profile/user_stats.html24
-rw-r--r--askbot/templates/user_profile/users_answers.html23
3 files changed, 27 insertions, 30 deletions
diff --git a/askbot/deps/django_authopenid/views.py b/askbot/deps/django_authopenid/views.py
index 8f6ee101..accd7a04 100644
--- a/askbot/deps/django_authopenid/views.py
+++ b/askbot/deps/django_authopenid/views.py
@@ -878,16 +878,12 @@ def finalize_generic_signin(
)
logging.info('switching account or open id changed???')
#did openid url change? or we are dealing with a brand new open id?
- message1 = _(
+ message = _(
'If you are trying to sign in to another account, '
- 'please sign out first.'
- )
- request.user.message_set.create(message=message1)
- message2 = _(
- 'Otherwise, please report the incident '
+ 'please sign out first. Otherwise, please report the incident '
'to the site administrator.'
)
- request.user.message_set.create(message=message2)
+ request.user.message_set.create(message=message)
return HttpResponseRedirect(redirect_url)
except UserAssociation.DoesNotExist:
#register new association
diff --git a/askbot/templates/user_profile/user_stats.html b/askbot/templates/user_profile/user_stats.html
index 812f3411..fe446c44 100644
--- a/askbot/templates/user_profile/user_stats.html
+++ b/askbot/templates/user_profile/user_stats.html
@@ -16,29 +16,7 @@
{% spaceless %}
<h2 style="clear:both;"><span class="count">{{ top_answer_count }}</span> {% trans counter=top_answer_count %}Answer{% pluralize %}Answers{% endtrans %}</h2>
{% endspaceless %}
- <div class="user-stats-table">
- {% for top_answer in top_answers %}
- <div class="answer-summary">
- <a title="{{ top_answer.summary|collapse|escape }}"
- href="{% url question top_answer.thread._question_post().id %}{{ top_answer.thread.title|slugify }}#{{ top_answer.id }}">
- <span class="answer-votes {% if top_answer.accepted() %}answered-accepted{% endif %}"
- title="{% trans answer_score=top_answer.score %}the answer has been voted for {{ answer_score }} times{% endtrans %} {% if top_answer.accepted() %}{% trans %}this answer has been selected as correct{% endtrans %}{%endif%}">
- {{ top_answer.score }}
- </span>
- </a>
- <div class="answer-link">
- {% spaceless %}
- <a href="{% url question top_answer.thread._question_post().id %}{{ top_answer.thread.title|slugify }}#{{top_answer.id}}">{{ top_answer.thread.title|escape }}</a>
- {% endspaceless %}
- {% if top_answer.comment_count > 0 %}
- <span>
- {% trans comment_count=top_answer.comment_count %}({{ comment_count }} comment){% pluralize %}the answer has been commented {{ comment_count }} times{% endtrans %}
- </span>
- {% endif %}
- </div>
- </div>
- {% endfor %}
- </div>
+ {% include "user_profile/users_answers.html" %}
<br/>
<a name="votes"></a>
{% spaceless %}
diff --git a/askbot/templates/user_profile/users_answers.html b/askbot/templates/user_profile/users_answers.html
new file mode 100644
index 00000000..3ac52c19
--- /dev/null
+++ b/askbot/templates/user_profile/users_answers.html
@@ -0,0 +1,23 @@
+<div class="user-stats-table">
+ {% for top_answer in top_answers %}
+ <div class="answer-summary">
+ <a title="{{ top_answer.summary|collapse|escape }}"
+ href="{% url question top_answer.thread._question_post().id %}{{ top_answer.thread.title|slugify }}#{{ top_answer.id }}">
+ <span class="answer-votes {% if top_answer.accepted() %}answered-accepted{% endif %}"
+ title="{% trans answer_score=top_answer.score %}the answer has been voted for {{ answer_score }} times{% endtrans %} {% if top_answer.accepted() %}{% trans %}this answer has been selected as correct{% endtrans %}{%endif%}">
+ {{ top_answer.score }}
+ </span>
+ </a>
+ <div class="answer-link">
+ {% spaceless %}
+ <a href="{% url question top_answer.thread._question_post().id %}{{ top_answer.thread.title|slugify }}#{{top_answer.id}}">{{ top_answer.thread.title|escape }}</a>
+ {% endspaceless %}
+ {% if top_answer.comment_count > 0 %}
+ <span>
+ {% trans comment_count=top_answer.comment_count %}({{ comment_count }} comment){% pluralize %}the answer has been commented {{ comment_count }} times{% endtrans %}
+ </span>
+ {% endif %}
+ </div>
+ </div>
+ {% endfor %}
+</div>