搜索课程
This commit is contained in:
parent
eb3a463166
commit
cd34388909
|
@ -2,10 +2,10 @@
|
|||
<% syllabuses.each do |syllabus|%>
|
||||
<ul class="searchContent w968">
|
||||
<li class="f16 mb5 fontGrey3"><a href="javascript:void(0);" 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_member.count%></span><span class="mr30">班级:<%=syllabus.courses.count%></span><span class="mr30">更新时间:<%=format(syllabus.updated_at)%></span><span class="mr30">单位:<%=syllabus.user.user_extensions.occupation.present? ? syllabus.user.user_extensions.occupation:'' %></span></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 courses,:params => {:controller => 'welcome', :action => 'search',:search_type=>'course'}%>
|
||||
<%= paginate syllabuses,:params => {:controller => 'welcome', :action => 'search',:search_type=>'syllabus'}%>
|
||||
</div>
|
||||
<% end %>
|
|
@ -3,13 +3,15 @@
|
|||
$("#searchContent_1").html('<%= escape_javascript(render :partial => 'search_all_results',:locals => {:all_results=> @alls})%>');
|
||||
<% when 'user'%>
|
||||
$("#searchContent_2").html('<%= escape_javascript(render :partial => 'search_user_results',:locals => {:users=>@users})%>');
|
||||
<% when 'syllabus'%>
|
||||
$("#searchContent_3").html('<%= escape_javascript(render :partial => 'search_syllabus_results',:locals => {:syllabuses=>@syllabuses})%>');
|
||||
<% when 'course'%>
|
||||
$("#searchContent_3").html('<%= escape_javascript(render :partial => 'search_course_results',:locals => {:courses=>@courses})%>');
|
||||
$("#searchContent_4").html('<%= escape_javascript(render :partial => 'search_course_results',:locals => {:courses=>@courses})%>');
|
||||
<% when 'project'%>
|
||||
$("#searchContent_5").html('<%= escape_javascript(render :partial => 'search_project_results',:locals => {:projects=>@projects})%>');
|
||||
$("#searchContent_6").html('<%= escape_javascript(render :partial => 'search_project_results',:locals => {:projects=>@projects})%>');
|
||||
<% when 'attachment'%>
|
||||
$("#searchContent_4").html('<%= escape_javascript(render :partial => 'search_attachment_results',:locals => {:attachments=>@attachments})%>');
|
||||
$("#searchContent_5").html('<%= escape_javascript(render :partial => 'search_attachment_results',:locals => {:attachments=>@attachments})%>');
|
||||
<% when 'memo'%>
|
||||
$("#searchContent_6").html('<%= escape_javascript(render :partial => 'search_memo_results',:locals => {:memos=>@memos})%>');
|
||||
$("#searchContent_7").html('<%= escape_javascript(render :partial => 'search_memo_results',:locals => {:memos=>@memos})%>');
|
||||
<%else%>
|
||||
<%end %>
|
Loading…
Reference in New Issue