##// END OF EJS Templates
Search engine:...
Jean-Philippe Lang -
r828:74ecb37be657
parent child
Show More
@@ -26,7 +26,12 module SearchHelper
26 result << '...'
26 result << '...'
27 break
27 break
28 end
28 end
29 result << (i.even? ? h(words.length > 100 ? "#{words[0..44]} ... #{words[-45..-1]}" : words) : content_tag('span', h(words), :class => 'highlight'))
29 if i.even?
30 result << h(words.length > 100 ? "#{words[0..44]} ... #{words[-45..-1]}" : words)
31 else
32 t = (tokens.index(words.downcase) || 0) % 4
33 result << content_tag('span', h(words), :class => "highlight token-#{t}")
34 end
30 end
35 end
31 result
36 result
32 end
37 end
@@ -9,7 +9,7
9 <label><%= check_box_tag t, 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%></label>
9 <label><%= check_box_tag t, 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%></label>
10 <% end %>
10 <% end %>
11 <br />
11 <br />
12 <%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></p>
12 <label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label></p>
13 <%= submit_tag l(:button_submit), :name => 'submit' %>
13 <%= submit_tag l(:button_submit), :name => 'submit' %>
14 <% end %>
14 <% end %>
15 </div>
15 </div>
@@ -83,6 +83,9 table p {margin:0;}
83 .even {background-color: #fff;}
83 .even {background-color: #fff;}
84
84
85 .highlight { background-color: #FCFD8D;}
85 .highlight { background-color: #FCFD8D;}
86 .highlight.token-1 { background-color: #faa;}
87 .highlight.token-2 { background-color: #afa;}
88 .highlight.token-3 { background-color: #aaf;}
86
89
87 .box{
90 .box{
88 padding:6px;
91 padding:6px;
General Comments 0
You need to be logged in to leave comments. Login now