@@ -35,4 +35,9 module ReportsHelper | |||||
35 | a = aggregate data, criteria |
|
35 | a = aggregate data, criteria | |
36 | a > 0 ? link_to(h(a), *args) : '-' |
|
36 | a > 0 ? link_to(h(a), *args) : '-' | |
37 | end |
|
37 | end | |
|
38 | ||||
|
39 | def aggregate_path(project, field, row, options={}) | |||
|
40 | parameters = {:set_filter => 1, :subproject_id => '!*', field => row.id}.merge(options) | |||
|
41 | project_issues_path(row.is_a?(Project) ? row : project, parameters) | |||
|
42 | end | |||
38 | end |
|
43 | end |
@@ -28,4 +28,12 module RoutesHelper | |||||
28 | issues_path(*args) |
|
28 | issues_path(*args) | |
29 | end |
|
29 | end | |
30 | end |
|
30 | end | |
|
31 | ||||
|
32 | def _project_calendar_path(project, *args) | |||
|
33 | project ? project_calendar_path(project, *args) : issues_calendar_path(*args) | |||
|
34 | end | |||
|
35 | ||||
|
36 | def _project_gantt_path(project, *args) | |||
|
37 | project ? project_gantt_path(project, *args) : issues_gantt_path(*args) | |||
|
38 | end | |||
31 | end |
|
39 | end |
@@ -1,15 +1,15 | |||||
1 | <h3><%= l(:label_issue_plural) %></h3> |
|
1 | <h3><%= l(:label_issue_plural) %></h3> | |
2 |
<%= link_to l(:label_issue_view_all), |
|
2 | <%= link_to l(:label_issue_view_all), _project_issues_path(@project, :set_filter => 1) %><br /> | |
3 | <% if @project %> |
|
3 | <% if @project %> | |
4 |
<%= link_to l(:field_summary), |
|
4 | <%= link_to l(:field_summary), project_issues_report_path(@project) %><br /> | |
5 | <% end %> |
|
5 | <% end %> | |
6 | <%= call_hook(:view_issues_sidebar_issues_bottom) %> |
|
6 | <%= call_hook(:view_issues_sidebar_issues_bottom) %> | |
7 |
|
7 | |||
8 | <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %> |
|
8 | <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %> | |
9 |
<%= link_to |
|
9 | <%= link_to l(:label_calendar), _project_calendar_path(@project) %><br /> | |
10 | <% end %> |
|
10 | <% end %> | |
11 | <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %> |
|
11 | <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %> | |
12 |
<%= link_to |
|
12 | <%= link_to l(:label_gantt), _project_gantt_path(@project) %><br /> | |
13 | <% end %> |
|
13 | <% end %> | |
14 | <%= call_hook(:view_issues_sidebar_planning_bottom) %> |
|
14 | <%= call_hook(:view_issues_sidebar_planning_bottom) %> | |
15 |
|
15 |
@@ -15,36 +15,13 | |||||
15 | <tbody> |
|
15 | <tbody> | |
16 | <% for row in rows %> |
|
16 | <% for row in rows %> | |
17 | <tr class="<%= cycle("odd", "even") %>"> |
|
17 | <tr class="<%= cycle("odd", "even") %>"> | |
18 | <td><%= link_to h(row.name), :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), |
|
18 | <td><%= link_to h(row.name), aggregate_path(@project, field_name, row) %></td> | |
19 | :set_filter => 1, |
|
|||
20 | :subproject_id => '!*', |
|
|||
21 | "#{field_name}" => row.id %></td> |
|
|||
22 | <% for status in @statuses %> |
|
19 | <% for status in @statuses %> | |
23 | <td align="center"><%= aggregate_link data, { field_name => row.id, "status_id" => status.id }, |
|
20 | <td align="center"><%= aggregate_link data, { field_name => row.id, "status_id" => status.id }, aggregate_path(@project, field_name, row, :status_id => status.id) %></td> | |
24 | :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), |
|
|||
25 | :set_filter => 1, |
|
|||
26 | :subproject_id => '!*', |
|
|||
27 | "status_id" => status.id, |
|
|||
28 | "#{field_name}" => row.id %></td> |
|
|||
29 | <% end %> |
|
21 | <% end %> | |
30 | <td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 0 }, |
|
22 | <td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 0 }, aggregate_path(@project, field_name, row, :status_id => "o") %></td> | |
31 | :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), |
|
23 | <td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 1 }, aggregate_path(@project, field_name, row, :status_id => "c") %></td> | |
32 | :set_filter => 1, |
|
24 | <td align="center"><%= aggregate_link data, { field_name => row.id }, aggregate_path(@project, field_name, row, :status_id => "*") %></td> | |
33 | :subproject_id => '!*', |
|
|||
34 | "#{field_name}" => row.id, |
|
|||
35 | "status_id" => "o" %></td> |
|
|||
36 | <td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 1 }, |
|
|||
37 | :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), |
|
|||
38 | :set_filter => 1, |
|
|||
39 | :subproject_id => '!*', |
|
|||
40 | "#{field_name}" => row.id, |
|
|||
41 | "status_id" => "c" %></td> |
|
|||
42 | <td align="center"><%= aggregate_link data, { field_name => row.id }, |
|
|||
43 | :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), |
|
|||
44 | :set_filter => 1, |
|
|||
45 | :subproject_id => '!*', |
|
|||
46 | "#{field_name}" => row.id, |
|
|||
47 | "status_id" => "*" %></td> |
|
|||
48 | </tr> |
|
25 | </tr> | |
49 | <% end %> |
|
26 | <% end %> | |
50 | </tbody> |
|
27 | </tbody> |
@@ -11,28 +11,10 | |||||
11 | <tbody> |
|
11 | <tbody> | |
12 | <% for row in rows %> |
|
12 | <% for row in rows %> | |
13 | <tr class="<%= cycle("odd", "even") %>"> |
|
13 | <tr class="<%= cycle("odd", "even") %>"> | |
14 | <td><%= link_to h(row.name), :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), |
|
14 | <td><%= link_to h(row.name), aggregate_path(@project, field_name, row) %></td> | |
15 | :set_filter => 1, |
|
15 | <td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 0 }, aggregate_path(@project, field_name, row, :status_id => "o") %></td> | |
16 | :subproject_id => '!*', |
|
16 | <td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 1 }, aggregate_path(@project, field_name, row, :status_id => "c") %></td> | |
17 | "#{field_name}" => row.id %></td> |
|
17 | <td align="center"><%= aggregate_link data, { field_name => row.id }, aggregate_path(@project, field_name, row, :status_id => "*") %></td> | |
18 | <td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 0 }, |
|
|||
19 | :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), |
|
|||
20 | :set_filter => 1, |
|
|||
21 | :subproject_id => '!*', |
|
|||
22 | "#{field_name}" => row.id, |
|
|||
23 | "status_id" => "o" %></td> |
|
|||
24 | <td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 1 }, |
|
|||
25 | :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), |
|
|||
26 | :set_filter => 1, |
|
|||
27 | :subproject_id => '!*', |
|
|||
28 | "#{field_name}" => row.id, |
|
|||
29 | "status_id" => "c" %></td> |
|
|||
30 | <td align="center"><%= aggregate_link data, { field_name => row.id }, |
|
|||
31 | :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), |
|
|||
32 | :set_filter => 1, |
|
|||
33 | :subproject_id => '!*', |
|
|||
34 | "#{field_name}" => row.id, |
|
|||
35 | "status_id" => "*" %></td> |
|
|||
36 | </tr> |
|
18 | </tr> | |
37 | <% end %> |
|
19 | <% end %> | |
38 | </tbody> |
|
20 | </tbody> |
@@ -1,31 +1,31 | |||||
1 | <h2><%=l(:label_report_plural)%></h2> |
|
1 | <h2><%=l(:label_report_plural)%></h2> | |
2 |
|
2 | |||
3 | <div class="splitcontentleft"> |
|
3 | <div class="splitcontentleft"> | |
4 |
<h3><%=l(:field_tracker)%> <%= link_to image_tag('zoom_in.png'), |
|
4 | <h3><%=l(:field_tracker)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'tracker') %></h3> | |
5 | <%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %> |
|
5 | <%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %> | |
6 | <br /> |
|
6 | <br /> | |
7 |
<h3><%=l(:field_priority)%> <%= link_to image_tag('zoom_in.png'), |
|
7 | <h3><%=l(:field_priority)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'priority') %></h3> | |
8 | <%= render :partial => 'simple', :locals => { :data => @issues_by_priority, :field_name => "priority_id", :rows => @priorities } %> |
|
8 | <%= render :partial => 'simple', :locals => { :data => @issues_by_priority, :field_name => "priority_id", :rows => @priorities } %> | |
9 | <br /> |
|
9 | <br /> | |
10 |
<h3><%=l(:field_assigned_to)%> <%= link_to image_tag('zoom_in.png'), |
|
10 | <h3><%=l(:field_assigned_to)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'assigned_to') %></h3> | |
11 | <%= render :partial => 'simple', :locals => { :data => @issues_by_assigned_to, :field_name => "assigned_to_id", :rows => @assignees } %> |
|
11 | <%= render :partial => 'simple', :locals => { :data => @issues_by_assigned_to, :field_name => "assigned_to_id", :rows => @assignees } %> | |
12 | <br /> |
|
12 | <br /> | |
13 |
<h3><%=l(:field_author)%> <%= link_to image_tag('zoom_in.png'), |
|
13 | <h3><%=l(:field_author)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'author') %></h3> | |
14 | <%= render :partial => 'simple', :locals => { :data => @issues_by_author, :field_name => "author_id", :rows => @authors } %> |
|
14 | <%= render :partial => 'simple', :locals => { :data => @issues_by_author, :field_name => "author_id", :rows => @authors } %> | |
15 | <br /> |
|
15 | <br /> | |
16 | <%= call_hook(:view_reports_issue_report_split_content_left, :project => @project) %> |
|
16 | <%= call_hook(:view_reports_issue_report_split_content_left, :project => @project) %> | |
17 | </div> |
|
17 | </div> | |
18 |
|
18 | |||
19 | <div class="splitcontentright"> |
|
19 | <div class="splitcontentright"> | |
20 |
<h3><%=l(:field_version)%> <%= link_to image_tag('zoom_in.png'), |
|
20 | <h3><%=l(:field_version)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'version') %></h3> | |
21 | <%= render :partial => 'simple', :locals => { :data => @issues_by_version, :field_name => "fixed_version_id", :rows => @versions } %> |
|
21 | <%= render :partial => 'simple', :locals => { :data => @issues_by_version, :field_name => "fixed_version_id", :rows => @versions } %> | |
22 | <br /> |
|
22 | <br /> | |
23 | <% if @project.children.any? %> |
|
23 | <% if @project.children.any? %> | |
24 |
<h3><%=l(:field_subproject)%> <%= link_to image_tag('zoom_in.png'), |
|
24 | <h3><%=l(:field_subproject)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'subproject') %></h3> | |
25 | <%= render :partial => 'simple', :locals => { :data => @issues_by_subproject, :field_name => "project_id", :rows => @subprojects } %> |
|
25 | <%= render :partial => 'simple', :locals => { :data => @issues_by_subproject, :field_name => "project_id", :rows => @subprojects } %> | |
26 | <br /> |
|
26 | <br /> | |
27 | <% end %> |
|
27 | <% end %> | |
28 |
<h3><%=l(:field_category)%> <%= link_to image_tag('zoom_in.png'), |
|
28 | <h3><%=l(:field_category)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'category') %></h3> | |
29 | <%= render :partial => 'simple', :locals => { :data => @issues_by_category, :field_name => "category_id", :rows => @categories } %> |
|
29 | <%= render :partial => 'simple', :locals => { :data => @issues_by_category, :field_name => "category_id", :rows => @categories } %> | |
30 | <br /> |
|
30 | <br /> | |
31 | <%= call_hook(:view_reports_issue_report_split_content_right, :project => @project) %> |
|
31 | <%= call_hook(:view_reports_issue_report_split_content_right, :project => @project) %> |
@@ -3,5 +3,5 | |||||
3 | <h3><%=@report_title%></h3> |
|
3 | <h3><%=@report_title%></h3> | |
4 | <%= render :partial => 'details', :locals => { :data => @data, :field_name => @field, :rows => @rows } %> |
|
4 | <%= render :partial => 'details', :locals => { :data => @data, :field_name => @field, :rows => @rows } %> | |
5 | <br /> |
|
5 | <br /> | |
6 |
<%= link_to l(:button_back), |
|
6 | <%= link_to l(:button_back), project_issues_report_path(@project) %> | |
7 |
|
7 |
@@ -57,8 +57,8 RedmineApp::Application.routes.draw do | |||||
57 | get '/projects/:project_id/issues/calendar', :to => 'calendars#show', :as => 'project_calendar' |
|
57 | get '/projects/:project_id/issues/calendar', :to => 'calendars#show', :as => 'project_calendar' | |
58 | get '/issues/calendar', :to => 'calendars#show' |
|
58 | get '/issues/calendar', :to => 'calendars#show' | |
59 |
|
59 | |||
60 |
|
|
60 | get 'projects/:id/issues/report', :to => 'reports#issue_report', :as => 'project_issues_report' | |
61 |
|
|
61 | get 'projects/:id/issues/report/:detail', :to => 'reports#issue_report_details', :as => 'project_issues_report_details' | |
62 |
|
62 | |||
63 | match 'my/account', :controller => 'my', :action => 'account', :via => [:get, :post] |
|
63 | match 'my/account', :controller => 'my', :action => 'account', :via => [:get, :post] | |
64 | match 'my/account/destroy', :controller => 'my', :action => 'destroy', :via => [:get, :post] |
|
64 | match 'my/account/destroy', :controller => 'my', :action => 'destroy', :via => [:get, :post] |
General Comments 0
You need to be logged in to leave comments.
Login now