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.rhtml 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <h2><%= l(:label_search) %></h2>
  2. <div class="box">
  3. <% form_tag({}, :method => :get) do %>
  4. <p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
  5. <%= javascript_tag "Field.focus('search-input')" %>
  6. <% @object_types.each do |t| %>
  7. <label><%= check_box_tag t, 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%></label>
  8. <% end %>
  9. <br />
  10. <label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
  11. <label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label>
  12. </p>
  13. <%= submit_tag l(:button_submit), :name => 'submit' %>
  14. <% end %>
  15. </div>
  16. <% if @results %>
  17. <h3><%= l(:label_result_plural) %></h3>
  18. <ul>
  19. <% @results.each do |e| %>
  20. <li><p><%= link_to highlight_tokens(truncate(e.event_title, 255), @tokens), e.event_url %><br />
  21. <%= highlight_tokens(e.event_description, @tokens) %><br />
  22. <span class="author"><%= format_time(e.event_datetime) %></span></p></li>
  23. <% end %>
  24. </ul>
  25. <% end %>
  26. <p><center>
  27. <% if @pagination_previous_date %>
  28. <%= link_to_remote ('&#171; ' + l(:label_previous)),
  29. {:update => :content,
  30. :url => params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))
  31. }, :href => url_for(params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))) %>&nbsp;
  32. <% end %>
  33. <% if @pagination_next_date %>
  34. <%= link_to_remote (l(:label_next) + ' &#187;'),
  35. {:update => :content,
  36. :url => params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))
  37. }, :href => url_for(params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))) %>
  38. <% end %>
  39. </center></p>
  40. <% html_title(l(:label_search)) -%>