socialforge/app/views/welcome/_search_syllabus_results.ht...

20 lines
1.4 KiB
Plaintext

<% unless syllabuses.nil? || syllabuses.empty?%>
<% syllabuses.each do |syllabus|%>
<ul class="searchContent w968">
<li class="f16 mb5 fontGrey3">
<!--<a href="<%#= syllabus_path(syllabus.id)%>" class="fontGrey3 fl"><span class="c_red"><%#= syllabus.title %></span>课程</a>-->
<a href="<%= syllabus_path(syllabus.id)%>" class="fontGrey3 fl"><%= syllabus.try(:highlight).try(:title) ? syllabus.highlight.title[0].html_safe : syllabus.title %>课程</a>
<div class="mt5 fl"><img src="images/search_icon_03.png" width="8" height="16" class="fl" /><span class="searchTag">课程</span></div><div class="cl"></div></li>
<li class="f12 fontGrey2">
<span class="mr30">创建者:<%=syllabus.user.login+"("+syllabus.user.show_name+")"%></span>
<span class="mr30">教师团队:<%=syllabus.syllabus_members.count%></span>
<span class="mr30">班级:<%=syllabus.courses.count%></span>
<span class="mr30">更新时间:<%=format_date(syllabus.updated_at)%></span>
<span class="mr30">单位:<%=syllabus.user.user_extensions.occupation.present? ? syllabus.user.user_extensions.occupation : '' %></span>
</li>
</ul>
<% end %>
<div class="pageRoll">
<%= paginate syllabuses,:params => {:controller => 'welcome', :action => 'search',:search_type=>'syllabus'}%>
</div>
<% end %>