hjq_resource
txz 9 years ago
commit 1f95495f52

@ -183,7 +183,7 @@ module OrganizationsHelper
end
def excellent_teachers
User.where("excellent_teacher =?",true)
User.where("excellent_teacher =?",true).first(5)
end
end

@ -1,4 +1,5 @@
<div class="sn-teacher-wrap" style="display:<%= field.hide == 0?'block':'none' %>;">
<% 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" %>
</h2>
@ -23,8 +24,10 @@
<div class="sn-cl"></div>
</div>
<% end %>
</div>
</div>
<script>
<script>
$(".sn-teacher-list:last").addClass("sn-border-none");
</script>
</script>
<% end %>

Loading…
Cancel
Save