diff options
author | Adolfo Fitoria <fitoria@fitoria-laptop.(none)> | 2010-02-09 14:12:05 -0600 |
---|---|---|
committer | Adolfo Fitoria <fitoria@fitoria-laptop.(none)> | 2010-02-09 14:12:05 -0600 |
commit | 8de2b9131ddcef647799cf8e1e79921284523073 (patch) | |
tree | 81e17d84530990e35a0accba3a7886266a601482 /templates/user_stats.html | |
parent | 7e95e6481d1e81e43d4b442cbcf3fe37f20d89cc (diff) | |
parent | 9d1fb9890b97beb55461ca34f9757bc685461130 (diff) | |
download | askbot-8de2b9131ddcef647799cf8e1e79921284523073.tar.gz askbot-8de2b9131ddcef647799cf8e1e79921284523073.tar.bz2 askbot-8de2b9131ddcef647799cf8e1e79921284523073.zip |
Merge branch 'evgenyfadeev/master'
Conflicts:
.gitignore
INSTALL
TODO
cnprog.wsgi
django_authopenid/urls.py
django_authopenid/views.py
drop-all-tables.sh
forum/auth.py
forum/managers.py
forum/models.py
forum/templatetags/extra_tags.py
forum/views.py
locale/es/LC_MESSAGES/django.mo
locale/es/LC_MESSAGES/django.po
settings.py
settings_local.py.dist
sql_scripts/update_2009_01_25_001.sql
sql_scripts/update_2009_02_26_001.sql
sql_scripts/update_2009_04_10_001.sql
templates/authopenid/confirm_email.txt
templates/authopenid/sendpw_email.txt
templates/content/js/compress.bat
templates/content/js/flot-build.bat
templates/content/style/style.css
templates/footer.html
templates/question.html
templates/user_reputation.html
templates/user_stats.html
templates/user_votes.html
templates/users_questions.html
urls.py
Diffstat (limited to 'templates/user_stats.html')
-rw-r--r-- | templates/user_stats.html | 79 |
1 files changed, 65 insertions, 14 deletions
diff --git a/templates/user_stats.html b/templates/user_stats.html index b9c33e9f..ecc39807 100644 --- a/templates/user_stats.html +++ b/templates/user_stats.html @@ -7,39 +7,74 @@ {% block usercontent %} <a name="questions"></a> - <h2><span class="count">{{questions|length}}</span> {% trans "User questions" %}</h2> + {% spaceless %} + <h2> + {% blocktrans count questions|length as counter %} + <span class="count">1</span> Question + {% plural %} + <span class="count">{{counter}}</span> Questions + {% endblocktrans %} + </h2> + {% endspaceless %} {% include "users_questions.html" %} <a name="answers"></a> - <h2><span class="count">{{answered_questions|length}}</span> {% trans "Answers" %}</h2> + {% spaceless %} + <h2> + {% blocktrans count answered_questions|length as counter %} + <span class="count">1</span> Answer + {% plural %} + <span class="count">{{counter}}</span> Answers + {% endblocktrans %} + </h2> + {% endspaceless %} <div class="user-stats-table"> {% for answered_question in answered_questions %} <div class="answer-summary"> <a title="{{answered_question.summary|collapse}}" - href="{% url questions %}{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}"> + href="{% url question answered_question.id %}{{answered_question.title|slugify}}#{{answered_question.answer_id}}"> <span class="answer-votes {% if answered_question.accepted %}answered-accepted{% endif %}" title="{% blocktrans with answered_question.vote_count as vote_count %}the answer has been voted for {{ vote_count }} times{% endblocktrans %} {% if answered_question.accepted %}{% trans "this answer has been selected as correct" %}{%endif%}"> {{ answered_question.vote_count }} </span> </a> <div class="answer-link"> - <a href="/questions/{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> {% if answered_question.comment_count %}<span - title="{% blocktrans with answered_question.comment_count as count %}the answer has been commented {{count}} times{% endblocktrans %}">({{answered_question.comment_count}})</span>{% endif %} + {% spaceless %} + <a href="{% url question answered_question.id %}{{answered_question.title|slugify}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> + {% endspaceless %} + {% if answered_question.comment_count %} + <span> + {% blocktrans count answered_question.comment_count as comment_count %} + (one comment) + {% plural %} + the answer has been commented {{comment_count}} times + {% endblocktrans %} + </span> + {% endif %} </div> </div> {% endfor %} </div> + <br/> <a name="votes"></a> - <h2><span class="count">{{total_votes}}</span> {% trans "Votes" %}</h2> + {% spaceless %} + <h2> + {% blocktrans count total_votes as cnt %} + <span class="count">1</span> Vote + {% plural %} + <span class="count">{{cnt}}</span> Votes + {% endblocktrans %} + </h2> + {% endspaceless %} <div class="user-stats-table"> <table> <tr> <td width="60"> - <img style="cursor: default;" src="/content/images/vote-arrow-up-on.png" alt="{% trans "thumb up" %}" /> + <img style="cursor: default;" src="{% href "/content/images/vote-arrow-up-on.png" %}" alt="{% trans "thumb up" %}" /> <span title="{% trans "user has voted up this many times" %}" class="vote-count">{{up_votes}}</span> </td> <td width="60"> - <img style="cursor: default;" src="/content/images/vote-arrow-down-on.png" alt="{% trans "thumb down" %}" /> + <img style="cursor: default;" src="{% href "/content/images/vote-arrow-down-on.png" %}" alt="{% trans "thumb down" %}" /> <span title="{% trans "user voted down this many times" %}" class="vote-count">{{down_votes}}</span> </td> @@ -47,15 +82,24 @@ </table> </div> <a name="tags"></a> - <h2><span class="count">{{tags|length}}</span> {% trans "Tags" %}</h2> + {% spaceless %} + <h2> + {% blocktrans count user_tags|length as counter %} + <span class="count">1</span> Tag + {% plural %} + <span class="count">{{counter}}</span> Tags + {% endblocktrans %} + </h2> + {% endspaceless %} <div class="user-stats-table"> <table class="tags"> <tr> <td width="180" valign="top"> - {% for tag in tags%} + {% for tag in user_tags%} <a rel="tag" - title="{% blocktrans %}see other questions tagged '{{ tag }}' {% endblocktrans %}" - href="{% url forum.views.tag tag|urlencode %}">{{tag.name}}</a><span class="tag-number"> × {{ tag.used_count|intcomma }}</span><br/> + title="{% blocktrans with tag.name as tag_name %}see other questions with {{view_user}}'s contributions tagged '{{ tag_name }}' {% endblocktrans %}" + href="{% url forum.views.tag tag|urlencode %}?user={{view_user.username}}">{{tag.name}}</a> + <span class="tag-number">× {{ tag.user_tag_usage_count|intcomma }}</span><br/> {% if forloop.counter|divisibleby:"10" %} </td> <td width="180" valign="top"> @@ -66,7 +110,15 @@ </table> </div> <a name="badges"></a> - <h2><span class="count">{{total_awards}}</span> {% trans "Badges" %}</h2> + {% spaceless %} + <h2> + {% blocktrans count total_awards as counter %} + <span class="count">1</span> Badge + {% plural %} + <span class="count">{{counter}}</span> Badges + {% endblocktrans %} + </h2> + {% endspaceless %} <div class="user-stats-table"> <table> <tr> @@ -82,6 +134,5 @@ </tr> </table> </div> - {% endblock %} <!-- end user_stats.html --> |