On the issue report page, 0 issue counts are now displayed as dashes.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@629 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-08-13 17:00:59 +00:00
parent 29c623fa58
commit b3f3634df3
3 changed files with 11 additions and 7 deletions

View File

@ -29,4 +29,8 @@ module ReportsHelper
a
end
def aggregate_link(data, criteria, *args)
a = aggregate data, criteria
a > 0 ? link_to(a, *args) : '-'
end
end

View File

@ -19,23 +19,23 @@
: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 }),
<td align="center"><%= aggregate_link data, { field_name => row.id, "status_id" => status.id },
:controller => 'projects', :action => 'list_issues', :id => ((row.is_a?(Project) ? row : @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 }),
<td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 0 },
:controller => 'projects', :action => 'list_issues', :id => ((row.is_a?(Project) ? row : @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 }),
<td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 1 },
:controller => 'projects', :action => 'list_issues', :id => ((row.is_a?(Project) ? row : @project)),
:set_filter => 1,
"#{field_name}" => row.id,
"status_id" => "c" %></td>
<td align="center"><%= link_to (aggregate data, { field_name => row.id }),
<td align="center"><%= aggregate_link data, { field_name => row.id },
:controller => 'projects', :action => 'list_issues', :id => ((row.is_a?(Project) ? row : @project)),
:set_filter => 1,
"#{field_name}" => row.id,

View File

@ -14,17 +14,17 @@
<td><%= link_to row.name, :controller => 'projects', :action => 'list_issues', :id => ((row.is_a?(Project) ? row : @project)),
:set_filter => 1,
"#{field_name}" => row.id %></td>
<td align="center"><%= link_to (aggregate data, { field_name => row.id, "closed" => 0 }),
<td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 0 },
:controller => 'projects', :action => 'list_issues', :id => ((row.is_a?(Project) ? row : @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 }),
<td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 1 },
:controller => 'projects', :action => 'list_issues', :id => ((row.is_a?(Project) ? row : @project)),
:set_filter => 1,
"#{field_name}" => row.id,
"status_id" => "c" %></td>
<td align="center"><%= link_to (aggregate data, { field_name => row.id }),
<td align="center"><%= aggregate_link data, { field_name => row.id },
:controller => 'projects', :action => 'list_issues', :id => ((row.is_a?(Project) ? row : @project)),
:set_filter => 1,
"#{field_name}" => row.id,