{% import "macros.html" as macros %}
{% cache 0 "scope_sort_tabs" search_tags request.user author_name scope sort query context.page language_code %}
<div class="js-questions-header">
  <div class="js-questions-header-top">
    {% include "questions/questions_title.html" %}
    <div class="questions-header-top-controls">
      {% include "questions/questions_sort_nav.html" %}
      {% if settings.RSS_ENABLED %}
        <a class="js-rss-link with-rss-icon" href="{{ feed_url }}"
          title="{% trans %}subscribe to the feed{% endtrans %}"
        >
          {% trans %}RSS{% endtrans %}
        </a>
      {% endif %}
      {% include "components/toggle_sidebar_button.html" %}
    </div>
  </div>
  <div class="js-search-tags" {% if not search_tags %}style="display: none;"{% endif %}>
      {{ macros.tag_list_widget(search_tags,
                                id='searchTags',
                                deletable=True,
                                label=gettext('Tagged'),
                                make_links=False,
                                search_state=search_state)}}
      {#%- if author_name %}{% trans %}author: {{author_name}}{% endtrans %} {% endif %#}
  </div>
</div>
{% endcache %}
{#% if author_name or search_tags or query %}
    todo: maybe in the future make a tooltip or some search help info
    <p class="search-tips"><b>{% trans %}Search tips:{% endtrans %}</b>
    {% if reset_method_count > 1 %}
        {% if author_name %}
            <a href="{{ search_state.remove_author().full_url() }}">{% trans %}reset author{% endtrans %}</a>
        {% endif %}
        {% if search_tags %}{% if author_name and query %}, {% elif author_name %}{% trans %} or {% endtrans %}{% endif %}
            <a href="{{ search_state.remove_tags().full_url() }}">{% trans %}reset tags{% endtrans %}</a>
        {% endif %}
        {% if query %}{% trans %} or {% endtrans %}
            <a href="{{ url('questions') }}">{% trans %}start over{% endtrans %}</a>
        {% endif %}
    {% else %}
        <a href="{{ url('questions') }}">{% trans %}start over{% endtrans %}</a>
    {% endif %}
    {% trans %} - to expand, or dig in by adding more tags and revising the query.{% endtrans %}
    </p>
{% else %}
    <p class="search-tips"><b>{% trans %}Search tip:{% endtrans %}</b> {% trans %}add tags and a query to focus your search{% endtrans %}</p>
{% endif %#}
