summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/models/__init__.py16
-rw-r--r--askbot/templates/user_profile/user_info.html2
-rw-r--r--askbot/views/users.py1
3 files changed, 8 insertions, 11 deletions
diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py
index c80c57b5..beff6621 100644
--- a/askbot/models/__init__.py
+++ b/askbot/models/__init__.py
@@ -2272,21 +2272,19 @@ def user_moderate_user_reputation(
repute.positive = reputation_change
repute.save()
-def user_get_status_display(self, soft = False):
- if self.is_administrator():
- return _('Site Adminstrator')
+def user_get_status_display(self):
+ if self.is_approved():
+ return _('Registered User')
+ elif self.is_administrator():
+ return _('Adminstrator')
elif self.is_moderator():
- return _('Forum Moderator')
+ return _('Moderator')
elif self.is_suspended():
return _('Suspended User')
elif self.is_blocked():
return _('Blocked User')
- elif soft == True:
- return _('Registered User')
elif self.is_watched():
- return _('Watched User')
- elif self.is_approved():
- return _('Approved User')
+ return _('New User')
else:
raise ValueError('Unknown user status')
diff --git a/askbot/templates/user_profile/user_info.html b/askbot/templates/user_profile/user_info.html
index 6a9ff91e..9e1adcca 100644
--- a/askbot/templates/user_profile/user_info.html
+++ b/askbot/templates/user_profile/user_info.html
@@ -46,7 +46,7 @@
{% endif %}
<tr>
<th colspan="2" align="left">
- <h3>{{user_status_for_display}}</h3>
+ <h3>{{ view_user.get_status_display() }}</h3>
</th>
</tr>
{% if view_user.real_name %}
diff --git a/askbot/views/users.py b/askbot/views/users.py
index 7c3c87c3..09c4e987 100644
--- a/askbot/views/users.py
+++ b/askbot/views/users.py
@@ -541,7 +541,6 @@ def user_stats(request, user, context):
'support_custom_avatars': ('avatar' in django_settings.INSTALLED_APPS),
'tab_name' : 'stats',
'page_title' : _('user profile overview'),
- 'user_status_for_display': user.get_status_display(soft = True),
'questions' : questions,
'question_count': question_count,
'q_paginator_context': q_paginator_context,