<% not_list = defined?(:users_count) %> <%= overflow_hidden_span department.name, width: 150 %> <%= overflow_hidden_span department.school.name, width: 150 %> <% if not_list %> <%= department.user_extensions.count %> <%= department.user_extensions.joins(:user).where(users: { professional_certification: true }).count %> <% else %> <%= users_count.fetch(department.id, 0) %> <%= professional_auth_count.fetch(department.id, 0) %> <% end %> <%= render partial: 'admins/departments/shared/member_users', locals: { department: department } %> <% if department.identifier.present? %> <%= link_to department.identifier.to_s, statistics_college_path(department.identifier), target: '_blank' %> <% else %> -- <% end %> <%= department.host_count %> <%= department.created_at&.strftime('%Y-%m-%d %H:%M') %> <%= 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' %>