diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/hooks/_view_report_link.html.erb | 1 | ||||
-rw-r--r-- | app/views/version_reports/_issue_row.html.erb | 14 | ||||
-rw-r--r-- | app/views/version_reports/_main_issue_row.html.erb | 28 | ||||
-rw-r--r-- | app/views/version_reports/_project_row.html.erb | 5 | ||||
-rw-r--r-- | app/views/version_reports/show.html.erb | 9 |
5 files changed, 57 insertions, 0 deletions
diff --git a/app/views/hooks/_view_report_link.html.erb b/app/views/hooks/_view_report_link.html.erb new file mode 100644 index 0000000..fdd59c9 --- /dev/null +++ b/app/views/hooks/_view_report_link.html.erb @@ -0,0 +1 @@ +<br><br><%= link_to 'Time Tracking Report', version_report_path %>
\ No newline at end of file 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> + <%= (" " * 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> </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 |