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/rb_statistics/show.html.erb

67 lines
2.7 KiB

15 years ago
<%- content_for :header_tags do %>
<%= stylesheet_link_tag 'rb_default/statistics', 'rb_default/jquery-ui', :plugin => 'redmine_backlogs' %>
15 years ago
<%= 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();
15 years ago
$j(document).ready(function(){
15 years ago
$j("#projects").accordion({ collapsible: true, header: 'h3'});
15 years ago
});
</script>
<div id="projects">
<% global = {} %>
15 years ago
<% @projects.each do |project| %>
<%
stats = project.scrum_statistics
scores = stats.scores
errors = stats.errors('backlogs_')
info = stats.info
global = stats.merge(global, 'backlogs_')
%>
<h3><a href="#"><span class="score score_<%= stats.score %>"><%= stats.score %></span> <%= project.name %></a> </h3>
15 years ago
<div>
<% if !scores[:velocity_missing] %>
<%= l(:label_sprint_velocity, { :velocity => info[:velocity], :sprints => info[:closed_sprints].length, :days => info[:average_days_per_sprint]}) %><br/>
<% end %>
15 years ago
<h4><%= l(:backlogs_product_backlog) %></h4>
<%= link_to(l(:backlogs_product_backlog), { :controller => 'rb_queries', :action => 'show', :project_id => project }) %><br/>
<% if info[:active_sprint] || info[:closed_sprints] %>
15 years ago
<h4><%= l(:backlogs_sprints) %></h4>
<% if info[:active_sprint] %>
<%= link_to(info[:active_sprint].name, {
:controller => 'rb_queries',
:action => 'show',
15 years ago
:project_id => project,
:sprint_id => info[:active_sprint].id }) %> (<%= l(:backlogs_active) %>)<br/>
15 years ago
<% 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 }) %><br/>
15 years ago
<% end %>
<% end %>
<% end %>
<% errors.each do |e| %>
15 years ago
<ul>
<li><%= l(e) %></li>
15 years ago
</ul>
15 years ago
<% end %>
</div>
<% end %>
</div>
<% if @projects.size > 0 %>
<h3>Overall</h3>
14 years ago
<table>
<% global.each_pair do |e, n| %>
14 years ago
<tr>
<td><%= l(e) %></td>
<td><b><%= (n * 100) / @projects.size %>%</b></td>
<td><span class="score_<%= 10 - ((n * 10) / @projects.size) %>">&nbsp;&nbsp;</td>
</tr>
<% end %>
14 years ago
</table>
<% end %>