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
This commit is contained in:
Jean-Philippe Lang 2007-02-18 13:45:15 +00:00
parent ddd0796e40
commit 8fa96feb1f
2 changed files with 3 additions and 1 deletions

View File

@ -171,7 +171,7 @@ class ProjectsController < ApplicationController
# Show members list of @project # Show members list of @project
def list_members def list_members
@members = @project.members @members = @project.members.find(:all)
end end
# Add a new document to @project # Add a new document to @project

View File

@ -1,5 +1,7 @@
<h2><%=l(:label_member_plural)%></h2> <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 = @members.group_by {|m| m.role } %>
<% members.keys.sort{|x,y| x.position <=> y.position}.each do |role| %> <% members.keys.sort{|x,y| x.position <=> y.position}.each do |role| %>
<h3><%= role.name %></h3> <h3><%= role.name %></h3>