levent/agileista

View on GitHub
app/views/sprints/index.html.erb

Summary

Maintainability
Test Coverage
<% content_for :title, "Sprints - #{@project.name} - Agileista" %>

<%= render "shared/velocity_chart", sprints: @sprints, project: @project, velocity: @velocity %>

<% if @sprints.any? %>
  <div class="row">
    <div class="columns large-24 small-24 medium-24">
      <h2><small>Total:</small> <%= @sprints.size %> <small>Finished:</small> <%= @sprints.finished.size %> <small>Average Velocity:</small> <%= average_velocity(@project) %></h2>
    </div>
  </div>
  <% if @cint_hi && @cint_lo %>
    <div class="row">
      <div class="columns large-24 small-24 medium-24">
        <p><strong>90%</strong> likelihood velocity will be between <strong><%= @cint_lo %></strong> and <strong><%= @cint_hi %></strong>*</p>
      </div>
    </div>
  <% end %>
  <table class="large-24 small-24 medium-24">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
        <th>Points</th>
        <th>Velocity</th>
        <th>From</th>
        <th>To</th>
        <th></th>
        <th></th>
      </tr>
    </thead>
    <tbody>
      <%= render @sprints %>
    </tbody>
  </table>
<% else %>
  <div class="row">
    <div class="columns centered large-12 small-12 medium-12">
      <h2>There are no sprints for this project</h2>
      <h3><%= link_to "Create your first sprint", new_project_sprint_path(@project) %></h3>
    </div>
  </div>
<% end %>