sanger/sequencescape

View on GitHub
app/views/searches/index.html.erb

Summary

Maintainability
Test Coverage

<% add :about, "You can search for studies, samples and assets here." -%>

<%= page_title 'Search', @query %>

<%= form_tag searches_path, method: :get, class: 'search-form' do -%>
  <%= label_tag 'q', 'Search for' %>
  <%= select_tag :type, options_for_select(search_options, params[:type]||""), id: 'layout_search_options' %>
  <%= search_field_tag "q" %>
  <%= submit_tag "Go" %>
<% end %>

<% unless params["q"].blank? -%>
  <div id="results">
    <%= render partial: "search" %>
  </div>
<% end -%>

<div class="response-timers">
  <dl>
    <dt>Search Took</dt><dd><%= @search_took %> s</dd>
    <dt>Render Took</dt><dd><%= Time.now - @render_start %> s</dd>
  </dl>
</div>