summaryrefslogtreecommitdiffstats
path: root/askbot/skins/default/templates/question/sidebar.html
blob: 86a543c72d8d36b64fb32e281f947c5369dae2a0 (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
69
70
71
72
73
74
75
76
{% import "macros.html" as macros %}
<div class="box">
    {{ settings.SIDEBAR_QUESTION_HEADER }}
</div>
<div class="box vote-buttons">
    <h2 >{% trans %}Question tools{% endtrans %}</h2>
    {% if favorited %}
        <a class="button followed" 
            alt="{% trans %}click to unfollow this question{% endtrans %}">
            <div>{% trans %}Following{% endtrans %}</div>
            <div class='unfollow'>{% trans %}Unfollow{% endtrans %}</div>
        </a>
    {% else %}
        <a class="button followed"
            alt="{% trans %}click to follow this question{% endtrans %}">
            {%trans %}Follow{%endtrans%}
        </a>
    {% endif %}
    <div class="clearfix"></div>
    <div id="favorite-number" class="favorite-number{% if favorited %} my-favorite-number{% endif %}">
        {% set follower_count = thread.favourite_count %}
        {% if follower_count > 0 %}
            {% trans count=follower_count %}{{count}} follower{% pluralize %}{{count}} followers{% endtrans %}
        {% endif %}
    </div>
    <div class="notify-sidebar">
        {%if request.user.is_authenticated() %}
        <input type="checkbox" id="question-subscribe-sidebar"/>
        <label for="question-subscribe-sidebar">{% trans %}email the updates{% endtrans %}</label>
        {%else%}
        <input type="checkbox" id="question-subscribe-sidebar"/>
        <label for="question-subscribe-sidebar">{% trans %}<strong>Here</strong> (once you log in) you will be able to sign up for the periodic email updates about this question.{% endtrans %}</label>
        {%endif%}
        <p class="rss">
            <a
                href="{{settings.APP_URL}}/feeds/question/{{ question.id }}"
                title="{% trans %}subscribe to this question rss feed{% endtrans %}"
                >{% trans %}subscribe to rss feed{% endtrans %}</a>
        </p>
    </div> 
</div>

{% if settings.SIDEBAR_QUESTION_SHOW_META %}
<div class="box statsWidget">
    <div class="clearfix"></div>
    <h2>{% trans %}Stats{% endtrans %}</h2>
    <p>
        {% trans %}Asked{% endtrans %}: <strong title="{{ question.added_at }}">{{question.added_at|diff_date}}</strong>
    </p>
    <p> 
        {% trans %}Seen{% endtrans %}: <strong>{{ thread.view_count|intcomma }} {% trans %}times{% endtrans %}</strong>
    </p>
    <p>
        {% trans %}Last updated{% endtrans %}: <strong title="{{ thread.last_activity_at }}">{{thread.last_activity_at|diff_date}}</strong>
    </p>
</div>
{% endif %}

{% if similar_threads.data and settings.SIDEBAR_QUESTION_SHOW_RELATED %}
    {#% cache 1800 "related_questions" related_questions question.id language_code %#}
    <div class="box">
        <h2>{% trans %}Related questions{% endtrans %}</h2>
        <div class="questions-related">
            {% for thread_dict in similar_threads.data() %}
            <p>
                <a href="{{ thread_dict.url }}">{{ thread_dict.title|escape }}</a>
            </p>
            {% endfor %}
        </div>
    </div>
    {#% endcache %#}
{% endif %}

<div class="box">
    {{ settings.SIDEBAR_QUESTION_FOOTER }}
</div>