hjq_resource
txz 9 years ago
commit 1f95495f52

@ -183,7 +183,7 @@ module OrganizationsHelper
end end
def excellent_teachers def excellent_teachers
User.where("excellent_teacher =?",true) User.where("excellent_teacher =?",true).first(5)
end end
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 %> <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"), :target => "_blank", :class => "more" %>
</h2> </h2>
@ -23,8 +24,10 @@
<div class="sn-cl"></div> <div class="sn-cl"></div>
</div> </div>
<% end %> <% end %>
</div> </div>
<script> <script>
$(".sn-teacher-list:last").addClass("sn-border-none"); $(".sn-teacher-list:last").addClass("sn-border-none");
</script> </script>
<% end %>

Loading…
Cancel
Save