<%= l(:label_search) %>

<% form_tag({}, :method => :get) do %> <%= label_tag "search-input", l(:description_search), :class => "hidden-for-sighted" %>

<%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %> <%= javascript_tag "Field.focus('search-input')" %> <%= project_select_tag %>

<% @object_types.each do |t| %> <% end %>

<%= submit_tag l(:button_submit), :name => 'submit' %>

<% end %>
<% if @results %>
<%= render_results_by_type(@results_by_type) unless @scope.size == 1 %>

<%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)

<%= render :partial => 'pagination', :locals => {:pagination_previous_date => @pagination_previous_date, :pagination_next_date => @pagination_next_date } %>
<% @results.each do |e| %>
<% if e.project != @project %> <%= e.project %> <% end %> <%= link_to highlight_tokens(truncate(e.event_title, :length => 255), @tokens), e.event_url %>
<%= highlight_tokens(h(e.event_description), @tokens) %> <%= format_time(e.event_datetime) %>
<% end %>
<% end %> <%= render :partial => 'pagination', :locals => {:pagination_previous_date => @pagination_previous_date, :pagination_next_date => @pagination_next_date } %> <% html_title(l(:label_search)) -%>