Skip to content

Commit

Permalink
[Bug 673948] Use display name on Questions
Browse files Browse the repository at this point in the history
  • Loading branch information
kudrom authored and rlr committed Dec 19, 2013
1 parent e1ff5e1 commit 0f2d0eb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions kitsune/questions/templates/questions/answers.html
Expand Up @@ -72,7 +72,7 @@ <h2 class="summary">{{ question.title }}</h2>
{% if question.last_answer %}
<li>
<a href="{{ question.last_answer.get_absolute_url() }}">
{{ _('Last reply by {user}')|f(user=question.last_answer.creator.username) }}
{{ _('Last reply by {user}')|f(user=display_name(question.last_answer.creator)) }}
</a>
<span class="last-answer-date">
{{ question.last_answer.created|timesince }}
Expand Down Expand Up @@ -102,7 +102,7 @@ <h2 class="summary">{{ question.title }}</h2>

{% if question.updated_by %}
<p class="edited">
{{ _('Modified {datetime} by {name}')|fe(name=question.updated_by.username, datetime=datetimeformat(question.updated, format='longdatetime')) }}
{{ _('Modified {datetime} by {name}')|fe(name=display_name(question.updated_by), datetime=datetimeformat(question.updated, format='longdatetime')) }}
</p>
{% endif %}

Expand Down
2 changes: 1 addition & 1 deletion kitsune/questions/templates/questions/includes/answer.html
Expand Up @@ -56,7 +56,7 @@ <h3 class="is-owner">{{_('Question owner')}}</h3>
</div>
{% if answer.updated_by %}
<p class="edited">
{{ _('Modified {datetime} by {name}')|fe(name=answer.updated_by.username, datetime=datetimeformat(answer.updated, format='longdatetime')) }}
{{ _('Modified {datetime} by {name}')|fe(name=display_name(answer.updated_by), datetime=datetimeformat(answer.updated, format='longdatetime')) }}
</p>
{% endif %}
</div>
Expand Down
Expand Up @@ -17,7 +17,7 @@
<ol>
{% if karma_top %}
{% for user in karma_top[:10] %}
<li>{{ user.username }}</li>
<li>{{ display_name(user) }}</li>
{% endfor %}
{% elif top_contributors %}
{% for user in top_contributors[:10] %}
Expand Down
8 changes: 4 additions & 4 deletions kitsune/questions/templates/questions/questions.html
Expand Up @@ -81,17 +81,17 @@ <h3>
{% if karma_top %}
<ol>
{% for u in karma_top[:5] %}
<li{% if u == user %} class="me"{% endif %}>{{ u.username }}</li>
<li{% if u == user %} class="me"{% endif %}>{{ display_name(u) }}</li>
{% endfor %}
</ol>
<ol start="6">
{% for u in karma_top[5:10] %}
<li{% if u == user %} class="me"{% endif %}>{{ u.username }}</li>
<li{% if u == user %} class="me"{% endif %}>{{ display_name(u) }}</li>
{% endfor %}
</ol>
{% if karma_ranking and karma_ranking > 10 %}
<ol start="{{ karma_ranking }}">
<li class="me">{{ user.username }}</li>
<li class="me">{{ display_name(user) }}</li>
</ol>
{% endif %}
{% else %}
Expand Down Expand Up @@ -202,7 +202,7 @@ <h2><a href="{{ question.get_absolute_url() }}">{{ question.title }}</a></h2>
{% if question.num_answers > 0 and question.last_answer %}
<div>
<a href="{{ question.last_answer.get_absolute_url() }}">
{{ _('Last reply by {user}')|f(user=question.last_answer.creator.username) }}
{{ _('Last reply by {user}')|f(user=display_name(question.last_answer.creator)) }}
</a> {{ _('on') }} {{ datetimeformat(question.last_answer.created, format='datetime') }}
</div>
{% endif %}
Expand Down

0 comments on commit 0f2d0eb

Please sign in to comment.