<% if @course %>
    $("#course_list").html("<%= escape_javascript(render :partial => 'course_list',:locals => {course: @course,all_attachments: @result,sort:@sort,order:@order,curse_attachments:@searched_attach})%>");
    $("#course_filter_order").html("<%= escape_javascript(render :partial => 'course_file_filter_order', :locals => {course: @course,all_attachments: @result,sort:@sort,order:@order,curse_attachments:@searched_attach, tag_name: @tag_name, q: @q})%>");
    $("#attachment_count").html("<%= @result.count%>")
<% else %>
    $("#course_list").html("<%= escape_javascript(render :partial => 'project_list',:locals => {project:@project, all_attachments:@result_search_project, sort:@sort, order:@order, project_attachments:@searched_attach}) %>");
    $("#attachment_count").html("<%= @result_search_project.count%>")
<% end %>
