Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
parent
98f38b0a5b
commit
6835fb29cd
|
@ -129,6 +129,7 @@
|
||||||
<%# User.current.logged? ? course_count = 9 : course_count = 10 %>
|
<%# User.current.logged? ? course_count = 9 : course_count = 10 %>
|
||||||
<% course_count = 9 %>
|
<% course_count = 9 %>
|
||||||
<% all_new_hot_course = find_all_new_hot_course(course_count, @school_id, year_now, course_term)%>
|
<% all_new_hot_course = find_all_new_hot_course(course_count, @school_id, year_now, course_term)%>
|
||||||
|
|
||||||
<% while all_new_hot_course.count < course_count%>
|
<% while all_new_hot_course.count < course_count%>
|
||||||
<% if course_term == "春季学期"
|
<% if course_term == "春季学期"
|
||||||
year_now -= 1
|
year_now -= 1
|
||||||
|
@ -140,9 +141,11 @@
|
||||||
<% all_new_hot_course += find_all_new_hot_course(course_count-all_new_hot_course.count, @school_id, year_now, course_term)%>
|
<% all_new_hot_course += find_all_new_hot_course(course_count-all_new_hot_course.count, @school_id, year_now, course_term)%>
|
||||||
<% end%>
|
<% end%>
|
||||||
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
<% if cur_school_course.count < 9 %>
|
<% if cur_school_course.count < 9 %>
|
||||||
<span>
|
<span>
|
||||||
<%= render :partial => 'more_course', :locals => {:school_id => nil}%>
|
<%= render :partial => 'more_course', :locals => {:school_id => nil}%>
|
||||||
|
@ -160,6 +163,7 @@
|
||||||
<%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_less_course)} %>
|
<%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_less_course)} %>
|
||||||
</li>
|
</li>
|
||||||
<% all_new_hot_course = find_all_new_hot_course(9-cur_school_course.count, @school_id, year_now, course_term)%>
|
<% all_new_hot_course = find_all_new_hot_course(9-cur_school_course.count, @school_id, year_now, course_term)%>
|
||||||
|
|
||||||
<% while (all_new_hot_course.count + cur_school_course.count) < 9%>
|
<% while (all_new_hot_course.count + cur_school_course.count) < 9%>
|
||||||
<% if course_term == "春季学期"
|
<% if course_term == "春季学期"
|
||||||
year_now -= 1
|
year_now -= 1
|
||||||
|
@ -171,9 +175,11 @@
|
||||||
<% all_new_hot_course += find_all_new_hot_course(9-(all_new_hot_course.count + cur_school_course.count), @school_id, year_now, course_term)%>
|
<% all_new_hot_course += find_all_new_hot_course(9-(all_new_hot_course.count + cur_school_course.count), @school_id, year_now, course_term)%>
|
||||||
<% end%>
|
<% end%>
|
||||||
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue