|
|
|
@ -19,77 +19,8 @@
|
|
|
|
|
<%= javascript_heads %>
|
|
|
|
|
<%= heads_for_theme %>
|
|
|
|
|
<%= call_hook :view_layouts_base_html_head %>
|
|
|
|
|
<!-- page specific tags -->
|
|
|
|
|
<%= yield :header_tags -%>
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
|
<title>个人中心(st)</title>
|
|
|
|
|
<link href="css/public.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
<link href="css/leftside.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
<link href="css/users.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
<script src="js/jquery-1.3.2.js" type="text/javascript"></script>
|
|
|
|
|
<script src="js/jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js" type="text/javascript"></script>
|
|
|
|
|
<script type="text/javascript" src="js/sidebar.js"></script>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="js/jquery.js"></script>
|
|
|
|
|
<script type="text/javascript" src="js/jquery-ui-1.8.4.custom.min.js"></script>
|
|
|
|
|
<script type="text/javascript" src="js/jQuery.peSlider.js"></script>
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
//头部导航
|
|
|
|
|
var menuids=["TopUserNav"] //Enter id(s) of SuckerTree UL menus, separated by commas
|
|
|
|
|
function buildsubmenus(){
|
|
|
|
|
for (var i=0; i<menuids.length; i++){
|
|
|
|
|
var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
|
|
|
|
|
for (var t=0; t<ultags.length; t++){
|
|
|
|
|
ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
|
|
|
|
|
ultags[t].parentNode.onmouseover=function(){
|
|
|
|
|
this.getElementsByTagName("ul")[0].style.display="block"
|
|
|
|
|
}
|
|
|
|
|
ultags[t].parentNode.onmouseout=function(){
|
|
|
|
|
this.getElementsByTagName("ul")[0].style.display="none"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (window.addEventListener)
|
|
|
|
|
window.addEventListener("load", buildsubmenus, false)
|
|
|
|
|
else if (window.attachEvent)
|
|
|
|
|
window.attachEvent("onload", buildsubmenus)
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">//侧导航
|
|
|
|
|
$(function(){
|
|
|
|
|
$(".subNav").click(function(){
|
|
|
|
|
$(this).toggleClass("currentDd").siblings(".subNav").removeClass("currentDd")
|
|
|
|
|
$(this).toggleClass("currentDt").siblings(".subNav").removeClass("currentDt")
|
|
|
|
|
|
|
|
|
|
// 修改数字控制速度, slideUp(500)控制卷起速度
|
|
|
|
|
$(this).next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
function show_window () {
|
|
|
|
|
$('#light').css('display','block');
|
|
|
|
|
$('#fade').css('display','block');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function close_window(){
|
|
|
|
|
$('#light').css('display','none');
|
|
|
|
|
$('#fade').css('display','none');
|
|
|
|
|
}
|
|
|
|
|
//弹框l
|
|
|
|
|
</script> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
@ -103,12 +34,6 @@ $(".subNav").click(function(){
|
|
|
|
|
<%=link_to l(:field_homepage), home_path %> > <%=link_to (@center_flag ? '个人中心' : '个人主页'), user_path(@user) %> > <%=link_to @user.name, user_path(@user) %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<!--<div class="search fl">-->
|
|
|
|
|
<!--<form class="search">-->
|
|
|
|
|
<!--<input type="text" name="serach" placeholder="输入关键词进行搜索" class="search_text fl">-->
|
|
|
|
|
<!--<a href="javascript:void(0);" class="search_btn fl f14 c_white" >搜 索</a>-->
|
|
|
|
|
<!--</form>-->
|
|
|
|
|
<!--</div>-->
|
|
|
|
|
</div><!--TopBar end-->
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
@ -116,7 +41,7 @@ $(".subNav").click(function(){
|
|
|
|
|
<div id="LSide" class="fl">
|
|
|
|
|
<div class="users_info">
|
|
|
|
|
<div class="pic_head">
|
|
|
|
|
<%= image_tag(url_to_avatar(@user), :id=>'nh_user_tx',:style=>"width:216px;height:216px;",:alt=>"头像") %>
|
|
|
|
|
<%= image_tag(url_to_avatar(@user), :id=>'nh_user_tx',:style=>"width:214px;height:214px;overflow:hidden",:alt=>"头像") %>
|
|
|
|
|
<% if @center_flag %>
|
|
|
|
|
<a href="<%= url_for(:controller => 'my', :action => 'clear_user_avatar_temp') %>" data-remote="true" class="pic_edit usersphoto_edit"></a>
|
|
|
|
|
<% end %>
|
|
|
|
@ -146,11 +71,13 @@ $(".subNav").click(function(){
|
|
|
|
|
|
|
|
|
|
<div class="leftbox mt10">
|
|
|
|
|
<ul class="leftbox_ul_left">
|
|
|
|
|
<li>加入时间 :</li>
|
|
|
|
|
<li>最近登录 :</li> <!--加入时间修改为最近登录 -->
|
|
|
|
|
<% if @user.user_extensions!=nil && @user.user_extensions.identity == 2 %>
|
|
|
|
|
<li><%= l(:label_company_name) %> :</li>
|
|
|
|
|
<% elsif !@user.firstname.empty? || !@user.lastname.empty? %>
|
|
|
|
|
<li>真实姓名 :</li>
|
|
|
|
|
<% if @user.user_extensions.identity == 0 %>
|
|
|
|
|
<li>真实姓名 :</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% unless @user.user_extensions.nil? %>
|
|
|
|
|
<% if @user.user_extensions.identity == 0 %>
|
|
|
|
@ -172,8 +99,10 @@ $(".subNav").click(function(){
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
<ul class="leftbox_ul_right c_dgrey">
|
|
|
|
|
<li><%= format_date(@user.created_on) %></li>
|
|
|
|
|
<li style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="<%= @user.show_name %>"><%= @user.show_name %></li>
|
|
|
|
|
<li><%= format_date(@user.last_login_on) %></li> <!-- 加入时间修改为最近登录时间-->
|
|
|
|
|
<% if @user.user_extensions.identity == 0 %>
|
|
|
|
|
<li style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="<%= @user.show_name %>"><%= @user.show_name %></li>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% unless @user.user_extensions.nil? %>
|
|
|
|
|
<% if @user.user_extensions.identity == 0 %>
|
|
|
|
|
<li><%= get_technical_title @user %></li>
|
|
|
|
@ -200,22 +129,18 @@ $(".subNav").click(function(){
|
|
|
|
|
<% if @center_flag %>
|
|
|
|
|
<div class="subNavBox ">
|
|
|
|
|
<div class="subNav "><a href="<%=url_for(:controller => 'users', :action => 'show',:id=>@user.id)%>" class=" f14 c_blue02">动态</a></div>
|
|
|
|
|
<div class="subNav subNav_jiantou"><a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">我的课程<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.count%>)</span></a></div>
|
|
|
|
|
<!--<ul class="navContent " >-->
|
|
|
|
|
<!--<li><a href="javascirpt:void();" >大学计算机基础</a></li>-->
|
|
|
|
|
<!--<li><a href="javascirpt:void();" >大牛软件核心知识开放课程</a></li>-->
|
|
|
|
|
<!--<li><a href="javascirpt:void();" >大学计算机基础</a></li>-->
|
|
|
|
|
<!--<li><a href="javascirpt:void();" >大牛软件核心知识开放课程</a></li>-->
|
|
|
|
|
<!--<li><a href="javascirpt:void();" >大学计算机基础</a></li>-->
|
|
|
|
|
<!--</ul>-->
|
|
|
|
|
<div class="subNav subNav_jiantou"><a href="<%=url_for(:controller => 'users', :action => 'user_projects',:id=>@user.id)%>" class=" f14 c_blue02">我的项目<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span></a></div>
|
|
|
|
|
<!--<ul class="navContent " >-->
|
|
|
|
|
<!--<li><a href="javascirpt:void();" >Trustie-Forge</a></li>-->
|
|
|
|
|
<!--<li><a href="javascirpt:void();" >Trustie-weekly</a></li>-->
|
|
|
|
|
<!--<li><a href="javascirpt:void();" >大学计算机基础</a></li>-->
|
|
|
|
|
<!--<li><a href="javascirpt:void();" >大牛软件核心知识开放课程</a></li>-->
|
|
|
|
|
<!--<li><a href="javascirpt:void();" >大学计算机基础</a></li>-->
|
|
|
|
|
<!--</ul>-->
|
|
|
|
|
<div class="subNav subNav_jiantou">
|
|
|
|
|
<a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">
|
|
|
|
|
我的课程
|
|
|
|
|
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.count%>)</span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="subNav subNav_jiantou">
|
|
|
|
|
<a href="<%=url_for(:controller => 'users', :action => 'user_projects',:id=>@user.id)%>" class=" f14 c_blue02">
|
|
|
|
|
我的项目
|
|
|
|
|
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="subNav "><a href="<%= url_for(:controller => 'my', :action => 'account') %>" class=" f14 c_blue02">编辑资料</a></div>
|
|
|
|
|
</div><!--侧导航 end-->
|
|
|
|
|
<% end %>
|
|
|
|
@ -256,16 +181,18 @@ $(".subNav").click(function(){
|
|
|
|
|
<%= render :partial => 'layouts/user_watch_list', :locals => {:user => @user} %>
|
|
|
|
|
<%= render :partial => 'layouts/user_fans_list', :locals => {:user => @user} %>
|
|
|
|
|
<% visitor_count,visitor_list = get_visitor_users(@user) %>
|
|
|
|
|
<div class="leftbox mt10" style="display:<%= visitor_count==0 ? 'none' : 'block' %>">
|
|
|
|
|
<h4 class="fl">访客</h4><a href="<%=url_for(:controller => 'users', :action => 'user_visitorlist', :id=>@user.id)%>" data-count="<%= visitor_count %>" style="display:<%= visitor_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="mt5">
|
|
|
|
|
<% for visitor in visitor_list %>
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(visitor.user), :style => "width:38px;height:38px;"), user_path(visitor.user), :class => "pic_members", :title => "#{visitor.user.name}" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% if(User.current.admin?) %>
|
|
|
|
|
<div class="leftbox mt10" style="display:<%= visitor_count==0 ? 'none' : 'block' %>">
|
|
|
|
|
<h4 class="fl">访客</h4><a href="<%=url_for(:controller => 'users', :action => 'user_visitorlist', :id=>@user.id)%>" data-count="<%= visitor_count %>" style="display:<%= visitor_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="mt5">
|
|
|
|
|
<% for visitor in visitor_list %>
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(visitor.user), :style => "width:38px;height:38px;"), user_path(visitor.user), :class => "pic_members", :title => "#{visitor.user.name}" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
</div><!--LSide end-->
|
|
|
|
|
|
|
|
|
@ -320,7 +247,7 @@ $(".subNav").click(function(){
|
|
|
|
|
<span>48px*48px</span> <br />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl mb10"></div>
|
|
|
|
|
<a href="javascript:hideModal();" class=" fr grey_btn mr2"> 取 消</a>
|
|
|
|
|
<a href="javascript:hideModal();" class=" fr grey_btn mr15"> 取 消</a>
|
|
|
|
|
<a href="<%= url_for(:controller => 'my', :action => 'save_user_avatar') %>" data-remote="true" class="blue_btn fr mr10">确 定</a>
|
|
|
|
|
|
|
|
|
|
</div><!--talknew end-->
|
|
|
|
|