]> git.openstreetmap.org Git - osqa.git/blob - osqa/forum/skins/default/templates/users_questions.html
fe1ac45a743aed64d6a85330df70897d17eef365
[osqa.git] / osqa / forum / skins / default / templates / users_questions.html
1 <!-- users_questions.html -->
2 {% load extra_tags %}
3 {% load extra_filters %}
4 {% load humanize %}
5 {% load i18n %}
6 <div class="user-stats-table">
7     {% for question in questions %}
8         {% if question.favourite_count %}
9             {% if question.favorited_myself %}
10                 <div class="favorites-count">
11                     <img title="{% trans "this questions was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" 
12                         alt="{% trans "thumb-up on" %}"
13                                                 src="{% media  "/media/images/vote-favorite-on.png" %}"/>
14                     <div><b>{{question.favourite_count|intcomma}}</b></div>
15                 </div>
16             {% else %}
17                 <div class="favorites-count-off">
18                     <img title="{% trans "this question was selected as favorite" %}{{question.favourite_count}} {% trans "number of times" %}" 
19                         alt="{% trans "thumb-up off" %}"
20                                                 src="{% media  "/media/images/vote-favorite-off.png" %}"/>
21                     <div><b>{{question.favourite_count|intcomma}}</b></div>
22                 </div>
23             {% endif %}
24         {% else %}
25             <div class="favorites-empty"> </div>
26         {% endif %}
27     <div id="question-summary-{{question.id}}" class="question-summary narrow">
28         <a style="text-decoration: none;" href="{{ question.get_absolute_url }}">
29             <div class="stats">
30                 <div class="votes">
31                     <span class="vote-count-post">{{question.vote_count|intcomma}}</span>
32                     {% trans "votes" %}
33                 </div >
34                 <div title="{% if question.answer_accepted %}{% trans "this answer has been accepted to be correct" %}{% endif %}" class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
35                     <span class="answer-count-post">{{question.answer_count|intcomma}}</span>
36                     {% trans "answers" %}
37                 </div>
38                 <div class="views">
39                      <span class="views-count-post">{{question.view_count|cnprog_intword|safe}}</span>
40                                          {% trans "views" %}
41                 </div>
42             </div>
43         </a>
44         <div class="summary">
45             <div class="question-title">
46                 <a title="{{question.summary}}" href="{{ question.get_absolute_url }}">{{question.title}}</a>
47             </div>
48             <div class="tags">
49                 {% convert2tagname_list question %}
50                 {% for tag in question.tagnames %}
51                                         <!--todo - move trans below to blocktrans -->
52                     <a href="{% url tag_questions tag|urlencode %}" title="{% trans "see questions tagged" %} '{{ tag }}' {% trans "using tags" %}" rel="tag">{{ tag }}</a>
53                 {% endfor %}
54             </div>
55             <div class="started">
56                 <span class="relativetime" title="{{question.last_activity_at}}">{% diff_date question.last_activity_at %}</span>
57                 {% if question.la_username %}
58                     <a href="{% url users %}{{question.la_user_id}}/{{question.la_username}}">{{question.la_username}}</a> {% get_score_badge_by_details question.la_user_reputation question.la_user_gold question.la_user_silver question.la_user_bronze%}
59                 {% endif %}
60             </div>
61         </div>
62     </div>
63     <br clear="all"/>
64     {% endfor %}
65 </div>
66 <!-- end users_questions.html -->