{# todo - maybe disable navigation from ignored tags here when "hide" is on - with js? #}
{% import "macros.html" as macros %}
<div id="tagSelector" class="box">
    <h2>{% trans %}Interesting tags{% endtrans %}</h2>
    {{ 
        macros.tag_list_widget(
            interesting_tag_names,
            deletable = True,
            css_class = 'interesting marked-tags',
            search_state = search_state
        )
    }}
    {# todo - add this via js
        "remove '%(tag_name)s' from the list of interesting tags"|
        format(tag_name = tag_name)
    #}
    <div class="clearfix"></div>
    <div class="inputs">
        <input id="interestingTagInput" autocomplete="off" type="text"/>
        <input id="interestingTagAdd" type="submit" value="{% trans %}add{% endtrans %}"/>
    </div>
    <h2>{% trans %}Ignored tags{% endtrans %}</h2>
    {{
        macros.tag_list_widget(
            ignored_tag_names,
            deletable = True,
            css_class = 'ignored marked-tags',
            search_state = search_state
        )
    }}
    {# todo: add this via javascript 
        "remove '%(tag_name)s' from the list of ignored tags"|
        format(tag_name = tag_name)
    #}
    <div class="inputs">
        <input id="ignoredTagInput" autocomplete="off" type="text"/>
        <input id="ignoredTagAdd" type="submit" value="{% trans %}add{% endtrans%}"/>
    </div>
    {% if settings.SUBSCRIBED_TAG_SELECTOR_ENABLED %}
        <h2>{% trans %}Subscribed tags{% endtrans %}</h2>
        {{
            macros.tag_list_widget(
                subscribed_tag_names,
                deletable = True,
                css_class = 'subscribed marked-tags',
                search_state = search_state
            )
        }}
        {# todo: add this via javascript 
            "remove '%(tag_name)s' from the list of ignored tags"|
            format(tag_name = tag_name)
        #}
        <div class="clearfix"></div>
        <div class="inputs">
            <input id="subscribedTagInput" autocomplete="off" type="text"/>
            <input id="subscribedTagAdd" type="submit" value="{% trans %}add{% endtrans%}"/>
        </div>
    {% endif %}
    <h3>{{ settings.WORDS_SHOW_ONLY_QUESTIONS_FROM|escape }}</h3>
    <div id="displayTagFilterControl">
        {{
            macros.radio_select(
                name = "display_tag_filter_strategy",
                value = request.user.display_tag_filter_strategy,
                choices = display_tag_filter_strategy_choices
            )
        }}
    </div>
    {% if settings.SUBSCRIBED_TAG_SELECTOR_ENABLED %}
        <h3>{% trans %}Send me email alerts for{% endtrans%}</h3>
        <div id="emailTagFilterControl">
            {{
                macros.radio_select(
                    name = "email_tag_filter_strategy",
                    value = request.user.email_tag_filter_strategy,
                    choices = email_tag_filter_strategy_choices
                )
            }}
            {% if request.user.is_authenticated() %}
            <p>
                <a 
                    href="{% 
                        url user_profile 
                        request.user.id, request.user.username|slugify 
                    %}?sort=email_subscriptions"
                >{% trans %}Change frequency of emails{% endtrans %}</a>
            </p>
            {% endif %}
        </div>
    {% endif %}
</div>
