rm13612-note_7_patch_against_trunk_r16111.patch

Mischa The Evil, 2016-12-27 04:52

Download (1.52 KB)

View differences:

app/views/projects/settings/_members.html.erb (working copy)
14 14
    </tr>
15 15
  </thead>
16 16
  <tbody>
17
<%
18
  group_member_role_by_id = {}
19
  members.each do |member|
20
    next if member.new_record?
21

  
22
    member.member_roles.each{|mr|
23
      next if mr.inherited_from.present?
24
      next if mr.member.principal.is_a?(::User)
25
      next if group_member_role_by_id[mr.id].present?
26
      group_member_role_by_id[mr.id] = mr
27
    }
28
  end
29
-%>
17 30
  <% members.each do |member| %>
18
  <% next if member.new_record? %>
31
  <% next if member.new_record?
32
      label_group = ''
33
      member.member_roles.each{|mr|
34
        if mr.inherited_from.present?
35
          next if group_member_role_by_id[mr.inherited_from].nil?
36
          label_group = " (#{group_member_role_by_id[mr.inherited_from].member.principal.lastname})"
37

  
38
          break
39
        end
40
      }
41
  %>
19 42
  <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
20
  <td class="name icon icon-<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
43
  <td class="name icon icon-<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %><%= label_group %></td>
21 44
  <td class="roles">
22 45
    <span id="member-<%= member.id %>-roles"><%= member.roles.sort.collect(&:to_s).join(', ') %></span>
23 46
      <%= form_for(member,