diff options
Diffstat (limited to 'askbot/skins/default/templates/user_profile/user_stats.html')
-rw-r--r-- | askbot/skins/default/templates/user_profile/user_stats.html | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/askbot/skins/default/templates/user_profile/user_stats.html b/askbot/skins/default/templates/user_profile/user_stats.html new file mode 100644 index 00000000..02849df1 --- /dev/null +++ b/askbot/skins/default/templates/user_profile/user_stats.html @@ -0,0 +1,117 @@ +{% extends "user_profile/user.html" %} +{% import "macros.html" as macros %} +<!-- user_stats.html --> +{% block profilesection %} + {% trans %}overview{% endtrans %} +{% endblock %} + {% block usercontent %} + {% include "user_profile/user_info.html" %} + <a name="questions"></a> + {% spaceless %} + <h2>{% trans counter=questions|length %}<span class="count">{{counter}}</span> Question{% pluralize %}<span class="count">{{counter}}</span> Questions{% endtrans %}</h2> + {% endspaceless %} + {% include "user_profile/users_questions.html" %} + <a name="answers"></a> + {% spaceless %} + <h2 style="clear:both;">{% trans counter=answered_questions|length %}<span class="count">{{counter}}</span> Answer{% pluralize %}<span class="count">{{counter}}</span> Answers{% endtrans %}</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 question answered_question.id %}{{answered_question.title|slugify}}#{{answered_question.answer_id}}"> + <span class="answer-votes {% if answered_question.accepted %}answered-accepted{% endif %}" + title="{% trans answer_score=answered_question.answer_score %}the answer has been voted for {{ answer_score }} times{% endtrans %} {% if answered_question.accepted %}{% trans %}this answer has been selected as correct{% endtrans %}{%endif%}"> + {{ answered_question.answer_score }} + </span> + </a> + <div class="answer-link"> + {% 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> + {% trans comment_count=answered_question.comment_count %}({{comment_count}} comment){% pluralize %}the answer has been commented {{comment_count}} times{% endtrans %} + </span> + {% endif %} + </div> + </div> + {% endfor %} + </div> + <br/> + <a name="votes"></a> + {% spaceless %} + <h2>{% trans cnt=total_votes %}<span class="count">{{cnt}}</span> Vote{% pluralize %}<span class="count">{{cnt}}</span> Votes {% endtrans %}</h2> + {% endspaceless %} + <div class="user-stats-table"> + <table> + <tr> + <td width="60"> + <img style="cursor: default;" src="{{"/images/vote-arrow-up-on.png"|media}}" alt="{% trans %}thumb up{% endtrans %}" /> + <span title="{% trans %}user has voted up this many times{% endtrans %}" class="vote-count">{{up_votes}}</span> + </td> + <td width="60"> + <img style="cursor: default;" src="{{"/images/vote-arrow-down-on.png"|media}}" alt="{% trans %}thumb down{% endtrans %}" /> + <span title="{% trans %}user voted down this many times{% endtrans %}" class="vote-count">{{down_votes}}</span> + + </td> + </tr> + </table> + </div> + <a name="tags"></a> + {% spaceless %} + <h2>{% trans counter=user_tags|length %}<span class="count">{{counter}}</span> Tag{% pluralize %}<span class="count">{{counter}}</span> Tags{% endtrans %}</h2> + {% endspaceless %} + <div class="user-stats-table"> + <table class="tags"> + <tr> + <td valign="top"> + <ul id="ab-user-tags" class="tags"> + {% for tag in user_tags %} + <li> + {{ macros.tag_widget( + tag.name, + html_tag = 'div', + url_params = + "author=" ~ view_user.id ~ + "&start_over=true", + extra_content = + '<span class="tag-number">× ' ~ + tag.user_tag_usage_count|intcomma ~ + '</span>' + ) + }} + </li> + {# + {% if loop.index is divisibleby 10 %} + </td> + <td width="180" valign="top"> + {% endif %} + #} + {% endfor %} + </ul> + </td> + </tr> + </table> + </div> + <a name="badges"></a> + {% spaceless %} + <h2>{% trans counter=total_awards %}<span class="count">{{counter}}</span> Badge{% pluralize %}<span class="count">{{counter}}</span> Badges{% endtrans %}</h2> + {% endspaceless %} + <div class="user-stats-table"> + <table> + <tr> + <td width="180" style="line-height:35px"> + {% for badge in badges %}{# todo: translate badge name properly #} + <a href="{{badge.get_absolute_url()}}" title="{% trans description=badge.description %}{{description}}{% endtrans %}" class="medal"><span class="{{ badge.css_class }}">●</span> {% trans name=badge.name %}{{name}}{% endtrans %}</a><span class="tag-number"> × {{ awarded_badge_counts[badge.id]|intcomma }}</span><br/> + {% if loop.index is divisibleby 3 %} + </td> + <td width="180" style="line-height:35px"> + {% endif %} + {% endfor %} + </td> + </tr> + </table> + </div> +{% endblock %} +<!-- end user_stats.html --> |