You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/views/welcome/search.js.erb

17 lines
1.1 KiB

<% case @search_type%>
<% when 'all'%>
$("#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_4").html('<%= escape_javascript(render :partial => 'search_course_results',:locals => {:courses=>@courses})%>');
<% when 'project'%>
$("#searchContent_6").html('<%= escape_javascript(render :partial => 'search_project_results',:locals => {:projects=>@projects})%>');
<% when 'attachment'%>
$("#searchContent_5").html('<%= escape_javascript(render :partial => 'search_attachment_results',:locals => {:attachments=>@attachments})%>');
<% when 'memo'%>
$("#searchContent_7").html('<%= escape_javascript(render :partial => 'search_memo_results',:locals => {:memos=>@memos})%>');
<%else%>
<%end %>