diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index fae350a6a..3e41e2c91 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -56,6 +56,7 @@ class MessagesController < ApplicationController all @replies = paginateHelper messages_replies,10 @reply = Message.new(:subject => "RE: #{@message.subject}") + @left_nav_type = 2 render :action => "show", :layout => "base_courses"#by young elsif @project @reply_pages = Paginator.new @reply_count, REPLIES_PER_PAGE, page diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 089333160..7aae73e94 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -54,7 +54,7 @@ module ApplicationHelper # 获取用户单位 # 优先获取高校信息,如果改信息不存在则获取occupation def get_occupation_from_user user - School.where("id=?",user.user_extensions.school_id).first.try(:name).nil? ? user.user_extensions.occupation : School.where("id=?",user.user_extensions.school_id).first.try(:name) + School.where("id=?",user.user_extensions.school_id).first.try(:name).nil? ? user.user_extensions.try(:occupation) : School.where("id=?",user.user_extensions.school_id).first.try(:name) end def update_visiti_count container diff --git a/app/views/courses/private_or_public.js.erb b/app/views/courses/private_or_public.js.erb index 82180c452..835728626 100644 --- a/app/views/courses/private_or_public.js.erb +++ b/app/views/courses/private_or_public.js.erb @@ -1,5 +1,5 @@ <% if params[:user_page].nil? %> - $("#project_info_<%=@course.id %>").html('<%=escape_javascript(render :partial=>'layouts/project_info') %>'); + $("#project_info_<%=@course.id %>").html('<%=escape_javascript(render :partial=>'layouts/course_base_info') %>'); if(document.getElementById("course_is_public")) { <% if @course.is_public == 0%> $("#course_is_public").attr("checked",false); diff --git a/app/views/homework_common/edit.html.erb b/app/views/homework_common/edit.html.erb index 0c120b7c2..d4d9d7c16 100644 --- a/app/views/homework_common/edit.html.erb +++ b/app/views/homework_common/edit.html.erb @@ -36,7 +36,7 @@
-