From 3097f23c0678130a22280ee6eb5a8ecf43ee840f Mon Sep 17 00:00:00 2001 From: yanxd Date: Thu, 27 Mar 2014 17:12:35 +0800 Subject: [PATCH] shang --- app/views/layouts/base.html.erb | 4 ++-- app/views/welcome/course.html.erb | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index fcf7d2195..962e34774 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -19,11 +19,11 @@ @nav_dispaly_contest_label = 1 elsif (realUrl.match(/course\.trustie\.net/)) @nav_dispaly_course_all_label = 1 - @nav_dispaly_teacher_all_label = 1 + # @nav_dispaly_teacher_all_label = 1 @nav_dispaly_forum_label = 1 elsif (realUrl.match(/user\.trustie\.net/)) @nav_dispaly_project_label = 1 - @nav_dispaly_user_label = 1 + # @nav_dispaly_user_label = 1 @nav_dispaly_forum_label = 1 elsif (realUrl.match(/forge\.trustie\.net/)) @nav_dispaly_project_label = 1 diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb index be6b09d04..d8e2ce70c 100644 --- a/app/views/welcome/course.html.erb +++ b/app/views/welcome/course.html.erb @@ -122,11 +122,13 @@ (<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
- - <%=l :label_main_teacher%>: <%=Course.find_by_extra(project.identifier).try(:teacher).try(:name)%> + + <% course = Course.find_by_extra(project.identifier) %> + <%= course.teacher.user_extensions.occupation.try(:gsub, /(.+)$/, '\1:') %> - - <%= Course.find_by_extra(project.identifier).teacher.user_extensions.occupation %> + + <%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %> + <%#=course.try(:teacher).try(:name)%>