]> source.dussan.org Git - redmine.git/commitdiff
issues reports improvements
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 21 Oct 2006 12:57:19 +0000 (12:57 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 21 Oct 2006 12:57:19 +0000 (12:57 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@34 e93f8b46-1217-0410-a6f0-8f06a7374b81

redmine/app/controllers/reports_controller.rb
redmine/app/views/reports/_details.rhtml [new file with mode: 0644]
redmine/app/views/reports/_simple.rhtml
redmine/app/views/reports/issue_report.rhtml
redmine/app/views/reports/issue_report_details.rhtml [new file with mode: 0644]
redmine/lang/de.yml
redmine/lang/en.yml
redmine/lang/es.yml
redmine/lang/fr.yml
redmine/public/images/user_new.png [new file with mode: 0644]
redmine/public/stylesheets/application.css

index 938d3b4692a84c09876e8c44bb32ab4ee82b79db..6e5726329cbf8f10aaf6ae49812ce5ed1f895de7 100644 (file)
@@ -21,9 +21,46 @@ class ReportsController < ApplicationController
   \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
@@ -33,9 +70,11 @@ class ReportsController < ApplicationController
                                                   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
@@ -46,9 +85,11 @@ class ReportsController < ApplicationController
                                                   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
@@ -59,13 +100,6 @@ class ReportsController < ApplicationController
                                                   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
diff --git a/redmine/app/views/reports/_details.rhtml b/redmine/app/views/reports/_details.rhtml
new file mode 100644 (file)
index 0000000..be4c82e
--- /dev/null
@@ -0,0 +1,47 @@
+<% 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
index 6838735edcaeb07324ba21ee852a9da7ed2a062c..3be1281c5a868b4275b042e35986166240842eb1 100644 (file)
@@ -1,16 +1,12 @@
 <% 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
index 1717583d33e0dd6a4a9c630b063f9b83c5e89e99..f4704969bb3ea22b3731d1e4696d18e16a66ec86 100644 (file)
@@ -1,14 +1,18 @@
 <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>&nbsp;</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>&nbsp;</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>&nbsp;</p>\r
+</div>\r
 \r
-&nbsp;\r
diff --git a/redmine/app/views/reports/issue_report_details.rhtml b/redmine/app/views/reports/issue_report_details.rhtml
new file mode 100644 (file)
index 0000000..6970a36
--- /dev/null
@@ -0,0 +1,7 @@
+<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
index c39d710353bc6716cba3a3e91858973808d516e9..aea0de94f53e804186123483f604873789cffecd 100644 (file)
@@ -240,6 +240,7 @@ label_none: Kein
 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
@@ -260,6 +261,7 @@ button_download: Fernzuladen
 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
index d4ef52b2899190eccdb52f75ac7e89efc41f2d5c..f412b0bc3bbc3c6c04811911b97cf672ad31d978 100644 (file)
@@ -240,6 +240,7 @@ label_none: None
 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
@@ -260,6 +261,7 @@ button_download: Download
 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
index acc71eca1c4da842769fd8a1f6f474be93cd4904..a2543eca8c8bf66c3f17eb5f9cd6ba1ede1f6bc0 100644 (file)
@@ -240,6 +240,7 @@ label_none: Ninguno
 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
@@ -260,6 +261,7 @@ button_download: Telecargar
 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
index 866f79af63bd2bb8edb749c6a2b4ce59adb17039..22a625ca36bb29fefb7ed57a478af4ceb95899c9 100644 (file)
@@ -240,6 +240,7 @@ label_none: Aucun
 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
@@ -260,6 +261,7 @@ button_download: Télécharger
 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
diff --git a/redmine/public/images/user_new.png b/redmine/public/images/user_new.png
new file mode 100644 (file)
index 0000000..c7c7188
Binary files /dev/null and b/redmine/public/images/user_new.png differ
index 8b83a21afa7643c5bbc8fc3a6d21856d5aa2d768..b93e316e4e5afe5dbbd0589deabe44e2dd5d2747 100644 (file)
@@ -265,6 +265,16 @@ tr.even {
        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