<%= csrf_meta_tag %> <%= favicon %> <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'new_user', 'user_leftside','users',:media => 'all' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> <%= javascript_heads %> <%= javascript_include_tag "bootstrap","avatars","new_user"%> <%= heads_for_theme %> <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%>
<%= image_tag(url_to_avatar(@user),width:"206", height: "206", :id=>'nh_user_tx') %> <% if User.current.logged?%> <% if is_current_user%>
<% else %>
<%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %>
<% end %> <% end%>
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
<% end %> <%= link_to("编辑资料", my_account_path, :class => "fr gz_btn mr10") if is_current_user%>

<%= render :partial => 'layouts/user_brief_introduction', :locals => {:user => @user} %>

<%= link_to User.watched_by(@user.id).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"homepageImageNumber" %>
关注
<%= link_to @user.watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"homepageImageNumber", :id => "user_fans_number"%>
粉丝
<%= link_to(format("%.2f" ,get_option_number(@user,1).total_score ).to_i, {:controller => 'users', :action => 'show_new_score', :remote => true, :id => @user.id }, :class => 'homepageImageNumber',:id => 'user_score') %>
积分
<%= link_to "动态",user_activities_path(@user.id),:class => "homepageMenuText"%>
课程 <% if is_current_user%> <% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%> <%=link_to image_tag("../images/menu_setting.png",width:"14px", height: "14px",class: "homepageMenuSetting"), new_course_path%> <% else%> <%=link_to image_tag("../images/menu_setting.png",width:"14px", height: "14px",class: "homepageMenuSetting"), join_private_courses_courses_path ,:remote => true%> <% end%> <% end%>
    <% courses = @user.courses.visible.select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5)%> <%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => @user, :page => 0} %>
项目 <% if is_current_user%> <%=link_to image_tag("../images/menu_setting.png",width:"14px", height: "14px",class: "homepageMenuSetting"), new_project_path%> <% end%>
    <% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%> <%= render :partial => 'layouts/user_projects', :locals => {:projects => projects,:user => @user, :page => 0} %>
<%= link_to '留言',feedback_path(@user),:class=>'homepageMenuText'%>
标签
<%= render :partial => 'tags/user_tag', :locals => {:obj => @user,:object_flag => "1"}%>
<%= yield %>
<%= render :partial => 'layouts/new_feedback' %>
<%= render :partial => 'layouts/footer' %>