]> source.dussan.org Git - redmine.git/commitdiff
show "no data" label when there's nothing to display on project member list
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 18 Feb 2007 13:45:15 +0000 (13:45 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 18 Feb 2007 13:45:15 +0000 (13:45 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@256 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/projects_controller.rb
app/views/projects/list_members.rhtml

index 7f2025ea1546a79bd9263368e88a34df2c4ba6d8..0bd50fdb22ecd8cbadbc9bf178a40590609f9465 100644 (file)
@@ -171,7 +171,7 @@ class ProjectsController < ApplicationController
 \r
   # Show members list of @project\r
   def list_members\r
-    @members = @project.members\r
+    @members = @project.members.find(:all)\r
   end\r
 \r
   # Add a new document to @project\r
index d7b6c5bcbdeb7a512b35e31d3063c92049881342..e98a8c6780d759b6d9b14f87b206444a5c4368c2 100644 (file)
@@ -1,5 +1,7 @@
 <h2><%=l(:label_member_plural)%></h2>\r
 \r
+<% if @members.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>\r
+\r
 <% members = @members.group_by {|m| m.role } %>\r
 <% members.keys.sort{|x,y| x.position <=> y.position}.each do |role| %>\r
 <h3><%= role.name %></h3>\r