<%= @role_group.name %>

<% if @role_group.description.present? %>

<%= @role_group.description %>

<% end %>

멤버 (<%= @members.count %>명)

<% if @members.any? %> <% @members.each do |member| %> <% end %>
이름 ID 이메일 비고 작업
<%= link_to member.user.name, user_path(member.user) %> <%= member.user.login %> <%= member.user.mail %> <%= member.note %> <%= link_to '제거', remove_member_role_group_path(@role_group, user_id: member.user_id), method: :delete, data: { confirm: '이 멤버를 제거하시겠습니까?' }, class: 'icon icon-del' %>
<% else %>

멤버가 없습니다.

<% end %>

멤버 추가 (LDAP 검색)


<%= link_to '목록으로', '/role_groups', class: 'icon icon-back' %> <%= link_to '수정', edit_role_group_path(@role_group), class: 'icon icon-edit' %>

<%= javascript_tag do %> var searchTimeout = null; $('#ldap_search').on('keyup', function() { var query = $(this).val(); if (searchTimeout) clearTimeout(searchTimeout); if (query.length < 2) { $('#search_results').html(''); $('#search_status').text(''); return; } $('#search_status').text('검색 중...'); searchTimeout = setTimeout(function() { $.ajax({ url: '<%= search_ldap_role_groups_path %>', data: { q: query }, dataType: 'json', success: function(data) { $('#search_status').text(data.length + '명 발견'); var html = ''; if (data.length === 0) { html = '

검색 결과가 없습니다.

'; } else { html = ''; data.forEach(function(user) { html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; }); html += '
ID이름이메일상태
' + user.uid + '' + user.name + '' + (user.email || '-') + '' + (user.exists ? '등록됨' : 'LDAP') + ''; html += '
'; html += ''; if (user.exists) { html += ''; } else { html += ''; html += ''; } html += ''; html += '
'; html += '
'; } $('#search_results').html(html); }, error: function() { $('#search_status').text('검색 오류'); $('#search_results').html('

검색 중 오류가 발생했습니다.

'); } }); }, 300); }); <% end %>