tracks/app/views/search/results.html.erb

29 lines
1.9 KiB
Text
Raw Normal View History

<% if @count == 0 -%>
<div class="message"><p><%= t('search.no_results') %></p></div>
<% else -%>
2010-12-05 12:13:29 +01:00
2013-09-25 15:38:51 +02:00
<%= render :layout => 'show_results_collection', :object => @results[:todos], :locals => { :collection_name => "found-todos", :collection_title => t('search.todos_matching_query')} do %>
<%= render :partial => "todos/todo", :collection => @results[:todos], :locals => { :parent_container_type => 'search', :suppress_context => false, :suppress_project => false, :suppress_edit_button => false } %>
<% end -%>
2013-09-25 15:38:51 +02:00
<%= render :layout => 'show_results_collection', :object => @results[:projects], :locals => { :collection_name => "found-project", :collection_title => t('search.projects_matching_query')} do %>
<%= render :partial => "projects/project_listing", :collection => @results[:projects], :locals => { :suppress_drag_handle => true, :suppress_edit_button => true, :suppress_delete_button => true } %>
<% end -%>
2013-09-25 15:38:51 +02:00
<%= render :layout => 'show_results_collection', :object => @results[:notes], :locals => { :collection_name => "found-notes", :collection_title => t('search.notes_matching_query')} do %>
<%= render :partial => "notes/notes_summary", :collection=> @results[:notes] %>
<% end -%>
2013-09-25 15:38:51 +02:00
<%= render :layout => 'show_results_collection', :object => @results[:contexts], :locals => { :collection_name => "found-contexts", :collection_title => t('search.contexts_matching_query')} do %>
<%= render :partial => "contexts/context_listing", :collection => @results[:contexts], :locals => { :suppress_drag_handle => true, :suppress_edit_button => true } %>
<% end -%>
2013-09-25 15:38:51 +02:00
<%= render :layout => 'show_results_collection', :object => @results[:tags], :locals => { :collection_name => "found-tags", :collection_title => t('search.tags_matching_query')} do %>
<span class="tags"><% @results[:tags].each do |tag| -%>
2012-07-15 20:45:37 +02:00
<span class="tag"><%= link_to tag.name, tag_path(tag.name) -%></span>
<% end %>
2010-12-05 12:13:29 +01:00
</span><br/><br/>
<% end -%>
<% end -%>