<%= link_to l(:label_project_new), new_project_path, :class => 'icon icon-add' %>
<%= @query.new_record? ? l(:label_project_plural) : @query.name %>
<%= form_tag(admin_projects_path(@project, nil), :method => :get, :id => 'query_form') do %>
<%= hidden_field_tag 'admin_projects', '1' %>
<%= render :partial => 'queries/query_form' %>
<% end %>
<% if @query.valid? %>
<%if @projects.any? %>
<%= render :partial => 'projects/list', :locals => { :entries => @projects }%>
<% else %>
<%= l(:label_no_data) %>
<% end %>
<% end %>
<% content_for :sidebar do %>
<%= render :partial => 'projects/sidebar' %>
<% end %>