diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-20 17:26:07 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-20 17:26:07 +0000 |
commit | be2b8a62f4d0d8bf413a5583fe644bd41a8ebf04 (patch) | |
tree | 95fe7f273935739e1ffa82be16cee93927a4c054 /app/views/search | |
parent | 83baccb71ac0e609ce72ebf322f73884548a9ba5 (diff) | |
download | redmine-be2b8a62f4d0d8bf413a5583fe644bd41a8ebf04.tar.gz redmine-be2b8a62f4d0d8bf413a5583fe644bd41a8ebf04.zip |
Search engine: display total results count (#906) and count by result type.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1681 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/search')
-rw-r--r-- | app/views/search/index.rhtml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/views/search/index.rhtml b/app/views/search/index.rhtml index b5cea4645..cb5b70a4c 100644 --- a/app/views/search/index.rhtml +++ b/app/views/search/index.rhtml @@ -10,7 +10,7 @@ </p>
<p>
<% @object_types.each do |t| %>
-<label><%= check_box_tag t, 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%></label>
+<label><%= check_box_tag t, 1, @scope.include?(t) %> <%= type_label(t) %></label>
<% end %>
</p>
@@ -19,12 +19,16 @@ </div>
<% if @results %>
- <h3><%= l(:label_result_plural) %></h3>
+ <div id="search-results-counts">
+ <%= render_results_by_type(@results_by_type) unless @scope.size == 1 %>
+ </div>
+
+ <h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3>
<dl id="search-results">
<% @results.each do |e| %>
<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, 255), @tokens), e.event_url %></dt>
<dd><span class="description"><%= highlight_tokens(e.event_description, @tokens) %></span>
- <span class="author"><%= format_time(e.event_datetime) %></span><dd>
+ <span class="author"><%= format_time(e.event_datetime) %></span></dd>
<% end %>
</dl>
<% end %>
|