{#
# This file is part of Invenio.
# Copyright (C) 2014, 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# Invenio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Invenio; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#}

{%- block search_form -%}
{%- block search_form_body -%}

<div id="search-box-main" class="row">
  <div class="col-sm-12">
    <div class="navbar navbar-default">
      {% include "search/form/text.html" %}
      {%- block search_form_form -%}
      <div class="navbar-collapse">
        {% include "search/form/form.html" %}
        {% include "search/form/settings.html" %}
      </div>
      {%- endblock search_form_form -%}
    </div>
  </div>
</div>

{%- block search_query_filters -%}
<div id="search-query-filters"
     class="row {{ 'empty' if not request.args.get('post_filter') }}">
  <div class="col-sm-12">
      <div class="search-query-filters-header">
          {{_('Query filter')}}:
      </div>
      <div class="search-query-filters-body">
          <span class="search-query-filters-text">
              {{request.args.get('post_filter', '')}}
          </span>
          <button class="btn btn-link search-query-filters-edit">
              <i class="fa fa-pencil-square-o"></i>
          </button>
      </div>
  </div>
</div>
{%- endblock search_query_filters -%}
{%- block search_form_flashed_messages -%}
{%- for category, msg in get_flashed_messages(with_categories=True,
                                             category_filter=['websearch-after-search-form']) %}
<div class="row">
  <div class="col-md-12">
    {{ msg|safe }}
  </div>
</div>
  {%- endfor %}
{%- endblock search_form_flashed_messages -%}

{%- endblock search_form_body -%}
{%- endblock search_form -%}
