diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-05 20:45:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-05 20:45:04 +0000 |
commit | 96f83cc8f0f032554f771a59da22303cd473b878 (patch) | |
tree | 355a0d2ed653a5426c59ebf6a1fe65eba024b4d0 /app/views/reports | |
parent | eabc04d8368824965d3ac8de3fa84502e9c05d38 (diff) | |
download | redmine-96f83cc8f0f032554f771a59da22303cd473b878.tar.gz redmine-96f83cc8f0f032554f771a59da22303cd473b878.zip |
trunk moved from /trunk/redmine to /trunk
git-svn-id: http://redmine.rubyforge.org/svn/trunk@67 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/reports')
-rw-r--r-- | app/views/reports/_details.rhtml | 47 | ||||
-rw-r--r-- | app/views/reports/_simple.rhtml | 36 | ||||
-rw-r--r-- | app/views/reports/issue_report.rhtml | 20 | ||||
-rw-r--r-- | app/views/reports/issue_report_details.rhtml | 7 |
4 files changed, 110 insertions, 0 deletions
diff --git a/app/views/reports/_details.rhtml b/app/views/reports/_details.rhtml new file mode 100644 index 000000000..be4c82e77 --- /dev/null +++ b/app/views/reports/_details.rhtml @@ -0,0 +1,47 @@ +<% if @statuses.empty? or rows.empty? %>
+ <p><i><%=l(:label_no_data)%></i></p>
+<% else %>
+<% col_width = 70 / (@statuses.length+3) %>
+<table class="reportTableContent">
+<tr>
+<td width="25%"></td>
+<% for status in @statuses %>
+ <td align="center" width="<%= col_width %>%" bgcolor="#<%= status.html_color %>"><small><%= status.name %></small></td>
+<% end %>
+<td align="center" width="<%= col_width %>%"><strong><%=l(:label_open_issues_plural)%></strong></td>
+<td align="center" width="<%= col_width %>%"><strong><%=l(:label_closed_issues_plural)%></strong></td>
+<td align="center" width="<%= col_width %>%"><strong><%=l(:label_total)%></strong></td>
+</tr>
+
+<% for row in rows %>
+<tr class="<%= cycle("odd", "even") %>">
+ <td><%= link_to row.name, :controller => 'projects', :action => 'list_issues', :id => @project,
+ :set_filter => 1,
+ "#{field_name}" => row.id %></td>
+ <% for status in @statuses %>
+ <td align="center"><%= link_to (aggregate data, { field_name => row.id, "status_id" => status.id }),
+ :controller => 'projects', :action => 'list_issues', :id => @project,
+ :set_filter => 1,
+ "status_id" => status.id,
+ "#{field_name}" => row.id %></td>
+ <% end %>
+ <td align="center"><%= link_to (aggregate data, { field_name => row.id, "closed" => 0 }),
+ :controller => 'projects', :action => 'list_issues', :id => @project,
+ :set_filter => 1,
+ "#{field_name}" => row.id,
+ "status_id" => "O" %></td>
+ <td align="center"><%= link_to (aggregate data, { field_name => row.id, "closed" => 1 }),
+ :controller => 'projects', :action => 'list_issues', :id => @project,
+ :set_filter => 1,
+ "#{field_name}" => row.id,
+ "status_id" => "C" %></td>
+ <td align="center"><%= link_to (aggregate data, { field_name => row.id }),
+ :controller => 'projects', :action => 'list_issues', :id => @project,
+ :set_filter => 1,
+ "#{field_name}" => row.id,
+ "status_id" => "A" %></td>
+<% end %>
+</tr>
+</table>
+<% end
+ reset_cycle %>
\ No newline at end of file diff --git a/app/views/reports/_simple.rhtml b/app/views/reports/_simple.rhtml new file mode 100644 index 000000000..3be1281c5 --- /dev/null +++ b/app/views/reports/_simple.rhtml @@ -0,0 +1,36 @@ +<% if @statuses.empty? or rows.empty? %>
+ <p><i><%=l(:label_no_data)%></i></p>
+<% else %>
+<table class="reportTableContent">
+<tr>
+<td width="25%"></td>
+<td align="center" width="25%"><%=l(:label_open_issues_plural)%></td>
+<td align="center" width="25%"><%=l(:label_closed_issues_plural)%></td>
+<td align="center" width="25%"><%=l(:label_total)%></td>
+</tr>
+
+<% for row in rows %>
+<tr class="<%= cycle("odd", "even") %>">
+ <td><%= link_to row.name, :controller => 'projects', :action => 'list_issues', :id => @project,
+ :set_filter => 1,
+ "#{field_name}" => row.id %></td>
+ <td align="center"><%= link_to (aggregate data, { field_name => row.id, "closed" => 0 }),
+ :controller => 'projects', :action => 'list_issues', :id => @project,
+ :set_filter => 1,
+ "#{field_name}" => row.id,
+ "status_id" => "O" %></td>
+ <td align="center"><%= link_to (aggregate data, { field_name => row.id, "closed" => 1 }),
+ :controller => 'projects', :action => 'list_issues', :id => @project,
+ :set_filter => 1,
+ "#{field_name}" => row.id,
+ "status_id" => "C" %></td>
+ <td align="center"><%= link_to (aggregate data, { field_name => row.id }),
+ :controller => 'projects', :action => 'list_issues', :id => @project,
+ :set_filter => 1,
+ "#{field_name}" => row.id,
+ "status_id" => "A" %></td>
+<% end %>
+</tr>
+</table>
+<% end
+ reset_cycle %>
\ No newline at end of file diff --git a/app/views/reports/issue_report.rhtml b/app/views/reports/issue_report.rhtml new file mode 100644 index 000000000..4927186a9 --- /dev/null +++ b/app/views/reports/issue_report.rhtml @@ -0,0 +1,20 @@ +<h2><%=l(:label_report_plural)%></h2>
+
+<div class="splitcontentleft">
+<h3><%=l(:field_tracker)%> <%= link_to image_tag('details'), :detail => 'author' %></h3>
+<%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %>
+<br />
+<h3><%=l(:field_priority)%> <%= link_to image_tag('details'), :detail => 'priority' %></h3>
+<%= render :partial => 'simple', :locals => { :data => @issues_by_priority, :field_name => "priority_id", :rows => @priorities } %>
+<br />
+<h3><%=l(:field_author)%> <%= link_to image_tag('details'), :detail => 'author' %></h3>
+<%= render :partial => 'simple', :locals => { :data => @issues_by_author, :field_name => "author_id", :rows => @authors } %>
+<br />
+</div>
+
+<div class="splitcontentright">
+<h3><%=l(:field_category)%> <%= link_to image_tag('details'), :detail => 'category' %></h3>
+<%= render :partial => 'simple', :locals => { :data => @issues_by_category, :field_name => "category_id", :rows => @categories } %>
+<br />
+</div>
+
diff --git a/app/views/reports/issue_report_details.rhtml b/app/views/reports/issue_report_details.rhtml new file mode 100644 index 000000000..e37d38649 --- /dev/null +++ b/app/views/reports/issue_report_details.rhtml @@ -0,0 +1,7 @@ +<h2><%=l(:label_report_plural)%></h2>
+
+<h3><%=@report_title%></h3>
+<%= render :partial => 'details', :locals => { :data => @data, :field_name => @field, :rows => @rows } %>
+<br />
+<%= link_to l(:button_back), :action => 'issue_report' %>
+
|