summaryrefslogtreecommitdiff
path: root/app/views/version_reports
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/version_reports')
-rw-r--r--app/views/version_reports/_issue_row.html.erb14
-rw-r--r--app/views/version_reports/_main_issue_row.html.erb28
-rw-r--r--app/views/version_reports/_project_row.html.erb5
-rw-r--r--app/views/version_reports/show.html.erb9
4 files changed, 56 insertions, 0 deletions
diff --git a/app/views/version_reports/_issue_row.html.erb b/app/views/version_reports/_issue_row.html.erb
new file mode 100644
index 0000000..3ff7020
--- /dev/null
+++ b/app/views/version_reports/_issue_row.html.erb
@@ -0,0 +1,14 @@
+<tr>
+ <td>
+ <%= ("&nbsp;" * 4 * indent).html_safe %>
+ <%= display_issue(issue, :tracker) %>
+ </td>
+ <td>
+ <%= l_hours(issue.total_spent_hours) %>
+ </td>
+</tr>
+<%- if issue.children.any? -%>
+<%- issue.children.each do |child| -%>
+<%= render :partial => 'issue_row', :locals => {:issue => child, :indent => indent+1} %>
+<%- end -%>
+<%- end -%>
diff --git a/app/views/version_reports/_main_issue_row.html.erb b/app/views/version_reports/_main_issue_row.html.erb
new file mode 100644
index 0000000..32518e9
--- /dev/null
+++ b/app/views/version_reports/_main_issue_row.html.erb
@@ -0,0 +1,28 @@
+<tr><td>&nbsp;</td></tr>
+<tr>
+ <td>
+ <h1><%= display_issue(issue) %></h1>
+ </td>
+ <td>
+ <%= l_hours(issue.total_spent_hours) %>
+ </td>
+</tr>
+<tr>
+ <td colspan="2">
+ From <%= issue.start_date %> to <%= issue.due_date %>.
+ <div class="wiki">
+ <%= textilizable issue, :description %>
+ </div>
+ </td>
+</tr>
+
+<%- project = nil -%>
+<%- if issue.children.any? -%>
+<%- issue.children.sort{|a,b| a.project.name <=> b.project.name}.each do |child| -%>
+<%- if child.project.name != project -%>
+<%- project = child.project.name -%>
+<%= render :partial => 'project_row', :locals => {:project => child.project} %>
+<%- end -%>
+<%= render :partial => 'issue_row', :locals => {:issue => child, :indent => 1} %>
+<%- end -%>
+<%- end -%>
diff --git a/app/views/version_reports/_project_row.html.erb b/app/views/version_reports/_project_row.html.erb
new file mode 100644
index 0000000..ac0acd2
--- /dev/null
+++ b/app/views/version_reports/_project_row.html.erb
@@ -0,0 +1,5 @@
+<tr>
+ <td colspan="2">
+ <b><%= project.name %></b>
+ </td>
+</tr>
diff --git a/app/views/version_reports/show.html.erb b/app/views/version_reports/show.html.erb
new file mode 100644
index 0000000..09c2b20
--- /dev/null
+++ b/app/views/version_reports/show.html.erb
@@ -0,0 +1,9 @@
+<% html_title @version.name %>
+
+<table>
+<% if @issues.present? %>
+ <%- @issues.each do |issue| -%>
+ <%= render :partial => 'main_issue_row', :locals => {:issue => issue} %>
+ <% end %>
+<% end %>
+</table> \ No newline at end of file