diff --git a/app/controllers/admins/shixun_authorizations_controller.rb b/app/controllers/admins/shixun_authorizations_controller.rb index 31bd5faf7..14d43b00a 100644 --- a/app/controllers/admins/shixun_authorizations_controller.rb +++ b/app/controllers/admins/shixun_authorizations_controller.rb @@ -26,7 +26,7 @@ class Admins::ShixunAuthorizationsController < Admins::BaseController @applies = paginate applies.includes(user: :user_extension) shixun_ids = @applies.map(&:container_id) - @shixun_map = Shixun.where(id: shixun_ids).each_with_object({}) { |s, h| h[s.id] = s } + @shixun_map = Shixun.where(id: shixun_ids).includes(:shixun_reviews).each_with_object({}) { |s, h| h[s.id] = s } end def agree diff --git a/app/views/admins/shixun_authorizations/shared/_list.html.erb b/app/views/admins/shixun_authorizations/shared/_list.html.erb index 042e4096e..fdb33fdde 100644 --- a/app/views/admins/shixun_authorizations/shared/_list.html.erb +++ b/app/views/admins/shixun_authorizations/shared/_list.html.erb @@ -6,6 +6,7 @@ 头像 创建者 实训名称 + 审核情况(内容/性能) 任务数 时间 <% if is_processed %> @@ -21,6 +22,8 @@ <% applies.each do |apply| %> <% user = apply.user %> <% shixun = shixun_map[apply.container_id] %> + <% content_review = shixun.shixun_reviews.select{|sr| sr.review_type == 'Content'}.first %> + <% perference_review = shixun.shixun_reviews.select{|sr| sr.review_type == 'Performance'}.first %> <%= link_to "/users/#{user.login}", class: 'shixun-authorization-avatar', target: '_blank', data: { toggle: 'tooltip', title: '个人主页' } do %> @@ -33,6 +36,10 @@ <%= overflow_hidden_span shixun.name, width: 300 %> <% end %> + + <%= check_box_tag :content, content_review&.status, content_review&.status.to_i == 1, class:"shixun-setting-form" ,title:"内容审核"%> + <%= check_box_tag :perference, perference_review&.status, perference_review&.status.to_i == 1, class:"shixun-setting-form" ,title:"性能审核"%> + <%= shixun.challenges_count %> <%= apply.updated_at.strftime('%Y-%m-%d %H:%M') %>