From 353f484bbe3a7ce86dbeef7a0667916e4993862c Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 17 Sep 2014 17:07:18 +0800 Subject: [PATCH] =?UTF-8?q?course=E9=A6=96=E9=A1=B5=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/welcome/course.html.erb | 53 ++++++++++++++++--------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb index f57bc97d7..51f082ae6 100644 --- a/app/views/welcome/course.html.erb +++ b/app/views/welcome/course.html.erb @@ -39,30 +39,31 @@
- <% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %> + <% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %> + <% else %> + <% if @school_id == "0" %> <% else %> - <% if @school_id == "0" %> - <% else %> - <% if @school_id.nil? %> - <%= link_to School.find(User.current.user_extensions.school.id).name, options={:action => 'course', :school_id => User.current.user_extensions.school.id}, html_options={:class => 'font_welcome_school', :method => 'get'} %> -
- <% else %> - <%= link_to School.find(@school_id).name, options={:action => 'course', :school_id => @school_id}, html_options={:class => 'font_welcome_school', :method => 'get'} %> -
- <% end %> - <% end %> - <% end %>
+ <% if @school_id.nil? %> + <%= link_to School.find(User.current.user_extensions.school.id).name, options={:action => 'course', :school_id => User.current.user_extensions.school.id}, html_options={:class => 'font_welcome_school', :method => 'get'} %> +
+ <% else %> + <%= link_to School.find(@school_id).name, options={:action => 'course', :school_id => @school_id}, html_options={:class => 'font_welcome_school', :method => 'get'} %> +
+ <% end %> + <% end %> + <% end %> +
<% unless @course_page.nil? %> - <%= @course_page.title %> + <%= @course_page.title %> - <% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %> - , <%= @course_page.description %> - <% else %> - <% if @school_id == "0" %> + <% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %> , <%= @course_page.description %> + <% else %> + <% if @school_id == "0" %> + , <%= @course_page.description %> + <% end %> <% end %> <% end %> - <% end %>
<% else %> - <% if school_course.count < 10 %> + <% if school_course.count < 9 %> <%= render :partial => 'more_course', :locals => {:school_id => nil}%> @@ -110,7 +111,7 @@