From d2db58050d1a622e360649ff9effeb2fd5e39455 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 18 Jun 2014 14:21:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E6=9C=AA?= =?UTF-8?q?=E5=A1=AB=E5=B7=A5=E4=BD=9C=E5=8D=95=E4=BD=8D=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/contests/show_attendingcontest.html.erb | 4 ++++ app/views/layouts/base_courses.html.erb | 2 +- app/views/layouts/base_homework.html.erb | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/contests/show_attendingcontest.html.erb b/app/views/contests/show_attendingcontest.html.erb index d6f614db1..7818f5fb3 100644 --- a/app/views/contests/show_attendingcontest.html.erb +++ b/app/views/contests/show_attendingcontest.html.erb @@ -260,7 +260,9 @@ :<%= format_time c_project.created_at %> <%= l(:label_attendingcontest_spoksman) %> + <% unless c_project.nil? || c_project.user.nil? %> :<%= link_to c_project.user.name,user_path(c_project.user) %> + <% end %>
@@ -295,7 +297,9 @@ :<%= format_time c_softapplication.created_at %> <%= l(:label_attendingcontest_spoksman) %> + <% unless c_softapplication.nil? || c_softapplication.softapplication.nil? || c_softapplication.softapplication.user.nil? %> :<%= link_to c_softapplication.softapplication.user.name,user_path(c_softapplication.softapplication.user) %> + <% end %>
diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index adedb66c5..5ab0a98a9 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -178,7 +178,7 @@ - <% unless @course.teacher.user_extensions.nil? %> + <% unless @course.teacher.user_extensions.nil? || @course.teacher.user_extensions.school.nil? %> <%= l(:label_teacher_work_unit) %> : diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index 88190d536..ce9671ad1 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -116,7 +116,9 @@ <%= l(:label_teacher_work_unit) %> : + <% unless @user.user_extensions.nil? || @user.user_extensions.school.nil? %> <%= link_to @user.user_extensions.school,options={:controller => 'welcome',:action => 'course',:school_id => @user.user_extensions.school.id}, html_options={:method => 'get'} %> + <% end %>