搜索课程

This commit is contained in:
yuanke 2016-10-09 13:48:38 +08:00
parent c90d8d6bea
commit 11edc93c0f
1 changed files with 11 additions and 2 deletions

View File

@ -1,8 +1,17 @@
<% 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><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>
<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">