diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index d24427a9d..699a5e8ca 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -73,7 +73,6 @@ class WordsController < ApplicationController # render 'test/index' # } format.js { - @reply_type = params[:reply_type] @user_activity_id = params[:user_activity_id] @activity = JournalsForMessage.find(parent_id) @is_activity = params[:is_activity] @@ -95,6 +94,9 @@ class WordsController < ApplicationController @user = User.find(@journal_destroyed.jour_id) @jours_count = @user.journals_for_messages.where('m_parent_id IS NULL').count @is_user = true + @user_activity_id = params[:user_activity_id] if params[:user_activity_id] + @is_activity = params[:is_activity].to_i if params[:is_activity] + @activity = @journal_destroyed.parent if @journal_destroyed.parent elsif @journal_destroyed.jour_type == 'HomeworkCommon' @homework = HomeworkCommon.find @journal_destroyed.jour_id if params[:user_activity_id] diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb index e30fd1824..d7247621a 100644 --- a/app/views/users/_user_journalsformessage.html.erb +++ b/app/views/users/_user_journalsformessage.html.erb @@ -39,6 +39,22 @@ 更新时间:<%= format_time(PrincipalActivity.where("principal_act_type='#{activity.class}' and principal_act_id =#{activity.id}").first.updated_at) %>
+ <% if activity.user == User.current || User.current.admin?%> +
+ +
+ <% end%>
@@ -71,7 +87,7 @@