You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html.erb 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <h2><%= l(:label_search) %></h2>
  2. <div class="box">
  3. <%= form_tag({}, :method => :get) do %>
  4. <%= label_tag "search-input", l(:description_search), :class => "hidden-for-sighted" %>
  5. <p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
  6. <%= javascript_tag "Field.focus('search-input')" %>
  7. <%= project_select_tag %>
  8. <%= hidden_field_tag 'all_words', '', :id => nil %>
  9. <label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
  10. <%= hidden_field_tag 'titles_only', '', :id => nil %>
  11. <label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label>
  12. </p>
  13. <p>
  14. <% @object_types.each do |t| %>
  15. <label><%= check_box_tag t, 1, @scope.include?(t) %> <%= type_label(t) %></label>
  16. <% end %>
  17. </p>
  18. <p><%= submit_tag l(:button_submit), :name => 'submit' %></p>
  19. <% end %>
  20. </div>
  21. <% if @results %>
  22. <div id="search-results-counts">
  23. <%= render_results_by_type(@results_by_type) unless @scope.size == 1 %>
  24. </div>
  25. <h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3>
  26. <dl id="search-results">
  27. <% @results.each do |e| %>
  28. <dt class="<%= e.event_type %>"><%= content_tag('span', h(e.project), :class => 'project') unless @project == e.project %> <%= link_to highlight_tokens(truncate(h(e.event_title), :length => 255), @tokens), e.event_url %></dt>
  29. <dd><span class="description"><%= highlight_tokens(h(e.event_description), @tokens) %></span>
  30. <span class="author"><%= format_time(e.event_datetime) %></span></dd>
  31. <% end %>
  32. </dl>
  33. <% end %>
  34. <p><center>
  35. <% if @pagination_previous_date %>
  36. <%= link_to_content_update("\xc2\xab " + l(:label_previous),
  37. params.merge(:previous => 1,
  38. :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))) %>&nbsp;
  39. <% end %>
  40. <% if @pagination_next_date %>
  41. <%= link_to_content_update(l(:label_next) + " \xc2\xbb",
  42. params.merge(:previous => nil,
  43. :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))) %>
  44. <% end %>
  45. </center></p>
  46. <% html_title(l(:label_search)) -%>