summaryrefslogtreecommitdiffstats
path: root/askbot/templates/widgets/scope_nav.html
blob: 5bae5c3ce058d3e77bc5b4f78d9cb6da00238335 (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
<div id="scopeNav">
{% if need_scope_links %}
    {% if active_tab != "ask" %}
        {% if not search_state %}  {#  get empty SearchState() if there's none #}
            {% set search_state=search_state|get_empty_search_state %}
        {% endif %}
        {% if settings.ALL_SCOPE_ENABLED %}
        <a class="scope-selector {% if scope == 'all' %}on{% endif %}"
            href="{{ search_state.change_scope('all').full_url() }}"
        >{% trans %}ALL{% endtrans %}</a>
        {% endif %}
        {% if settings.UNANSWERED_SCOPE_ENABLED %}
        <a class="scope-selector {% if scope == 'unanswered' %}on{% endif %}"
            href="{{ search_state.change_scope('unanswered').change_sort('answers-asc').full_url() }}"
        >{{ settings.WORDS_UNANSWERED|escape }}</a>
        {% endif %}
        {% if request.user.is_authenticated() and settings.FOLLOWED_SCOPE_ENABLED %} 
        <a class="scope-selector {% if scope == 'followed' %}on{% endif %}"
            href="{{ search_state.change_scope('followed').full_url() }}"
        >{% trans %}FOLLOWED{% endtrans %}</a>
        {% endif %}
    {% else %}
    <div class="scope-selector ask-message">{{ settings.WORDS_PLEASE_ASK_YOUR_QUESTION_HERE|escape }}</div>
    {% endif %}
{% endif %}
</div>