<% content_for :title, @board.name %>

<%= render 'poller_alerts' unless request.xhr? %>

<%# FIXME: this is the current convention for modal rendering in Hera. We
  #   could probably improve it by making use of a single :content_for block %>
<% content_for :board_rename_modal do %>
  <%= render partial: 'boards/modals/board_rename_form', locals: { board: @board } %>
<% end %>

<% content_for :breadcrumbs do %>
  <nav>
    <ol class="breadcrumb">
      <li class="breadcrumb-item">
        <%= link_to current_project.name, project_path(current_project) %>
      </li>
      <li class="breadcrumb-item">
        <%= link_to 'Methodologies', project_boards_path(current_project) %>
      </li>
      <li class="breadcrumb-item active"><%= @board.name %></li>
    </ol>
  </nav>
<% end %>

<% content_for :list_new_modal do %>
  <%= render 'boards/modals/new_list_form' %>
<% end %>
<% @board.ordered_lists.each do |list| %>
  <% content_for :list_rename_modal do %>
    <%= render partial: 'boards/modals/list_rename_form', locals: { board: @board, list: list } %>
  <% end %>
<% end %>

<div class="content-container">
  <h4 class="header-underline">
    <span class="text-truncate" title="<%= @board.name %>"><%= @board.name %></span>
    <%= render partial: 'actions' %>
  </h4>
  <%= render @board %>
</div>
