/
index.html.erb
85 lines (77 loc) · 2.78 KB
/
index.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<% @page_title = "Stories for #{@iteration.name}" %>
<h2><%=h @page_title %></h2>
<div id="actions">
<ul>
<li><%= link_to 'Back', project_path(@iteration.project) %></li>
<li><%= link_to 'Show', project_iteration_path(@iteration.project, @iteration) %></li>
</ul>
</div>
<p>
<%= @total_assigned_points %>/<%= @iteration.velocity %> points assigned (<%=((@total_assigned_points.to_f/@iteration.velocity.to_f)*100).to_i%>%) -
<% case (@assignment_difference <=> 0)
when -1 -%>
Undersubscribed by <%= 0 - @assignment_difference%> points
<% when 1 -%>
Oversubscribed by <%=@assignment_difference %> points
<% when 0 -%>
Spot on!
<% end -%>
</p>
<p><%= link_to 'New story', new_iteration_story_path(@iteration) %></p>
<div id="columns">
<div id="completed-stories-bg" class="column-bg">
<div id="qa-stories-bg" class="column-bg">
<div id="in-progress-stories-bg" class="column-bg">
<div id="new-stories-bg" class="column-bg">
<div id="new-stories" class="column">
<!-- Column one start -->
<h3>New stories <%=points_label(@backlog_stories)%></h3>
<% if @backlog_stories.empty? %>
<p>There are currently no stories for this iteration, <%=link_to "add story", new_iteration_story_path(@iteration) %></p>
<% else %>
<% @backlog_stories.each do |story| %>
<%= render :partial => "story", :locals => { :story => story } %>
<% end %>
<% end %>
<!-- Column one end -->
</div>
<div id="in-progress-stories" class="column">
<!-- Column two start -->
<h3>In progress stories <%=points_label(@current_stories)%></h3>
<% @current_stories.each do |story| %>
<%= render :partial => "story", :locals => { :story => story } %>
<% end %>
<!-- Column two end -->
</div>
<div id="qa-stories" class="column">
<!-- Column three start -->
<h3>Quality assurance stories <%=points_label(@quality_assurance_stories)%></h3>
<% @quality_assurance_stories.each do |story| %>
<%= render :partial => "story", :locals => { :story => story } %>
<% end %>
<!-- Column three end -->
</div>
<div id="completed-stories" class="column">
<!-- Column four start -->
<h3>Completed stories <%=points_label(@completed_stories)%></h3>
<% @completed_stories.each do |story| %>
<%= render :partial => "story", :locals => { :story => story } %>
<% end %>
<!-- Column four end -->
</div>
</div>
</div>
</div>
</div>
</div>
<% content_for :page_end do -%>
<script type="text/javascript">
document.observe("dom:loaded", function() {
$$("#columns .heading").each(function(e) {
e.observe('click', function(){
Branston.Utils.toggleStoryDetails(e);
});
});
});
</script>
<% end %>