##// END OF EJS Templates
HTML escape at app/views/search/index.rhtml....
Toshi MARUYAMA -
r6228:af8edef9b93e
parent child
Show More
@@ -1,49 +1,49
1 1 <h2><%= l(:label_search) %></h2>
2 2
3 3 <div class="box">
4 4 <% form_tag({}, :method => :get) do %>
5 5 <p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
6 6 <%= javascript_tag "Field.focus('search-input')" %>
7 7 <%= project_select_tag %>
8 8 <%= hidden_field_tag 'all_words', '', :id => nil %>
9 9 <label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
10 10 <%= hidden_field_tag 'titles_only', '', :id => nil %>
11 11 <label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label>
12 12 </p>
13 13 <p>
14 14 <% @object_types.each do |t| %>
15 15 <label><%= check_box_tag t, 1, @scope.include?(t) %> <%= type_label(t) %></label>
16 16 <% end %>
17 17 </p>
18 18
19 19 <p><%= submit_tag l(:button_submit), :name => 'submit' %></p>
20 20 <% end %>
21 21 </div>
22 22
23 23 <% if @results %>
24 24 <div id="search-results-counts">
25 25 <%= render_results_by_type(@results_by_type) unless @scope.size == 1 %>
26 26 </div>
27 27
28 28 <h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3>
29 29 <dl id="search-results">
30 30 <% @results.each do |e| %>
31 <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>
32 <dd><span class="description"><%= highlight_tokens(e.event_description, @tokens) %></span>
31 <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>
32 <dd><span class="description"><%= highlight_tokens(h(e.event_description), @tokens) %></span>
33 33 <span class="author"><%= format_time(e.event_datetime) %></span></dd>
34 34 <% end %>
35 35 </dl>
36 36 <% end %>
37 37
38 38 <p><center>
39 39 <% if @pagination_previous_date %>
40 40 <%= link_to_content_update('&#171; ' + l(:label_previous),
41 41 params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))) %>&nbsp;
42 42 <% end %>
43 43 <% if @pagination_next_date %>
44 44 <%= link_to_content_update(l(:label_next) + ' &#187;',
45 45 params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))) %>
46 46 <% end %>
47 47 </center></p>
48 48
49 49 <% html_title(l(:label_search)) -%>
General Comments 0
You need to be logged in to leave comments. Login now