代码和并冲突处理及连接参数
This commit is contained in:
parent
0d2a7d8bfd
commit
79e57e2b7f
|
@ -184,7 +184,7 @@ module OrganizationsHelper
|
|||
|
||||
def excellent_teachers
|
||||
User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
|
||||
from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and u.excellent_teacher =1 order by course_count desc")
|
||||
from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and u.excellent_teacher =1 order by course_count desc").first(5)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% unless excellent_teachers.count == 0 %>
|
||||
<div class="sn-teacher-wrap" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title sn-mb5"><%= field.name %>
|
||||
<%= link_to "更多", teachers_organization_path(@organization, :type => "famous"), :target => "_blank", :class => "more" %>
|
||||
<%= link_to "更多", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => field.id), :target => "_blank", :class => "more" %>
|
||||
</h2>
|
||||
<% excellent_teachers.each do |teacher| %>
|
||||
<div class="sn-teacher-list">
|
||||
|
|
Loading…
Reference in New Issue