2014-07-18 16:39:39 +08:00
|
|
|
|
<% @nav_dispaly_home_path_label = 1
|
|
|
|
|
@nav_dispaly_main_course_label = 1
|
|
|
|
|
@nav_dispaly_main_project_label = 1
|
|
|
|
|
@nav_dispaly_main_contest_label = 1 %>
|
|
|
|
|
<% @nav_dispaly_forum_label = 1%>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<% @nav_dispaly_user_label = show_item_on_navbar(params) %>
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<title><%= h html_title %></title>
|
|
|
|
|
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
|
|
|
|
<meta name="keywords" content="issue,bug,tracker" />
|
|
|
|
|
<%= csrf_meta_tag %>
|
|
|
|
|
<%= favicon %>
|
|
|
|
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
|
|
|
|
|
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
|
|
|
|
<%= javascript_heads %>
|
|
|
|
|
|
|
|
|
|
<%= heads_for_theme %>
|
|
|
|
|
<%= call_hook :view_layouts_base_html_head %>
|
|
|
|
|
<!-- page specific tags -->
|
|
|
|
|
<%= yield :header_tags -%>
|
2014-10-31 20:46:23 +08:00
|
|
|
|
<% title1 = @user.user_extensions.technical_title %>
|
|
|
|
|
<% language1 = @user.language %>
|
|
|
|
|
|
2014-06-21 15:34:10 +08:00
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
function startXMLHttp()
|
|
|
|
|
{
|
2014-10-08 10:27:19 +08:00
|
|
|
|
$.ajax({
|
|
|
|
|
url: '<%= update_score_user_path(:format => 'js') %>',
|
|
|
|
|
type: 'get',
|
|
|
|
|
data: 'id=<%= @user.id %>',
|
|
|
|
|
remote: true
|
|
|
|
|
}) ;
|
2014-06-21 15:34:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function t()
|
|
|
|
|
{
|
2014-10-08 10:27:19 +08:00
|
|
|
|
setInterval("startXMLHttp()",5000);
|
2014-06-21 15:34:10 +08:00
|
|
|
|
}
|
2014-10-31 20:46:23 +08:00
|
|
|
|
|
|
|
|
|
function init_title() {
|
|
|
|
|
var title = "<%= "#{title1}" %>"
|
|
|
|
|
var language = "<%= "#{language1}" %>"
|
|
|
|
|
if(language == 'zh') {
|
|
|
|
|
switch (title) {
|
|
|
|
|
case 'Professor' :
|
|
|
|
|
title1 = '教授';
|
|
|
|
|
break;
|
|
|
|
|
case 'Associate professor' :
|
|
|
|
|
title1 = '副教授';
|
|
|
|
|
break;
|
|
|
|
|
case 'Lecturer' :
|
|
|
|
|
title1 = '讲师';
|
|
|
|
|
break;
|
|
|
|
|
case 'Teaching assistant' :
|
|
|
|
|
title1 = '助教';
|
|
|
|
|
break;
|
|
|
|
|
default :
|
|
|
|
|
title1 = title;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
switch (title) {
|
|
|
|
|
case '教授' :
|
|
|
|
|
title1 = 'Professor';
|
|
|
|
|
break;
|
|
|
|
|
case '副教授' :
|
|
|
|
|
title1 = 'Associate professor';
|
|
|
|
|
break;
|
|
|
|
|
case '讲师' :
|
|
|
|
|
title1 = 'Lecturer';
|
|
|
|
|
break;
|
|
|
|
|
case '助教' :
|
|
|
|
|
title1 = 'Teaching assistant';
|
|
|
|
|
break;
|
|
|
|
|
default :
|
|
|
|
|
title1 = title;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
document.getElementById('td_tech_title').innerHTML = title1;
|
|
|
|
|
}
|
2014-06-21 15:34:10 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
2014-04-17 17:36:41 +08:00
|
|
|
|
</head>
|
2014-06-21 15:34:10 +08:00
|
|
|
|
<!--加上 onload="Javascript:t()" 开始定时刷新分数 -->
|
2014-10-31 20:46:23 +08:00
|
|
|
|
<body class="<%= h body_css_classes %>" onload="init_title()" >
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<div id="wrapper">
|
|
|
|
|
<div id="wrapper2">
|
|
|
|
|
<div id="wrapper3">
|
|
|
|
|
<%= render :partial => 'layouts/base_header'%>
|
|
|
|
|
<div id="main">
|
|
|
|
|
<!--added by huang-->
|
|
|
|
|
<div class="top-content">
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="info_font" style="width: 238px; color: #15bccf"><%= l(:label_user_home) %></td>
|
|
|
|
|
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
|
|
|
|
<td rowspan="2" width="250px">
|
|
|
|
|
<div class="top-content-search <%='hidden' if show_search_bar(params) %>">
|
|
|
|
|
<%= form_tag(:controller => 'users', :action => 'search', :method => :get) do %>
|
|
|
|
|
<%= text_field_tag 'name', params[:name], :size => 20 %>
|
|
|
|
|
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 8px">
|
|
|
|
|
<%=link_to request.host()+"/users" ,:controller => 'users', :action => 'index' %>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<%=link_to "主页", home_path %> >
|
|
|
|
|
<%=link_to "软件创客", :controller => 'users', :action => 'index' %> >
|
|
|
|
|
<span><%=link_to @user.name, user_path %></span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!--end-->
|
|
|
|
|
<!--user page, add by huang-->
|
|
|
|
|
<div id="sidebar">
|
|
|
|
|
<div class="main_context">
|
|
|
|
|
<div class="spaceleft">
|
|
|
|
|
<div class="inf_user_image">
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="left" valign="middle" ><%= image_tag(url_to_avatar(@user), :class => 'avatar2') %></td>
|
|
|
|
|
<td>
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
2014-06-17 17:41:59 +08:00
|
|
|
|
<!-- added by bai -->
|
|
|
|
|
<!-- modified by zjc 姓名添加超链接 -->
|
|
|
|
|
<td class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all"><%= link_to h (@user.name) %>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<%= image_tag(gender_avatar_uri(@user), weight:"25px", height:"25px") if (@user.user_extensions && (@user.user_extensions.identity != 2) )%></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="center"> <% unless User.current == @user %>
|
|
|
|
|
<%= watcher_link(@user, User.current) %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to(l(:label_user_edit), my_account_path(@user)) if User.current %>
|
|
|
|
|
<% end %></td>
|
|
|
|
|
</tr>
|
2014-05-19 11:02:07 +08:00
|
|
|
|
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<tr>
|
|
|
|
|
<td class="score">
|
|
|
|
|
<div id="score_div">
|
|
|
|
|
<%= render :partial => 'users/user_score', :locals => {:user => @user}%>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
</tr>
|
2014-06-17 17:41:59 +08:00
|
|
|
|
<!-- end -->
|
2014-04-17 17:36:41 +08:00
|
|
|
|
|
|
|
|
|
</table></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<div>
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<strong class="font_small_watch">
|
|
|
|
|
<%= link_to l(:label_user_watcher)+"("+User.watched_by(@user.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist"%>
|
|
|
|
|
</strong>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<strong class="font_small_watch">
|
|
|
|
|
<%= link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@user.watcher_users.count.to_s+")", :controller=>"users", :action=>"user_fanslist" %>
|
|
|
|
|
</strong>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<% if @user.id == User.current.id %>
|
|
|
|
|
<p>
|
|
|
|
|
<%= toggle_link l(:label_brief_introduction), 'introduction', {:focus => 'new_form_user_introduction'} %>
|
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% unless @user.user_extensions.nil? %>
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<p style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
|
|
|
|
<%= @user.user_extensions.brief_introduction %>
|
|
|
|
|
</p>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<div id="introduction" style="display: none">
|
|
|
|
|
<%= form_for('new_form', :method => :post,
|
2014-10-08 10:27:19 +08:00
|
|
|
|
:url => {:controller => 'words', :action => 'add_brief_introdution'}) do |f|%>
|
|
|
|
|
<table border="0" width="100%" align="center" >
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<%= f.text_area 'user_introduction', :rows => 3,
|
|
|
|
|
:cols => 65,
|
|
|
|
|
:placeholder => "#{l(:label_my_brief_introduction)}",
|
|
|
|
|
:style => "resize: none;",
|
|
|
|
|
:class => 'noline'%>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<table border="0" width="200px" align="center">
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="right">
|
|
|
|
|
<%= submit_tag l(:button_submit), :name => nil ,
|
|
|
|
|
:class => "bid_btn" %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- end -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
<!--info-->
|
|
|
|
|
<div class="inf_user_context">
|
2014-07-04 15:21:56 +08:00
|
|
|
|
<table style="font-family:'微软雅黑'" width="240">
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<tr>
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<td style="padding-left: 5px" width="70px">
|
|
|
|
|
<%= l(:label_user_joinin) %>:
|
|
|
|
|
</td>
|
|
|
|
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
|
|
|
|
<%= format_time(@user.created_on) %>
|
|
|
|
|
</td>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<td style="padding-left: 5px">
|
|
|
|
|
<%= l(:label_user_login) %>:
|
|
|
|
|
</td>
|
|
|
|
|
<td class="font_lighter_sidebar" style="padding-left: 0px">
|
|
|
|
|
<%= format_time(@user.last_login_on) %>
|
|
|
|
|
</td>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
</tr>
|
|
|
|
|
<% unless @user.user_extensions.nil? %>
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<% unless @user.user_extensions.identity == 2 %>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 5px" width="70px"><%= l(:field_occupation) %>:</td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
|
|
|
|
<% unless @user.user_extensions.school.nil? %>
|
|
|
|
|
<a href="http://course.trustie.net/?school_id=<%= @user.user_extensions.school.id%>"><%= @user.user_extensions.school.name %></a>
|
|
|
|
|
<% end %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% end %>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 5px" width="76px"><%= l(:label_location) %>:</td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.location %><%= @user.user_extensions.location_city %></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<% if @user.user_extensions.identity == 0 %>
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<td style="padding-left: 5px" width="76px">
|
|
|
|
|
<%= l(:label_technical_title) %>:
|
|
|
|
|
</td>
|
2014-10-31 20:46:23 +08:00
|
|
|
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
|
|
|
|
<span id = "td_tech_title"></span>
|
2014-10-08 10:27:19 +08:00
|
|
|
|
</td>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</tr>
|
|
|
|
|
<% if( (@user.user_extensions.identity == 1) && (is_watching?(@user) ) )%>
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 8px" width="70px">
|
|
|
|
|
<%= l(:label_bidding_user_studentcode)%>:
|
|
|
|
|
</td>
|
|
|
|
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
|
|
|
|
<%= @user.user_extensions.student_id %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<% else%>
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 8px" width="70px"><%= l(:field_occupation) %>:</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 8px" width="70px"><%= l(:label_location) %>:</td>
|
|
|
|
|
</tr>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<!-- end -->
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<!--Modified by nie-->
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
<div class="user_tags">
|
|
|
|
|
<div id="tags">
|
|
|
|
|
<%= render :partial => 'tags/tag', :locals => {:obj => @user,:object_flag => "1"}%>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
<div class="user_fans">
|
|
|
|
|
<div class="font_title_left">
|
|
|
|
|
<strong><%= l(:label_user_watcher) %></strong>
|
|
|
|
|
<% if show_more_watchers?(@user) %>
|
|
|
|
|
<div style="font-size: 11px; display: inline; float: right; margin-top: 5px; margin-right: 20px" >
|
|
|
|
|
<%= link_to l(:label_more), :controller => "users", :action => "user_watchlist"%>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="left_wf">
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-top: 5px"> <%= show_watcher_profile(@user) %> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
<!--fans-->
|
|
|
|
|
<div class="user_fans">
|
|
|
|
|
<div class="font_title_left">
|
|
|
|
|
<strong><%= l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count) %></strong>
|
|
|
|
|
<% if show_more_fans?(@user) %>
|
|
|
|
|
<div style="font-size: 11px; display: inline; float: right; margin-top: 5px; margin-right: 20px" >
|
|
|
|
|
<%= link_to l(:label_more), :controller => "users", :action => "user_fanslist"%>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="left_wf">
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-top: 5px"> <%= show_fans_picture(@user) %> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="content" style="padding-top: 0px;">
|
|
|
|
|
<div class="tabs_new">
|
|
|
|
|
<% if @user.user_extensions.identity == 2 %>
|
2014-10-08 10:27:19 +08:00
|
|
|
|
<%= render_menu :user_enterprise_menu %>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<% else %>
|
2014-10-17 15:02:09 +08:00
|
|
|
|
<%= render_menu :user_menu,@user %>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<%= yield %>
|
|
|
|
|
<%= call_hook :view_layouts_base_content %>
|
|
|
|
|
<div style="clear:both;"></div>
|
2014-10-23 09:22:41 +08:00
|
|
|
|
<%#= render_flash_messages %>
|
2014-04-17 17:36:41 +08:00
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<%= render :partial => 'layouts/base_footer'%>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="ajax-indicator" style="display:none;">
|
|
|
|
|
<span><%= l(:label_loading) %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="ajax-modal" style="display:none;"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<%= call_hook :view_layouts_base_body_bottom %>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|