To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / search / index.rhtml @ 441:cbce1fd3b1b7
History | View | Annotate | Download (1.82 KB)
| 1 | 0:513646585e45 | Chris | <h2><%= l(:label_search) %></h2> |
|---|---|---|---|
| 2 | |||
| 3 | <div class="box"> |
||
| 4 | <% form_tag({}, :method => :get) do %>
|
||
| 5 | <p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %> |
||
| 6 | <%= javascript_tag "Field.focus('search-input')" %>
|
||
| 7 | <%= project_select_tag %>
|
||
| 8 | <label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label> |
||
| 9 | <label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label> |
||
| 10 | </p>
|
||
| 11 | <p>
|
||
| 12 | <% @object_types.each do |t| %>
|
||
| 13 | <label><%= check_box_tag t, 1, @scope.include?(t) %> <%= type_label(t) %></label> |
||
| 14 | <% end %>
|
||
| 15 | </p>
|
||
| 16 | |||
| 17 | <p><%= submit_tag l(:button_submit), :name => 'submit' %></p> |
||
| 18 | <% end %>
|
||
| 19 | </div>
|
||
| 20 | |||
| 21 | <% if @results %>
|
||
| 22 | <div id="search-results-counts"> |
||
| 23 | <%= render_results_by_type(@results_by_type) unless @scope.size == 1 %>
|
||
| 24 | </div>
|
||
| 25 | |||
| 26 | <h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3> |
||
| 27 | <dl id="search-results"> |
||
| 28 | <% @results.each do |e| %>
|
||
| 29 | <dt class="<%= e.event_type %>"><%= content_tag('span', h(e.project), :class => 'project') unless @project == e.project %> <%= link_to highlight_tokens(truncate(e.event_title, :length => 255), @tokens), e.event_url %></dt> |
||
| 30 | <dd><span class="description"><%= highlight_tokens(e.event_description, @tokens) %></span> |
||
| 31 | <span class="author"><%= format_time(e.event_datetime) %></span></dd> |
||
| 32 | <% end %>
|
||
| 33 | </dl>
|
||
| 34 | <% end %>
|
||
| 35 | |||
| 36 | <p><center> |
||
| 37 | <% if @pagination_previous_date %>
|
||
| 38 | 441:cbce1fd3b1b7 | Chris | <%= link_to_content_update('« ' + l(:label_previous),
|
| 39 | params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))) %> |
||
| 40 | 0:513646585e45 | Chris | <% end %>
|
| 41 | <% if @pagination_next_date %>
|
||
| 42 | 441:cbce1fd3b1b7 | Chris | <%= link_to_content_update(l(:label_next) + ' »',
|
| 43 | params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))) %>
|
||
| 44 | 0:513646585e45 | Chris | <% end %>
|
| 45 | </center></p> |
||
| 46 | |||
| 47 | <% html_title(l(:label_search)) -%> |