% current_user = @user == User.current %>
<% str = current_user ? '我' : 'TA' %>
<% 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 %>