admins page change

dev_hss
SylorHuang 5 years ago
parent 48322cb6a7
commit 3970b808d2

@ -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,

@ -16,7 +16,7 @@
<td><%= apply.id %></td>
<td class="text-left"> <%= apply.name %></td>
<td class="text-left"> <%= apply.school.try(:name) %></td>
<td><%= apply.user.show_real_name %></td>
<td><%= apply&.user&.real_name %></td>
<td><%= format_time apply.created_at %></td>
<td class="action-container">
<%= agree_link '批准', agree_admins_department_apply_path(apply, element: ".department-apply-#{apply.id}"), 'data-confirm': '确认批准通过?' %>

@ -27,7 +27,7 @@
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %>
</td>
<td><%= user.real_name %></td>
<td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left"><%= link_to library.title, library_path(library), :target => "_blank" %></td>
<td class="text-left"><%= overflow_hidden_span library.content[0..50]%></td>
<td><%= apply.updated_at.strftime('%Y-%m-%d %H:%M') %></td>

@ -27,7 +27,7 @@
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %>
</td>
<td><%= user.real_name %></td>
<td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left"><%= link_to package.title, "/crowdsourcing/#{package.id}", :target => "_blank" %></td>
<td class="text-left"><%= overflow_hidden_span package.content[0..50] %></td>
<td><%= apply.updated_at.strftime('%Y-%m-%d %H:%M') %></td>

@ -27,7 +27,7 @@
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %>
</td>
<td><%= user.real_name %></td>
<td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left">
<%= link_to "/shixuns/#{shixun.identifier}", target: '_blank' do %>
<%= overflow_hidden_span shixun.name, width: 300 %>

@ -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' } %>
</td>
<td><%= link_to shixun.owner.try(:show_real_name),"/users/#{shixun.owner.login}",target:'_blank' %></td>
<td><%= link_to shixun.owner.try(:real_name),"/users/#{shixun.owner.login}",target:'_blank' %></td>
<td>
<% if shixun.status.to_i < 3 %>
<%= link_to "关闭", admins_shixun_setting_path(shixun,status:3,page_no:page_no),method: :put, :class => "", :remote => true %>

@ -33,7 +33,7 @@
<td><%= shixun.challenges.where(:st => 0).size %></td>
<td><%= shixun.challenges.where(:st => 1).size %></td>
<td class="shixuns-status-<%= shixun.status %>"><%= shixun_authentication_status shixun %></td>
<td><%= link_to shixun.owner.try(:show_real_name),"/users/#{shixun.owner.try(:login)}",target:'_blank' %></td>
<td><%= link_to shixun.owner.try(:real_name),"/users/#{shixun.owner.try(:login)}",target:'_blank' %></td>
<td><%= format_time shixun.created_at %></td>
<td class="homepage_teacher">
<input type="checkbox" name="sigle_show" value="<%= shixun.id %>" <%= shixun.sigle_training ? "checked" : "" %> class="ml-3 mr5 magic-checkbox" id="join_teacher_homepage_<%= shixun.id %>">

@ -29,7 +29,7 @@
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %>
</td>
<td><%= user.real_name %></td>
<td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left">
<%= link_to "/paths/#{subject.id}", target: '_blank' do %>
<%= overflow_hidden_span subject.name, width: 300 %>

@ -4,7 +4,7 @@
<%= "#{apply&.province.to_s}"+"#{apply&.city.to_s}" %>
</td>
<td class="text-left"><%= overflow_hidden_span apply.address %></td>
<td><%= apply.user.try(:show_real_name) %></td>
<td><%= link_to apply&.user&.real_name, "/users/#{apply&.user&.login}", target: "_blank" %></td>
<td><%= format_time apply.created_at %></td>
<td class="action-container">
<%= agree_link '批准', agree_admins_unit_apply_path(apply, element: ".unit-apply-#{apply.id}"), 'data-confirm': '确认批准通过?' %>

@ -28,7 +28,7 @@
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %>
</td>
<td><%= user.real_name %></td>
<td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left"><%= link_to video.title, video.file_url, :target => "_blank" %></td>
<td><%= video.filesize&.to_s(:human_size) %></td>
<td class="text-left"><%= link_to "播放视频",video.file_url, target: "_blank" %></td>

Loading…
Cancel
Save