\r
def issue_report\r
@statuses = IssueStatus.find_all\r
- @trackers = Tracker.find_all\r
- @issues_by_tracker = \r
- ActiveRecord::Base.connection.select_all("select s.id as status_id, \r
+ \r
+ case params[:detail]\r
+ when "tracker"\r
+ @field = "tracker_id"\r
+ @rows = Tracker.find_all\r
+ @data = issues_by_tracker\r
+ @report_title = l(:field_tracker)\r
+ render :template => "reports/issue_report_details"\r
+ when "priority"\r
+ @field = "priority_id"\r
+ @rows = Enumeration::get_values('IPRI')\r
+ @data = issues_by_priority\r
+ @report_title = l(:field_priority)\r
+ render :template => "reports/issue_report_details" \r
+ when "category"\r
+ @field = "category_id"\r
+ @rows = @project.issue_categories\r
+ @data = issues_by_category\r
+ @report_title = l(:field_category)\r
+ render :template => "reports/issue_report_details" \r
+ else\r
+ @trackers = Tracker.find(:all)\r
+ @priorities = Enumeration::get_values('IPRI')\r
+ @categories = @project.issue_categories\r
+ issues_by_tracker\r
+ issues_by_priority\r
+ issues_by_category\r
+ render :template => "reports/issue_report"\r
+ end\r
+ end \r
+ \r
+private\r
+ # Find project of id params[:id]\r
+ def find_project\r
+ @project = Project.find(params[:id]) \r
+ end\r
+ \r
+ def issues_by_tracker\r
+ @issues_by_tracker ||= \r
+ ActiveRecord::Base.connection.select_all("select s.id as status_id, \r
s.is_closed as closed, \r
t.id as tracker_id,\r
count(i.id) as total \r
i.status_id=s.id \r
and i.tracker_id=t.id\r
and i.project_id=#{@project.id}\r
- group by s.id, s.is_closed, t.id")\r
- @priorities = Enumeration::get_values('IPRI')\r
- @issues_by_priority = \r
+ group by s.id, s.is_closed, t.id") \r
+ end\r
+ \r
+ def issues_by_priority \r
+ @issues_by_priority ||= \r
ActiveRecord::Base.connection.select_all("select s.id as status_id, \r
s.is_closed as closed, \r
p.id as priority_id,\r
i.status_id=s.id \r
and i.priority_id=p.id\r
and i.project_id=#{@project.id}\r
- group by s.id, s.is_closed, p.id")\r
- @categories = @project.issue_categories\r
- @issues_by_category = \r
+ group by s.id, s.is_closed, p.id") \r
+ end\r
+ \r
+ def issues_by_category \r
+ @issues_by_category ||= \r
ActiveRecord::Base.connection.select_all("select s.id as status_id, \r
s.is_closed as closed, \r
c.id as category_id,\r
i.status_id=s.id \r
and i.category_id=c.id\r
and i.project_id=#{@project.id}\r
- group by s.id, s.is_closed, c.id")\r
- end\r
- \r
- \r
-private\r
- # Find project of id params[:id]\r
- def find_project\r
- @project = Project.find(params[:id]) \r
+ group by s.id, s.is_closed, c.id") \r
end
end
--- /dev/null
+<% if @statuses.empty? or rows.empty? %>\r
+ <p><i><%=l(:label_no_data)%></i></p>\r
+<% else %>\r
+<% col_width = 70 / (@statuses.length+3) %>\r
+<table class="reportTableContent">\r
+<tr>\r
+<td width="25%"></td>\r
+<% for status in @statuses %>\r
+ <td align="center" width="<%= col_width %>%" bgcolor="#<%= status.html_color %>"><small><%= status.name %></small></td>\r
+<% end %>\r
+<td align="center" width="<%= col_width %>%"><strong><%=l(:label_open_issues_plural)%></strong></td>\r
+<td align="center" width="<%= col_width %>%"><strong><%=l(:label_closed_issues_plural)%></strong></td>\r
+<td align="center" width="<%= col_width %>%"><strong><%=l(:label_total)%></strong></td>\r
+</tr>\r
+\r
+<% for row in rows %>\r
+<tr class="<%= cycle("odd", "even") %>">\r
+ <td><%= link_to row.name, :controller => 'projects', :action => 'list_issues', :id => @project, \r
+ :set_filter => 1, \r
+ "#{field_name}" => row.id %></td>\r
+ <% for status in @statuses %>\r
+ <td align="center"><%= link_to (aggregate data, { field_name => row.id, "status_id" => status.id }), \r
+ :controller => 'projects', :action => 'list_issues', :id => @project, \r
+ :set_filter => 1, \r
+ "status_id" => status.id, \r
+ "#{field_name}" => row.id %></td>\r
+ <% end %>\r
+ <td align="center"><%= link_to (aggregate data, { field_name => row.id, "closed" => 0 }),\r
+ :controller => 'projects', :action => 'list_issues', :id => @project, \r
+ :set_filter => 1, \r
+ "#{field_name}" => row.id,\r
+ "status_id" => "O" %></td>\r
+ <td align="center"><%= link_to (aggregate data, { field_name => row.id, "closed" => 1 }),\r
+ :controller => 'projects', :action => 'list_issues', :id => @project, \r
+ :set_filter => 1, \r
+ "#{field_name}" => row.id,\r
+ "status_id" => "C" %></td>\r
+ <td align="center"><%= link_to (aggregate data, { field_name => row.id }),\r
+ :controller => 'projects', :action => 'list_issues', :id => @project, \r
+ :set_filter => 1, \r
+ "#{field_name}" => row.id,\r
+ "status_id" => "A" %></td> \r
+<% end %>\r
+</tr>\r
+</table>\r
+<% end\r
+ reset_cycle %>
\ No newline at end of file
<% if @statuses.empty? or rows.empty? %>\r
<p><i><%=l(:label_no_data)%></i></p>\r
<% else %>\r
-<% col_width = 70 / (@statuses.length+3) %>\r
-<table border="0" cellspacing="1" cellpadding="2" width="100%">\r
+<table class="reportTableContent">\r
<tr>\r
<td width="25%"></td>\r
-<% for status in @statuses %>\r
- <td align="center" width="<%= col_width %>%" bgcolor="#<%= status.html_color %>"><small><%= status.name %></small></td>\r
-<% end %>\r
-<td align="center" width="<%= col_width %>%"><strong><%=l(:label_open_issues_plural)%></strong></td>\r
-<td align="center" width="<%= col_width %>%"><strong><%=l(:label_closed_issues_plural)%></strong></td>\r
-<td align="center" width="<%= col_width %>%"><strong><%=l(:label_total)%></strong></td>\r
+<td align="center" width="25%"><%=l(:label_open_issues_plural)%></td>\r
+<td align="center" width="25%"><%=l(:label_closed_issues_plural)%></td>\r
+<td align="center" width="25%"><%=l(:label_total)%></td>\r
</tr>\r
\r
<% for row in rows %>\r
<td><%= link_to row.name, :controller => 'projects', :action => 'list_issues', :id => @project, \r
:set_filter => 1, \r
"#{field_name}" => row.id %></td>\r
- <% for status in @statuses %>\r
- <td align="center"><%= link_to (aggregate data, { field_name => row.id, "status_id" => status.id }), \r
- :controller => 'projects', :action => 'list_issues', :id => @project, \r
- :set_filter => 1, \r
- "status_id" => status.id, \r
- "#{field_name}" => row.id %></td>\r
- <% end %>\r
<td align="center"><%= link_to (aggregate data, { field_name => row.id, "closed" => 0 }),\r
:controller => 'projects', :action => 'list_issues', :id => @project, \r
:set_filter => 1, \r
<h2><%=l(:label_report_plural)%></h2>\r
\r
-<strong><%=l(:field_tracker)%></strong>\r
+<div class="splitcontentleft">\r
+<strong><%=l(:field_tracker)%></strong> \r
<%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %>\r
-<br />\r
+<p align="right"><small><%= link_to l(:label_details), :detail => 'tracker' %></small> </p>\r
\r
<strong><%=l(:field_priority)%></strong>\r
<%= render :partial => 'simple', :locals => { :data => @issues_by_priority, :field_name => "priority_id", :rows => @priorities } %>\r
-<br />\r
+<p align="right"><small><%= link_to l(:label_details), :detail => 'priority' %></small> </p>\r
+</div>\r
\r
+<div class="splitcontentright">\r
<strong><%=l(:field_category)%></strong>\r
<%= render :partial => 'simple', :locals => { :data => @issues_by_category, :field_name => "category_id", :rows => @categories } %>\r
+<p align="right"><small><%= link_to l(:label_details), :detail => 'category' %></small> </p>\r
+</div>\r
\r
- \r
--- /dev/null
+<h2><%=l(:label_report_plural)%></h2>\r
+\r
+<strong><%=@report_title%></strong>\r
+<%= render :partial => 'details', :locals => { :data => @data, :field_name => @field, :rows => @rows } %>\r
+<br />\r
+<%= link_to l(:button_back), :action => 'issue_report' %>\r
+\r
label_next: Weiter\r
label_previous: Zurück\r
label_used_by: Benutzt von\r
+#label_details: Details...\r
\r
button_login: Einloggen\r
button_submit: Einreichen\r
button_list: Aufzulisten\r
button_view: Siehe\r
button_move: Bewegen\r
+#button_back: Back\r
\r
text_select_mail_notifications: Aktionen für die Mailbenachrichtigung aktiviert werden soll.\r
text_regexp_info: eg. ^[A-Z0-9]+$\r
label_next: Next\r
label_previous: Previous\r
label_used_by: Used by\r
+label_details: Details...\r
\r
button_login: Login\r
button_submit: Submit\r
button_list: List\r
button_view: View\r
button_move: Move\r
+button_back: Back\r
\r
text_select_mail_notifications: Select actions for which mail notifications should be sent.\r
text_regexp_info: eg. ^[A-Z0-9]+$\r
label_next: Próximo\r
label_previous: Precedente\r
label_used_by: Utilizado por\r
+#label_details: Details...\r
\r
button_login: Conexión\r
button_submit: Someter\r
button_list: Listar\r
button_view: Ver\r
button_move: Mover\r
+#button_back: Back\r
\r
text_select_mail_notifications: Seleccionar las actividades que necesitan la activación de la notificación por mail.\r
text_regexp_info: eg. ^[A-Z0-9]+$\r
label_next: Suivant\r
label_previous: Précédent\r
label_used_by: Utilisé par\r
+label_details: Détails...\r
\r
button_login: Connexion\r
button_submit: Soumettre\r
button_list: Lister\r
button_view: Voir\r
button_move: Déplacer\r
+button_back: Retour\r
\r
text_select_mail_notifications: Sélectionner les actions pour lesquelles la notification par mail doit être activée.\r
text_regexp_info: ex. ^[A-Z0-9]+$\r
background-color: #fff;\r
}\r
\r
+table.reportTableContent {\r
+ border:1px solid #c0c0c0;\r
+ width:99%;\r
+ border-collapse: collapse;\r
+}\r
+\r
+table.reportTableContent td {\r
+ padding:2px;\r
+}\r
+\r
hr { border:none; border-bottom: dotted 2px #c0c0c0; }\r
\r
\r