{#
# This file is part of Invenio.
# Copyright (C) 2014 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_ctrls_input -%}
<input autocomplete="off"
       data-items="4"
       name="p"
       class="form-control"
       type="text"
       tabindex="1"
       value="{{ request.args.get('p', '') }}"
       {%- if request.endpoint == 'collections.index' %}
       autofocus
       {%- endif -%}/>
{%- endblock -%}

{%- block search_form_ctrls_settings -%}
<span class="input-group-btn invenio-collapsable-tabs" data-toggle="buttons">
  <a href="#"
     class="btn btn-default right-not-rounded left-not-rounded"
     data-toggle="collapse"
     data-target="#navbar-bottom"> {# title=FIXME #}
    <i class="glyphicon glyphicon-plus"></i>
    <b class="caret"></b>
  </a>
  <a href="#"
     class="btn btn-default right-not-rounded left-not-rounded"
     data-toggle="collapse"
     data-target="#navbar-bottom2"> {# title=FIXME #}
    <i class="glyphicon glyphicon-cog"></i>
    <b class="caret"></b>
  </a>
</span>
{%- endblock -%}

{%- block search_form_ctrls_button -%}
<span class="input-group-btn">
  <button name="action_search" type="submit" class="btn btn-primary btn-inline-icon-hide-sm">
    <i class="glyphicon glyphicon-search"></i><span>&nbsp;{{ _("Search") }}</span>
  </button>
</span>
{%- endblock -%}
