<% @gantt.view = self %>

<div class="contextual"></div>

<h2><%= @query.new_record? ? l(:label_gantt) : @query.name %></h2>

<% if @query.persisted? && @query.description.present? %>
<%= content_tag('p', @query.description, class: 'subtitle') %>
<% end %>

<%= render partial: 'query_form', locals: {project: @project, query: @query, gantt: @gantt} %>
<%= error_messages_for 'query' %>

<% if @query.valid? %>
<%= render partial: 'chart', locals: {gantt: @gantt, query: @query} %>
<% end %>

<% content_for :sidebar do %>
  <%= render partial: 'issues/sidebar' %>
<% end %>

<% html_title l(:label_gantt) %>

<% content_for :header_tags do %>
  <%= stylesheet_link_tag 'gantt', media: 'all' %>
<% end %>

<%= context_menu %>
