diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index ec0480c19..353108dc7 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -216,13 +216,13 @@ class AttachmentsController < ApplicationController if @attachment.container.is_a?(News) format.html { redirect_to_referer_or news_path(@attachment.container) } elsif @attachment.container.is_a?(StudentWorksScore) - @is_destroy = true #根据ID删除页面对应的数据,js刷新页面 + @is_destroy = true unless params[:attachment_id] #根据ID删除页面对应的数据,js刷新页面 format.js elsif @attachment.container.is_a?(HomeworkCommon) - @is_destroy = true #根据ID删除页面对应的数据,js刷新页面 + @is_destroy = true unless params[:attachment_id] #根据ID删除页面对应的数据,js刷新页面 format.js elsif @attachment.container.is_a?(StudentWork) - @is_destroy = true #根据ID删除页面对应的数据,js刷新页面 + @is_destroy = true unless params[:attachment_id] #根据ID删除页面对应的数据,js刷新页面 format.js elsif @attachment.container.is_a?(Message) format.html { redirect_to_referer_or new_board_message_path(@attachment.container) } @@ -246,7 +246,7 @@ class AttachmentsController < ApplicationController end format.js - end + end end def delete_homework diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index 0ebdea211..5686c9a1b 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -220,7 +220,6 @@ <% end %> <% if @user.user_extensions && @user.user_extensions.location && !@user.user_extensions.location.empty?%> - <%= l(:label_location) %>: