<% agile_action ||= '' %>

<% content_for :easy_page_layout_service_box_primary_actions do %>
  <%= link_to l(:label_agile_sprint_new), new_project_easy_sprint_path(project), :title => l(:label_agile_sprint_new), :class => 'icon icon-add button-positive' %>
<% end %>

<% content_for :easy_page_layout_service_box do %>
  <%= form_tag(easy_agile_board_path(project), :id => 'easy_sprint_form', :method => :get) do %>
    <%= hidden_field_tag('agile_action', agile_action, :id => 'agile_action') if !agile_action.blank? %>
    <%= easy_autocomplete_tag('sprint_id',
                              {:name => easy_sprint.nil? ? l(:label_easy_agile_board_select_sprint) : easy_sprint.name, :id => easy_sprint.nil? ? '' : easy_sprint.id},
                              autocomplete_project_easy_sprints_path(project, :format => :json),
                              :root_element => 'easy_sprints', :html_options => {:id => 'sprint_id'},
                              :onchange => "$('#easy_sprint_form').submit()"
        ) -%>
  <% end %>
<% end %>
<div class="agile-board-sidebar">
  <ul>
    <% if easy_sprint %>
      <li>
        <%= link_to l(:label_agile_sprint), easy_agile_board_path(project, :sprint_id => easy_sprint), :title => l(:label_agile_sprint_reload), :class => 'icon icon-bullet-list button' %>
      </li>
      <!--li>
        <%#= link_to_function(l(:label_issue_watchers), 'toggleCoworkers()', :title => l(:label_issue_watchers), :class => 'icon icon-group button') %>
      </li-->
      <li>
        <%= link_to(l(:label_project_backlog), easy_agile_board_backlog_path(project, easy_sprint), :class => 'icon icon-templates button', :title => l(:label_project_backlog)) %>
      </li>
      <li>
        <%= link_to(l(:label_easy_agile_board_charts), easy_agile_board_burndown_chart_path(project, easy_sprint), :class => 'icon icon-stats button', :title => l(:label_easy_agile_board_charts)) %>
      </li>
      <!--li>
        <%# easy_modal_selector_link_to_fullscreen('agile_board_container', {:button_fullscreen_label => l(:button_fullscreen), :class => 'icon icon-fullscreen button', :title => l(:easy_agile_show_sprint_fullscreen)}) %>
      </li-->
    <% end %>
    <li>
      <%= link_to(l(:button_settings), easy_agile_board_settings_path(project), :class => 'icon icon-settings button', :title => l(:button_settings))%>
    </li>
  </ul>
</div>
