Mercurial > hg > soundsoftware-site
changeset 78:f549e0ce4aad luisf
Bug #51: Unfinished and not completely tested - limits the number of displayed users to 10.
author | luisf |
---|---|
date | Tue, 14 Dec 2010 17:51:34 +0000 |
parents | d9df68bf8907 |
children | 0a679b5bd3b3 |
files | app/views/projects/settings/_members.rhtml |
diffstat | 1 files changed, 12 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/app/views/projects/settings/_members.rhtml Tue Dec 14 16:52:12 2010 +0000 +++ b/app/views/projects/settings/_members.rhtml Tue Dec 14 17:51:34 2010 +0000 @@ -13,19 +13,18 @@ </tr></thead> <tbody> <% members.each do |member| %> - <% next if member.new_record? %> - <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member"> - <td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td> - <td class="roles"> - <span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span> - <% if authorize_for('members', 'edit') %> - <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member}, - :method => :post, - :html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }) do |f| %> - <p><% roles.each do |role| %> - <label><%= check_box_tag 'member[role_ids][]', role.id, member.roles.include?(role), + <% next if member.new_record? %> + <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member"> + <td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td> + <td class="roles"> + <span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span> + <% if authorize_for('members', 'edit') %> + <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member}, + :method => :post, :html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }) do |f| %> + <p><% roles.each do |role| %> + <label><%= check_box_tag 'member[role_ids][]', role.id, member.roles.include?(role), :disabled => member.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br /> - <% end %></p> + <% end %></p> <%= hidden_field_tag 'member[role_ids][]', '' %> <p><%= submit_tag l(:button_change), :class => "small" %> <%= link_to_function l(:button_cancel), "$('member-#{member.id}-roles').show(); $('member-#{member.id}-roles-form').hide(); return false;" %></p> @@ -51,7 +50,7 @@ </div> -<% principals = Principal.active.find(:all, :limit => 100, :order => 'type, login, lastname ASC') - @project.principals %> +<% principals = Principal.active.find(:all, :limit => 10, :order => 'type, login, lastname ASC') - @project.principals %> <div class="splitcontentright"> <% if roles.any? && principals.any? %>