This commit is contained in:
yuanke 2016-10-09 13:57:27 +08:00
parent 11edc93c0f
commit fdcb13a3de
3 changed files with 17 additions and 4 deletions

View File

@ -25,6 +25,19 @@
</li>
<div class="cl"></div>
</ul>
<% when 'syllabus'%>
<ul class="searchContent w968">
<li class="f16 mb5 fontGrey3">
<a href="<%= syllabus_path(item.id)%>" class="fontGrey3 fl"><%= item.try(:highlight).try(:title) ? item.highlight.title[0].html_safe : item.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">创建者:<%=item.user.login+"("+syllabus.user.show_name+")"%></span>
<span class="mr30">教师团队:<%=item.syllabus_members.count%></span>
<span class="mr30">班级:<%=item.courses.count%></span>
<span class="mr30">更新时间:<%=format_date(item.updated_at)%></span>
<span class="mr30">单位:<%=item.user.user_extensions.occupation.present? ? item.user.user_extensions.occupation : '' %></span>
</li>
</ul>
<% when 'course'%>
<ul class="searchContent">
<li class="fl">

View File

@ -2,7 +2,7 @@
<% 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"><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">

View File

@ -86,9 +86,9 @@
<li id="searchBaner_2" onclick="HoverLi(2);on_click_search(2);"><a href="javascript:void(0);" id="searchType_2" class="fontGrey2 f14">用户<span class="numRed" style="font-weight:normal;"><font id="searchNum_2" class="numRed">(<%= @users_count%>)</font></span></a></li>
<li id="searchBaner_3" onclick="HoverLi(3);on_click_search(3);"><a href="javascript:void(0);" id="searchType_3" class="fontGrey2 f14">课程<span style="font-weight:normal;"><font id="searchNum_3" class="numRed">(<%=@syllabus_count%>)</font></span></a></li>
<li id="searchBaner_4" onclick="HoverLi(4);on_click_search(4);"><a href="javascript:void(0);" id="searchType_4" class="fontGrey2 f14">班级<span style="font-weight:normal;"><font id="searchNum_4" class="numRed">(<%=@course_count%>)</font></span></a></li>
<li id="searchBaner_5" onclick="HoverLi(5);on_click_search(5);"><a href="javascript:void(0);" id="searchType_5" class="fontGrey2 f14">资源<span class="numRed" style="font-weight:normal;"><font id="searchNum_4" class="numRed">(<%= @attach_count%>)</font></span></a></li>
<li id="searchBaner_6" onclick="HoverLi(6);on_click_search(6);"><a href="javascript:void(0);" id="searchType_6" class="fontGrey2 f14">项目<span class="numRed" style="font-weight:normal;"><font id="searchNum_5" class="numRed">(<%= @project_count%>)</font></span></a></li>
<li id="searchBaner_7" onclick="HoverLi(7);on_click_search(7);"><a href="javascript:void(0);" id="searchType_7" class="fontGrey2 f14">帖子<span class="numRed" style="font-weight:normal;"><font id="searchNum_6" class="numRed">(<%= @memo_count%>)</font></span></a></li>
<li id="searchBaner_5" onclick="HoverLi(5);on_click_search(5);"><a href="javascript:void(0);" id="searchType_5" class="fontGrey2 f14">资源<span class="numRed" style="font-weight:normal;"><font id="searchNum_5" class="numRed">(<%= @attach_count%>)</font></span></a></li>
<li id="searchBaner_6" onclick="HoverLi(6);on_click_search(6);"><a href="javascript:void(0);" id="searchType_6" class="fontGrey2 f14">项目<span class="numRed" style="font-weight:normal;"><font id="searchNum_6" class="numRed">(<%= @project_count%>)</font></span></a></li>
<li id="searchBaner_7" onclick="HoverLi(7);on_click_search(7);"><a href="javascript:void(0);" id="searchType_7" class="fontGrey2 f14">帖子<span class="numRed" style="font-weight:normal;"><font id="searchNum_7" class="numRed">(<%= @memo_count%>)</font></span></a></li>
<div class="cl"></div>
</ul>
<ul id="searchTips" style="display:none;">