<% current_user = @user == User.current %> <% str = current_user ? '我' : 'TA' %>
<%= current_user ? "" : "TA的" %>经验值 <%= link_to @user.experience, user_experience_user_path(@user) %>
<%= current_user ? "" : "TA的" %>金币 <%= link_to @user.grade, user_grade_user_path(@user), :id => "user_code" %>
<%= image_tag(url_to_avatar(@user), :alt => "头像", :nhname => "avatar_image", :id => "user_avatar_show") %> <% if current_user || User.current.admin? %>

修改头像

<% end %>
<%= current_user ? "" : "TA的" %>粉丝 <%= link_to @user_fanlist_count, user_fanslist_user_path(@user), :id => "user_h_fan_count" %>
<%= current_user ? "" : "TA的" %>关注 <%= link_to @user_watchlist_count, user_watchlist_user_path(@user) %>
<%= current_user ? @user.show_real_name : @user.show_name %>
<%= current_user ? @user.identity : (@user.identity == "学生" ? "" : @user.identity) %> <% if current_user %> <% if @user.authentication %> <% else %> <% apply_auth = ApplyUserAuthentication.where(:user_id => @user.id, :auth_type => 1).last %> <% end %> <% if @user.professional_certification %> <% else %> <% apply_auth = ApplyUserAuthentication.where(:user_id => @user.id, :auth_type => 2).last %> <% end %> <% if @user.try(:phone).blank? %> <% else %> <% end %> <% if @user.try(:mail).blank? %> <% else %> <% end %> <% if @user.department_members.count > 0 %> <% end %> <% else %> <% if @user.authentication %> <% else %> <% apply_auth = ApplyUserAuthentication.where(:user_id => @user.id, :auth_type => 1).last %> <% end %> <% if @user.professional_certification %> <% else %> <% apply_auth = ApplyUserAuthentication.where(:user_id => @user.id, :auth_type => 2).last %> <% end %> <% if @user.try(:phone).blank? %> <% else %> <% end %> <% if @user.try(:mail).blank? %> <% else %> <% end %> <% if @user.department_members.count > 0 %> <% end %> <% end %>

<% if current_user %> <%= @user.user_extensions.brief_introduction.blank? ? "这家伙很懒,什么都没留下~" : @user.user_extensions.brief_introduction %> <% else %> <%= @user.user_extensions.brief_introduction.blank? ? "这家伙很懒,什么都没留下~" : @user.user_extensions.brief_introduction %> <% end %>

<% if current_user %> <% if @can_attendance %> 签到 <% if @apply_trial %> 授权申请 <% end %>
明日签到 +<%= @next_attachment_score < 100 ? (@next_attachment_score + 10) : 100 %> 金币 <% else %> 已签到 <% if @apply_trial %> 授权申请 <% end %>
明日签到 +<%= @next_attachment_score %> 金币 <% end %> <% else %> <% if (@user.watched_by?(User.current)) %> <%= link_to "取消关注", unwatch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id, :className => "user_default_btn user_watch_btn user_private_btn fl mr20"), :class => "user_default_btn user_watch_btn user_private_btn fl mr20", :id => "cancel_watch", :method => "post", :remote => "true" %> <% else %> <%= link_to "关注", watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id, :className => "user_default_btn user_watch_btn user_private_btn fl mr20"), :class => "user_default_btn user_watch_btn user_private_btn fl mr20", :method => "post", :remote => "true" %> <% end %> <%= link_to "私信", message_detail_user_path(User.current, :user_id => @user.id), :class => "user_default_btn user_private_btn fl" %> <% end %>
<% if @user.user_extensions.try(:identity) == 0 %>
  • <%= link_to "全部", user_path(@user, :type => "a_course"), :remote => true %>
  • <%= link_to str + "管理的", user_path(@user, :type => "p_course"), :remote => true %>
  • <%= link_to str + "学习的", user_path(@user, :type => "l_course"), :remote => true %>
  • <%= link_to "全部", user_path(@user, :type => "a_shixun"), :remote => true %>
  • <%= link_to str + "管理的", user_path(@user, :type => "p_shixun"), :remote => true %>
  • <%= link_to str + "学习的", user_path(@user, :type => "l_shixun"), :remote => true %>
  • <%= link_to "全部", user_path(@user, :type => "a_path"), :remote => true %>
  • <%= link_to str + "管理的", user_path(@user, :type => "p_path"), :remote => true %>
  • <%= link_to str + "学习的", user_path(@user, :type => "l_path"), :remote => true %>
  • <% else %>
  • <%= link_to "全部", user_path(@user, :type => "a_course"), :remote => true %>
  • <%= link_to str + "学习的", user_path(@user, :type => "l_course"), :remote => true %>
  • <%= link_to str + "管理的", user_path(@user, :type => "p_course"), :remote => true %>
  • <%= link_to "全部", user_path(@user, :type => "a_shixun"), :remote => true %>
  • <%= link_to str + "学习的", user_path(@user, :type => "l_shixun"), :remote => true %>
  • <%= link_to str + "管理的", user_path(@user, :type => "p_shixun"), :remote => true %>
  • <%= link_to "全部", user_path(@user, :type => "a_path"), :remote => true %>
  • <%= link_to str + "学习的", user_path(@user, :type => "l_path"), :remote => true %>
  • <%= link_to str + "管理的", user_path(@user, :type => "p_path"), :remote => true %>
  • <% end %>
  • <%= link_to "全部", user_path(@user, :type => "a_project"), :remote => true %>
  • <%= link_to str + "管理的", user_path(@user, :type => "p_project"), :remote => true %>
  • <%= link_to str + "参与的", user_path(@user, :type => "l_project"), :remote => true %>
  • <% if @user.user_extensions.try(:identity) == 0 && current_user %>
    ">
  • <%= link_to "私有题库", user_path(@user, :type => "m_bank"), :remote => true %>
  • <%= link_to "公共题库", user_path(@user, :type => "p_bank"), :remote => true %>
  • <% end %>
    <% if @type == "m_bank" || @type == "p_bank" %> <%= render :partial => "users/m_bank" %> <% elsif @type == 'a_project' || @type == 'l_project' || @type == 'p_project' %> <%= render :partial => "users/l_project" %> <% elsif @type == 'a_course' || @type == 'l_course' || @type == 'p_course' %> <%= render :partial => "users/l_course" %> <% elsif @type == 'a_shixun' || @type == 'l_shixun' || @type == "p_shixun" %> <%= render :partial => "users/l_shixun" %> <% elsif @type == 'a_path' || @type == 'l_path' || @type == "p_path" %> <%= render :partial => "users/p_path" %> <% end %>