{% set input_class = input_class or 'search-giant' %}
<form class="dataset-search {{ form_class }}" method="GET" data-module="select-switch">
  <span class="control-group {{ input_class }}">
    <input type="text" class="search" name="q" value="{{ q }}" autocomplete="off" placeholder="{{ placeholder }}" />
    <button type="submit"><i class="icon-search"></i> <span>{{ _('Search') }}</span></button>
  </span>
  <span class="form-select control-group control-order-by">
    <label for="field-order-by">{{ _('Order by') }}</label>
    <select id="field-order-by" name="sort">
      {% set sort_items = [(_('Name Ascending'), 'name asc'), (_('Name Descending'), 'name desc')] %}
      {% for item in sort_items + (extra_sort or []) %}
        <option value="{{ item[1] }}"{% if sort==item[1] %} selected="selected"{% endif %}>{{ item[0] }}</option>
      {% endfor %}
    </select>
    <button class="btn js-hide" type="submit">{{ _('Go') }}</button>
  </span>
</form>
