summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-02-18 13:45:15 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-02-18 13:45:15 +0000
commit8fa96feb1f5c14acf355fe28789705b769255e6e (patch)
tree21ea6c25fab308b8fb3a3345e099035d2e7335a2 /app
parentddd0796e403d8001bcffa5196c8dc2e671137464 (diff)
downloadredmine-8fa96feb1f5c14acf355fe28789705b769255e6e.tar.gz
redmine-8fa96feb1f5c14acf355fe28789705b769255e6e.zip
show "no data" label when there's nothing to display on project member list
git-svn-id: http://redmine.rubyforge.org/svn/trunk@256 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects_controller.rb2
-rw-r--r--app/views/projects/list_members.rhtml2
2 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 7f2025ea1..0bd50fdb2 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -171,7 +171,7 @@ class ProjectsController < ApplicationController
# Show members list of @project
def list_members
- @members = @project.members
+ @members = @project.members.find(:all)
end
# Add a new document to @project
diff --git a/app/views/projects/list_members.rhtml b/app/views/projects/list_members.rhtml
index d7b6c5bcb..e98a8c678 100644
--- a/app/views/projects/list_members.rhtml
+++ b/app/views/projects/list_members.rhtml
@@ -1,5 +1,7 @@
<h2><%=l(:label_member_plural)%></h2>
+<% if @members.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
+
<% members = @members.group_by {|m| m.role } %>
<% members.keys.sort{|x,y| x.position <=> y.position}.each do |role| %>
<h3><%= role.name %></h3>