<% global = {} %>
<% @projects.each do |project| %>
<%
stats = project.scrum_statistics
scores = stats.scores
errors = stats.errors('backlogs_')
info = stats.info
global = stats.merge(global, 'backlogs_')
%>
<% if !scores[:velocity_missing] %>
<%= l(:label_sprint_velocity, { :velocity => info[:velocity], :sprints => info[:closed_sprints].length, :days => info[:average_days_per_sprint]}) %>
<% end %>
<%= l(:backlogs_product_backlog) %>
<%= link_to(l(:backlogs_product_backlog), { :controller => 'rb_queries', :action => 'show', :project_id => project }) %>
<% if info[:active_sprint] || info[:closed_sprints] %>
<%= l(:backlogs_sprints) %>
<% if info[:active_sprint] %>
<%= link_to(info[:active_sprint].name, {
:controller => 'rb_queries',
:action => 'show',
:project_id => project,
:sprint_id => info[:active_sprint].id }) %> (<%= l(:backlogs_active) %>)
<% end %>
<% if info[:closed_sprints] %>
<% info[:closed_sprints].each do |sprint| %>
<%= link_to(sprint.name, { :controller => 'rb_queries', :action => 'show', :project_id => project, :sprint_id => sprint.id }) %>
<% end %>
<% end %>
<% end %>
<% errors.each do |e| %>
<% end %>