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 %>
|
||||
<% course_count = 9 %>
|
||||
<% 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%>
|
||||
<% if course_term == "春季学期"
|
||||
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)%>
|
||||
<% end%>
|
||||
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<% else %>
|
||||
|
||||
<% if cur_school_course.count < 9 %>
|
||||
<span>
|
||||
<%= 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)} %>
|
||||
</li>
|
||||
<% 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%>
|
||||
<% if course_term == "春季学期"
|
||||
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)%>
|
||||
<% end%>
|
||||
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue