summaryrefslogtreecommitdiffstats
path: root/askbot/skins/default/templates/question_list.html
blob: 3f5d701bbf51c3f8459557d121a6ad90d2cb6c80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{% load cache %}
{% load i18n %}
{% load humanize %}
{% load extra_filters %}
{% load extra_tags %}
{% for question in questions.object_list %}
<div class="short-summary">
    <div class="counts">
        <div class="votes">
            <span 
                class="item-count"
                style="background:{{settings.COLORS_VOTE_COUNTER_MIN_BG}};color:{{settings.COLORS_VOTE_COUNTER_MIN_FG}}"
            >{{question.score|humanize_counter}}</span>
            <div>
            {% blocktrans count question.score as cnt %}
            vote
            {% plural %}
            votes
            {% endblocktrans %}
            </div>
        </div >
        {% comment %}
        <div {% if question.answer_accepted %}title="{% 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 %}">
        {% endcomment %}
        <div class="votes"> 
            <span 
                class="item-count"
                {% if question.answer_accepted %}
                style="background:{{settings.COLORS_ANSWER_COUNTER_ACCEPTED_BG}};color:{{settings.COLORS_ANSWER_COUNTER_ACCEPTED_FG}}"
                {% else %}
                style="background:{{settings.COLORS_ANSWER_COUNTER_MIN_BG}};color:{{settings.COLORS_ANSWER_COUNTER_MIN_FG}}"
                {% endif %}
            >{{question.answer_count|humanize_counter}}</span>
            <div>
            {% blocktrans count question.answer_count as cnt %}
            answer 
            {% plural %}
            answers 
            {% endblocktrans %}
            </div>
        </div>
        <div class="votes">
             <span class="item-count"
                style="background:{{settings.COLORS_VIEW_COUNTER_MIN_BG}};color:{{settings.COLORS_VIEW_COUNTER_MIN_FG}}"
             >{{question.view_count|humanize_counter}}</span>
            <div>
            {% blocktrans count question.view_count as cnt %}
            view
            {% plural %}
            views
            {% endblocktrans %}
            </div>
        </div>
    </div>
    <h2><a title="{{question.summary}}" href="{% url question id=question.id %}{{question.title|slugify}}">{{question.title}}</a></h2>
    <div class="userinfo">
        <span class="relativetime" title="{{question.last_activity_at}}">{% diff_date question.last_activity_at %}</span>
        {% if question.last_activity_by %}
        &nbsp;<a href="{% url user_profile question.last_activity_by.id question.last_activity_by.username|slugify %}">{{ question.last_activity_by }}</a>&nbsp;{% get_score_badge question.last_activity_by %}
        {% endif %}
    </div>
    <div class="tags">
        {% for tag in question.tagname_list %}
        <a href="{% url questions %}?tags={{tag|urlencode}}" title="{% blocktrans %}see questions tagged '{{ tag }}'{%endblocktrans %}" rel="tag">{{ tag }}</a>
        {% endfor %}
    </div>
</div>
{% endfor %}