<% if User.current.logged?%>
<%=link_to image_tag(url_to_avatar(@user),width:"74", height: "74", :id=>'nh_user_tx'), my_clear_user_avatar_temp_path, :class => "user_leftinfo_img", :remote => true%>
<% else %>
<% end %>
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
<% end %>
<%=@user.show_name %>
<% if @user.user_extensions && @user.user_extensions.identity %>
<%= get_user_roll @user %>
<% end%>
<%= render :partial => 'layouts/user_brief_introduction', :locals => {:user => @user} %>
<%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %>
<% hidden_courses = Setting.find_by_name("hidden_courses") %>
<% unvisiable = hidden_courses && hidden_courses.value == "1"%>
<% if !unvisiable %>
-
<%= link_to '课程',{:controller => "users", :action => "user_courselist", :id => @user.id}, :id => "user_course_list" %>
<% courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10) %>
<% all_count = @user.courses.visible.where("is_delete =?", 0).count%>
<% if !courses.empty? %>
<% end %>
<% if is_current_user %>
-
<%= link_to "新建课程", new_syllabus_path(:host=> Setting.host_course), :target => "_blank", :style => "font-size:14px;" %>
-
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course), :target => "_blank", :style => "font-size:14px;" %>
-
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true, :method => "post", :style => "font-size:14px;" %>
<% if @user == User.current %>
-
<%=link_to '我的作业', my_homeworks_user_path(@user.id), :target => "_blank", :style => "font-size:14px;" %>
<% end %>
<% end %>
<% end %>
-
<%= link_to '项目',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :id => 'user_project_list'%>
<% all_count = @user.projects.visible.count%>
<% projects = @user.projects.visible.select("projects.*, (SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(10)%>
<% if !projects.empty? %>
<% end %>
<% if is_current_user %>
-
<%= link_to "新建项目", new_project_path(:host=> Setting.host_name), :target => "_blank", :style => "font-size:14px;" %>
-
<%= link_to "加入项目", applied_join_project_path, :remote => true, :method => "post", :style => "font-size:14px;" %>
<% end %>
-
<%= link_to '留言', feedback_path(@user, :host=> Setting.host_user)%>
访问计数 <%= @user.visits.to_i %> (自2016年5月)