From c4b2c47dc76d76b74784f8f89b1cada1eb4e1d1b Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 26 Jun 2014 11:40:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BD=9C=E4=B8=9A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_homework.html.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index 396457c3..6fb6e71c 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -38,7 +38,7 @@ <%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index' %>

<%= link_to "主页", home_path %> > <%= link_to l(:label_course_practice), :controller => 'courses', :action => 'index' %> > - <%= link_to(@bid.courses.first.name.to_s, homework_course_path(@bid.courses.first)) if @bid.courses.first %> + <%= link_to(course.name.to_s, homework_course_path(course)) if course %> > <%= link_to(@bid.name, respond_path(@bid)) %>

@@ -65,7 +65,7 @@ - <%= link_to @bid.courses.first.name.to_s, homework_course_path(@bid.courses.first) if @bid.courses.first %> + <%= link_to course.name.to_s, homework_course_path(course) if course %> @@ -211,9 +211,9 @@
  • <%= link_to l(:label_question_student), {:controller => 'bids', :action => 'show'}, :class => link_class(:respond) %>
  • - <% if User.current.member_of_course? @bid.courses.first %> + <% if User.current.member_of_course? course %>
  • - <% if User.current.logged? && @bid.courses.first && (!Member.where('user_id = ? and course_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?', 5, 10, 7)).size >0) %> + <% if User.current.logged? && course && (!Member.where('user_id = ? and course_id = ?', User.current.id, course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, course.id).first.roles&Role.where('id = ? or id = ? or id =?', 5, 10, 7)).size >0) %> <%= link_to l(:label_homework_commit), {:controller => 'bids', :action => 'show_course'}, :class => link_class(:course) %> <% else %> <%= link_to l(:label_homework_info), {:controller => 'bids', :action => 'show_course'}, :class => link_class(:course) %> @@ -221,9 +221,9 @@ <% end %>
  • <% end %> - - + + + <%= yield %>