|
|
@ -47,7 +47,11 @@ class AtMessage < ActiveRecord::Base
|
|
|
|
"回复帖子: "
|
|
|
|
"回复帖子: "
|
|
|
|
end + at_message.subject
|
|
|
|
end + at_message.subject
|
|
|
|
when 'JournalsForMessage'
|
|
|
|
when 'JournalsForMessage'
|
|
|
|
"作业: #{at_message.jour.name} 中留言"
|
|
|
|
if at_message.jour_type == 'Principal'
|
|
|
|
|
|
|
|
"留言: 在#{at_message.at_user.show_name}主页中留言"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
"作业: #{at_message.jour.name} 中留言"
|
|
|
|
|
|
|
|
end
|
|
|
|
else
|
|
|
|
else
|
|
|
|
logger.error "error type: #{at_message_type}"
|
|
|
|
logger.error "error type: #{at_message_type}"
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -92,7 +96,12 @@ class AtMessage < ActiveRecord::Base
|
|
|
|
when 'Message'
|
|
|
|
when 'Message'
|
|
|
|
{controller: :boards, action: :show, project_id: at_message.board.project, id: at_message.board}
|
|
|
|
{controller: :boards, action: :show, project_id: at_message.board.project, id: at_message.board}
|
|
|
|
when 'JournalsForMessage'
|
|
|
|
when 'JournalsForMessage'
|
|
|
|
{controller: :homework_common, action: :index, course: at_message.jour.course_id}
|
|
|
|
if at_message.jour_type == 'Principal'
|
|
|
|
|
|
|
|
{controller: :users, action: :user_messages, id: at_message.at_user}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{controller: :homework_common, action: :index, course: at_message.jour.course_id}
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
logger.error "error type: #{at_message_type}"
|
|
|
|
logger.error "error type: #{at_message_type}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|