diff --git a/app/controllers/admins/department_applies_controller.rb b/app/controllers/admins/department_applies_controller.rb
index b6dece1de..458721e34 100644
--- a/app/controllers/admins/department_applies_controller.rb
+++ b/app/controllers/admins/department_applies_controller.rb
@@ -74,7 +74,10 @@ class Admins::DepartmentAppliesController < Admins::BaseController
@depart_apply&.applied_messages&.update_all(status:3)
if params[:tip] == 'unapplied' #未审批时候删除
- UserExtension.where(department_id: @depart_apply.department_id).update_all(department_id:nil)
+ user_extens = UserExtension.where(department_id: @depart_apply.department_id)
+ user_extens.update_all(department_id:nil)
+ User.where(id: user_extens.pluck(:user_id)).update_all(profile_completed:false)
+
tiding_params = {
user_id: @depart_apply.user_id,
trigger_user_id: 0,
diff --git a/app/views/admins/department_applies/shared/_list.html.erb b/app/views/admins/department_applies/shared/_list.html.erb
index bdd518a8f..0a1d803be 100644
--- a/app/views/admins/department_applies/shared/_list.html.erb
+++ b/app/views/admins/department_applies/shared/_list.html.erb
@@ -16,7 +16,7 @@
<%= apply.id %> |
<%= apply.name %> |
<%= apply.school.try(:name) %> |
- <%= apply.user.show_real_name %> |
+ <%= apply&.user&.real_name %> |
<%= format_time apply.created_at %> |
<%= agree_link '批准', agree_admins_department_apply_path(apply, element: ".department-apply-#{apply.id}"), 'data-confirm': '确认批准通过?' %>
diff --git a/app/views/admins/library_applies/shared/_list.html.erb b/app/views/admins/library_applies/shared/_list.html.erb
index c6f9825dc..783d0db30 100644
--- a/app/views/admins/library_applies/shared/_list.html.erb
+++ b/app/views/admins/library_applies/shared/_list.html.erb
@@ -27,7 +27,7 @@
<% end %>
|
- <%= user.real_name %> |
+ <%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %> |
<%= link_to library.title, library_path(library), :target => "_blank" %> |
<%= overflow_hidden_span library.content[0..50]%> |
<%= apply.updated_at.strftime('%Y-%m-%d %H:%M') %> |
diff --git a/app/views/admins/project_package_applies/shared/_list.html.erb b/app/views/admins/project_package_applies/shared/_list.html.erb
index 736d939f9..d94c96184 100644
--- a/app/views/admins/project_package_applies/shared/_list.html.erb
+++ b/app/views/admins/project_package_applies/shared/_list.html.erb
@@ -27,7 +27,7 @@
<% end %>
- <%= user.real_name %> |
+ <%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %> |
<%= link_to package.title, "/crowdsourcing/#{package.id}", :target => "_blank" %> |
<%= overflow_hidden_span package.content[0..50] %> |
<%= apply.updated_at.strftime('%Y-%m-%d %H:%M') %> |
diff --git a/app/views/admins/shixun_authorizations/shared/_list.html.erb b/app/views/admins/shixun_authorizations/shared/_list.html.erb
index ce3b4ca43..042e4096e 100644
--- a/app/views/admins/shixun_authorizations/shared/_list.html.erb
+++ b/app/views/admins/shixun_authorizations/shared/_list.html.erb
@@ -27,7 +27,7 @@
<% end %>
- <%= user.real_name %> |
+ <%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %> |
<%= link_to "/shixuns/#{shixun.identifier}", target: '_blank' do %>
<%= overflow_hidden_span shixun.name, width: 300 %>
diff --git a/app/views/admins/shixun_settings/shared/_td.html.erb b/app/views/admins/shixun_settings/shared/_td.html.erb
index efdec4f8d..f72dc8a38 100644
--- a/app/views/admins/shixun_settings/shared/_td.html.erb
+++ b/app/views/admins/shixun_settings/shared/_td.html.erb
@@ -21,7 +21,7 @@
<%= image_tag(imageUrl, width: 60, height: 40, class: "preview-image shixun-image-#{shixun.id}", data: { toggle: 'tooltip', title: '点击预览' }, style: imageExists ? '' : 'display:none') %>
<%= javascript_void_link imageExists ? '重新上传' : '上传图片', class: 'action upload-shixun-image-action', data: { source_id: shixun.id, source_type: 'Shixun', toggle: 'modal', target: '.admin-upload-file-modal' } %>
|
-<%= link_to shixun.owner.try(:show_real_name),"/users/#{shixun.owner.login}",target:'_blank' %> |
+<%= link_to shixun.owner.try(:real_name),"/users/#{shixun.owner.login}",target:'_blank' %> |
<% if shixun.status.to_i < 3 %>
<%= link_to "关闭", admins_shixun_setting_path(shixun,status:3,page_no:page_no),method: :put, :class => "", :remote => true %>
diff --git a/app/views/admins/shixuns/shared/_list.html.erb b/app/views/admins/shixuns/shared/_list.html.erb
index 64fb32d56..b5c7cec3b 100644
--- a/app/views/admins/shixuns/shared/_list.html.erb
+++ b/app/views/admins/shixuns/shared/_list.html.erb
@@ -33,7 +33,7 @@
| <%= shixun.challenges.where(:st => 0).size %> |
<%= shixun.challenges.where(:st => 1).size %> |
<%= shixun_authentication_status shixun %> |
- <%= link_to shixun.owner.try(:show_real_name),"/users/#{shixun.owner.try(:login)}",target:'_blank' %> |
+ <%= link_to shixun.owner.try(:real_name),"/users/#{shixun.owner.try(:login)}",target:'_blank' %> |
<%= format_time shixun.created_at %> |
class="ml-3 mr5 magic-checkbox" id="join_teacher_homepage_<%= shixun.id %>">
diff --git a/app/views/admins/subject_authorizations/shared/_list.html.erb b/app/views/admins/subject_authorizations/shared/_list.html.erb
index 7b8da800d..28a699e22 100644
--- a/app/views/admins/subject_authorizations/shared/_list.html.erb
+++ b/app/views/admins/subject_authorizations/shared/_list.html.erb
@@ -29,7 +29,7 @@
<% end %>
|
- <%= user.real_name %> |
+ <%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %> |
<%= link_to "/paths/#{subject.id}", target: '_blank' do %>
<%= overflow_hidden_span subject.name, width: 300 %>
diff --git a/app/views/admins/unit_applies/shared/_apply_item.html.erb b/app/views/admins/unit_applies/shared/_apply_item.html.erb
index d8a2bdcc4..084826d72 100644
--- a/app/views/admins/unit_applies/shared/_apply_item.html.erb
+++ b/app/views/admins/unit_applies/shared/_apply_item.html.erb
@@ -4,7 +4,7 @@
<%= "#{apply&.province.to_s}"+"#{apply&.city.to_s}" %>
|
<%= overflow_hidden_span apply.address %> |
-<%= apply.user.try(:show_real_name) %> |
+<%= link_to apply&.user&.real_name, "/users/#{apply&.user&.login}", target: "_blank" %> |
<%= format_time apply.created_at %> |
<%= agree_link '批准', agree_admins_unit_apply_path(apply, element: ".unit-apply-#{apply.id}"), 'data-confirm': '确认批准通过?' %>
diff --git a/app/views/admins/video_applies/shared/_list.html.erb b/app/views/admins/video_applies/shared/_list.html.erb
index 8ddbfb3ca..5e472bd4b 100644
--- a/app/views/admins/video_applies/shared/_list.html.erb
+++ b/app/views/admins/video_applies/shared/_list.html.erb
@@ -28,7 +28,7 @@
<% end %>
|
- <%= user.real_name %> |
+ <%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %> |
<%= link_to video.title, video.file_url, :target => "_blank" %> |
<%= video.filesize&.to_s(:human_size) %> |
<%= link_to "播放视频",video.file_url, target: "_blank" %> |