You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.6 KiB
34 lines
1.6 KiB
<% not_list = defined?(:users_count) %>
|
|
|
|
<td class="text-left"><%= overflow_hidden_span department.name, width: 150 %></td>
|
|
<td class="text-left"><%= overflow_hidden_span department.school.name, width: 150 %></td>
|
|
|
|
<% if not_list %>
|
|
<td><%= department.user_extensions.count %></td>
|
|
<td><%= department.user_extensions.joins(:user).where(users: { professional_certification: true }).count %></td>
|
|
<% else %>
|
|
<td><%= users_count.fetch(department.id, 0) %></td>
|
|
<td><%= professional_auth_count.fetch(department.id, 0) %></td>
|
|
<% end %>
|
|
|
|
<td class="member-container">
|
|
<%= render partial: 'admins/departments/shared/member_users', locals: { department: department } %>
|
|
</td>
|
|
<td>
|
|
<% if department.identifier.present? %>
|
|
<%= link_to department.identifier.to_s, statistics_college_path(department.identifier), target: '_blank' %>
|
|
<% else %>
|
|
--
|
|
<% end %>
|
|
</td>
|
|
<td><%= department.host_count %></td>
|
|
<td><%= department.created_at&.strftime('%Y-%m-%d %H:%M') %></td>
|
|
<td class="action-container">
|
|
<%= link_to '编辑', edit_admins_department_path(department), remote: true, class: 'action' %>
|
|
|
|
<%= javascript_void_link '添加管理员', class: 'action', data: { department_id: department.id, toggle: 'modal', target: '.admin-add-department-member-modal' } %>
|
|
|
|
<%= javascript_void_link '更改', class: 'action', data: { school_id: department.school_id, department_id: department.id, toggle: 'modal', target: '.admin-merge-department-modal' } %>
|
|
|
|
<%= delete_link '删除', admins_department_path(department, element: ".department-item-#{department.id}"), class: 'delete-department-action' %>
|
|
</td> |