<%= link_to l(:label_agile_charts), @project ? project_agile_charts_path(project_id: @project) : agile_charts_path, class: 'icon icon-stats agile_charts_link', onclick: 'chartLinkGenerator();' %>
<% if !@query.new_record? && @query.editable_by?(User.current) %>
<%= link_to l(:button_edit), edit_agile_query_path(@query), class: 'icon icon-edit' %>
<%= delete_link agile_query_path(@query) %>
<% end %>
<% html_title(@query.new_record? ? l(:label_agile_board) : @query.name) %>
<%= form_tag({ controller: 'agile_boards', action: 'index', project_id: @project }, method: :get, id: 'query_form', onsubmit: 'DisableNullFields()') do %>
<%= @query.new_record? ? l(:label_agile_board) : h(@query.name) %>
<%= text_field_tag(:search, '', :id => 'agile_live_search', :class => 'live_search_field', :placeholder => l(:label_cards_search)) %>
<% end %>
<%= error_messages_for 'query' %>
<% if @query.valid? %>
<% empty_data = @issues.empty? || @board_columns.empty? %>
<% if empty_data %>
<%= l(:label_no_data) %>
<% else %>
<% if @query.truncated %>
<%= l(:label_agile_board_truncated, :max => RedmineAgile.board_items_limit) %>
<% end %>
<%= render :partial => 'board' %>
<% end %>
<% end %>
<% content_for :sidebar do %>
<%= render :partial => 'upgrade_to_pro' %>
<%= render :partial => 'issues_links' %>
<% if @project && @project.assignable_users.any? %>
<%= render :partial => 'members' %>
<% end %>
<%= render :partial => 'agile_charts/agile_charts' %>
<% end %>
<% html_title l(:label_agile_board) %>
<% content_for :header_tags do %>
<%= javascript_include_tag "redmine_agile", plugin: 'redmine_agile' %>
<%= javascript_include_tag "jquery.ui.touch-punch.js", plugin: 'redmine_agile' %>
<%= stylesheet_link_tag 'context_menu' %>
<%= stylesheet_link_tag "redmine_agile.css", plugin: "redmine_agile", media: "print" %>
<% end %>
<% if User.current.allowed_to?(:edit_issues, @project, global: true) %>
<% end %>