<%= form_tag collection_url,
  :method => :get, :html => {:class => 'form-inline'} do  %>

  <div class="input-prepend">
    <span class="add-on"><i class="icon-search"></i></span>
    <%= text_field_tag :query, params[:query], :class => "input-xxlarge" %>
  </div>
  <%= submit_tag 'Search', :class => "btn search-btn"%>
<% end %>


<%= form_tag collection_url,
  :method => :get, :html => {:class => 'form-inline'} do  %>

  <% if params[:type].present? %>
    <%= hidden_field_tag :type, params[:type] %>
  <% end %>

  <div class="input-prepend">
    <span class="add-on"><i class="icon-search"></i></span>
    <%= text_field_tag :query, params[:query], :class => "input-xxlarge" %>
  </div>
  <%= submit_tag 'Search', :class => "btn search-btn"%>
<% end %>


Make sure that if there's a type param present to include it in the search. Fixes issue when searching for CITES REGIONS it would search in Countries
Make sure that if there's a type param present to include it in the search. Fixes issue when searching for CITES REGIONS it would search in Countries
