Commit ef85202f71facf1cf84b07d719ac7ab6d0071cbc

Authored by Andrey Kumanyaev
1 parent 916165df

fix links in admin group view page (user links)

Showing 1 changed file with 8 additions and 7 deletions   Show diff stats
app/views/admin/groups/show.html.haml
@@ -72,16 +72,17 @@ @@ -72,16 +72,17 @@
72 %th Users 72 %th Users
73 %th Project Access: 73 %th Project Access:
74 74
75 - - @group.users.each do |u|  
76 - %tr{class: "user_#{u.id}"}  
77 - %td.name= link_to u.name, admin_user_path(u) 75 + - @group.users.each do |user|
  76 + - next unless user
  77 + %tr{class: "user_#{user.id}"}
  78 + %td.name= link_to user.name, admin_user_path(user)
78 %td.projects_access 79 %td.projects_access
79 - - u.authorized_projects.in_namespace(@group).each do |project|  
80 - - u_p = u.users_projects.in_project(project).first 80 + - user.authorized_projects.in_namespace(@group).each do |project|
  81 + - u_p = user.users_projects.in_project(project).first
81 - next unless u_p 82 - next unless u_p
82 %span 83 %span
83 - = project.name  
84 - = link_to "(#{ u_p.project_access_human })", edit_admin_team_member_path(u_p) 84 + = project.name_with_namespace
  85 + = link_to "(#{ u_p.project_access_human })", edit_admin_project_member_path(project, user)
85 %tr 86 %tr
86 %td.input= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5' 87 %td.input= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5'
87 %td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"} 88 %td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"}