OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/views/backlogs_global/statistics.rhtml

47 lines
2.1 KiB

<%- content_for :header_tags do %>
<%= stylesheet_link_tag 'statistics', 'smoothness/jquery-ui-1.8rc3.custom.css', :plugin => 'redmine_backlogs' %>
<%= javascript_include_tag 'jquery-1.4.2.min.js', 'jquery-ui-1.8rc3.custom.min.js', :plugin => 'redmine_backlogs' %>
<%- end %>
<script>
var $j = jQuery.noConflict();
$j(document).ready(function(){
$j("#projects").accordion({ collapsible: true, header: 'h3'});
});
</script>
<div id="projects">
<% @projects.each do |project| %>
<% stats = project.scrum_statistics %>
<h3><a href="#"><span class="score score_<%= stats[:score][:score] %>"><%= stats[:score][:score] %></span> <%= project.name %></a> </h3>
<div>
<% if stats[:velocity] %>
<%= l(:label_sprint_velocity, { :velocity => stats[:velocity], :sprints => stats[:sprints].length, :days => stats[:average_days_per_sprint]}) %><br/>
<% end %>
<h4><%= l(:backlogs_product_backlog) %></h4>
<%= link_to(l(:backlogs_product_backlog), { :controller => 'backlogs', :action => 'select_issues', :project_id => project }) %><br/>
<% if stats[:active_sprint] || stats[:sprints] %>
<h4><%= l(:backlogs_sprints) %></h4>
<% if stats[:active_sprint] %>
<%= link_to(stats[:active_sprint].name, {
:controller => 'backlogs',
:action => 'select_issues',
:project_id => project,
:sprint_id => stats[:active_sprint].id }) %> (<%= l(:backlogs_active) %>)<br/>
<% end %>
<% if stats[:sprints] %>
<% stats[:sprints].each do |sprint| %>
<%= link_to(sprint.name, { :controller => 'backlogs', :action => 'select_issues', :project_id => project, :sprint_id => sprint.id }) %><br/>
<% end %>
<% end %>
<% end %>
<% stats[:score][:errors].each do |e| %>
<ul>
<li><%= e %></li>
</ul>
<% end %>
</div>
<% end %>
</div>