socialforge/app/views/users/show.html.erb

49 lines
2.0 KiB
Plaintext

<script src="/javascripts/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
<input type="hidden" value="<%= @type %>" name="type" id="user_activities_type">
<script>
$(function(){
$($(".homepage_tab_div")[$(".homepage_tab_div").length - 1]).css("border", "none");
});
// 个人主页的tab
function g(o){
return document.getElementById(o);
}
function HoverLi(n){
// g('message_all_list').className='undis';
//如果有N个标签,就将i<=N;
for(var i = 1; i <= 6; i++){
if (g('user_homepage_tab_'+i) != null)
g('user_homepage_tab_'+i).className='flex-cell_homepage';
// if(g('message_list_content_'+i) != null)
// g('message_list_content_'+i).className='undis';
}
// g('message_list_content_'+n).className='dis';
g('user_homepage_tab_'+n).className='homepageClickBackground';
}
</script>
<% if is_current_user %>
<% if task_count(@unsolved_issues_count, @unfinished_homework_count, @unfinished_test_count, @unfinished_poll_count, @anonymous_evaluation_count, @applied_message_alls_count) > 0 %>
<div class="homepagetopBanner mb10" style="width:748px;">
<div class="flex-container_homepage">
<%= render :partial => "users/task_tip" %>
</div>
</div>
<% end %>
<div id="user_homepage_message_list">
<%= render :partial => 'users/user_message_list'%>
</div>
<% else %>
<div class="homepageRightBanner">
<div class="NewsBannerName">Ta的动态</div>
</div>
<!--显示个人主页-->
<% if @user_activities_count > 0 %>
<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities, :page => 0, :type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id), :action => "user_activities"} %>
<% else %>
<div class="mb10">
<%= render :partial => 'users/no_data' %>
</div>
<% end %>
<% end %>