2015-08-18 10:59:31 +08:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
2015-08-18 11:47:22 +08:00
<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', 'new_public', 'user_leftside', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
2015-08-24 11:32:14 +08:00
<%= javascript_include_tag "bootstrap","avatars","new_user"%>
2015-08-18 11:47:22 +08:00
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
2015-08-18 10:59:31 +08:00
</head>
<body>
<div class="navContainer">
2015-08-21 15:40:38 +08:00
<% is_current_user = User.current.logged? && User.current == @user%>
2015-08-18 11:47:22 +08:00
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>
<% else%>
<%= render :partial => 'layouts/unlogin_header' %>
<% end%>
2015-08-18 10:59:31 +08:00
</div>
2015-08-18 11:47:22 +08:00
2015-08-18 10:59:31 +08:00
<div class="homepageContentContainer">
<div class="homepageContent">
2015-08-21 14:25:01 +08:00
<div class="homepageLeft" id="LSide">
2015-08-18 10:59:31 +08:00
<div class="homepagePortraitContainer">
2015-08-21 15:23:03 +08:00
<div class="homepagePortraitImage" id="homepage_portrait_image">
2015-08-19 17:14:19 +08:00
<%= image_tag(url_to_avatar(@user),width:"206", height: "206", :id=>'nh_user_tx') %>
2015-08-19 14:43:12 +08:00
<% if User.current.logged?%>
2015-08-21 15:40:38 +08:00
<% if is_current_user%>
2015-08-21 14:25:01 +08:00
<div id="edit_user_file_btn" class="none">
2015-08-19 15:13:30 +08:00
<div class="homepageEditProfile">
2015-08-19 17:14:19 +08:00
<a href="<%= url_for(:controller => 'my', :action => 'clear_user_avatar_temp') %>" data-remote="true" class="homepageEditProfileIcon"></a>
2015-08-19 15:13:30 +08:00
</div>
2015-08-19 14:43:12 +08:00
</div>
<% else %>
2015-08-21 15:23:03 +08:00
<div id="watch_user_btn" class="none">
<%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %>
2015-08-19 14:43:12 +08:00
</div>
<% end %>
<% end%>
2015-08-18 10:59:31 +08:00
</div>
<div>
2015-08-19 16:32:05 +08:00
<div class="homepageImageName hidden">
2015-08-19 14:43:12 +08:00
<%= @user.login %>
</div>
2015-08-21 15:40:38 +08:00
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
<div class="<%= @user.user_extensions.gender == 1 ? 'homepageImageSexWomen' : 'homepageImageSexMan' %> "></div>
<% end %>
<%= link_to("编辑资料", my_account_path, :class => "fr gz_btn mr10") if is_current_user%>
2015-08-18 10:59:31 +08:00
<div class="cl"></div>
</div>
<div>
<div class="homepageSignature">
2015-08-21 16:29:25 +08:00
<p id="user_brief_introduction_show">
<%= render :partial => 'layouts/user_brief_introduction', :locals => {:user => @user} %>
</p>
2015-08-18 10:59:31 +08:00
</div>
2015-08-21 16:29:25 +08:00
<textarea class="homepageSignatureTextarea none" placeholder="请输入回复" id="user_brief_introduction_edit" onblur="edit_user_introduction('<%= edit_brief_introduction_user_path(@user.id)%>');"><%= @user.user_extensions.brief_introduction %></textarea>
2015-08-18 10:59:31 +08:00
</div>
<div>
<div class="homepageImageBlock">
2015-08-19 14:43:12 +08:00
<div>
2015-08-19 15:13:30 +08:00
<%= link_to User.watched_by(@user.id).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"homepageImageNumber" %>
2015-08-19 14:43:12 +08:00
</div>
2015-08-18 10:59:31 +08:00
<div class="homepageImageText">关注</div>
</div>
<div class="homepageVerDiv"></div>
<div class="homepageImageBlock">
2015-08-19 14:43:12 +08:00
<div>
2015-08-21 15:23:03 +08:00
<%= link_to @user.watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"homepageImageNumber", :id => "user_fans_number"%>
2015-08-19 14:43:12 +08:00
</div>
2015-08-18 10:59:31 +08:00
<div class="homepageImageText">粉丝</div>
</div>
<div class="homepageVerDiv"></div>
<div class="homepageImageBlock">
2015-08-19 14:43:12 +08:00
<div>
2015-08-19 15:13:30 +08:00
<%= link_to(format("%.2f" ,get_option_number(@user,1).total_score ).to_i,
{:controller => 'users', :action => 'show_new_score', :remote => true, :id => @user.id }, :class => 'homepageImageNumber',:id => 'user_score') %>
2015-08-19 14:43:12 +08:00
</div>
2015-08-18 10:59:31 +08:00
<div class="homepageImageText">积分</div>
</div>
<div class="cl"></div>
</div>
</div>
<div class="homepageLeftMenuContainer">
2015-08-19 14:43:12 +08:00
<div class="homepageLeftMenuBlock">
2015-08-19 15:13:30 +08:00
<%= link_to "动态",user_activities_path(@user.id),:class => "homepageMenuText"%>
2015-08-19 14:43:12 +08:00
</div>
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText">课程</a>
<a href="javascript:void(0);" class="homepageMenuSetting">
<img src="../images/menu_setting.png" width="14" height="14" />
</a>
</div>
2015-08-19 15:13:30 +08:00
<div class="homepageLeftMenuCourses">
<ul>
2015-08-19 16:32:05 +08:00
<% courses = @user.courses.visible.select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5)%>
<% courses.each do |course|%>
<li class="homepageLeftMenuCoursesLine">
<a href="<%= url_for(:controller => 'courses', :action=>"show", :id=>course.id, :host=>Setting.host_course) %>" class="coursesLineGrey">
<%= course.name %>
</a>
</li>
<% end %>
<% if courses.size == 5%>
<li class="homepageLeftMenuMore">
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon"></a>
</li>
<% end%>
2015-08-19 15:13:30 +08:00
</ul>
</div>
2015-08-19 14:43:12 +08:00
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText">项目</a>
<a href="javascript:void(0);" class="homepageMenuSetting">
<img src="../images/menu_setting.png" width="14" height="14" />
</a>
</div>
2015-08-19 15:13:30 +08:00
<div class="homepageLeftMenuCourses">
<ul>
2015-08-19 16:32:05 +08:00
<% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%>
<% projects.each do |project|%>
<li class="homepageLeftMenuCoursesLine">
<a href="<%= url_for(:controller => 'projects', :action=>"show", :id=>project.id, :host=>Setting.host_name) %>" class="coursesLineGrey">
<%= project.name %>
</a>
</li>
<% end %>
<% if projects.size == 5%>
<li class="homepageLeftMenuMore">
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon"></a>
</li>
<% end%>
2015-08-19 15:13:30 +08:00
</ul>
</div>
2015-08-19 14:43:12 +08:00
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText">留言</a>
</div>
2015-08-18 10:59:31 +08:00
</div>
<div class="homepageLeftLabelContainer">
2015-08-19 14:43:12 +08:00
<div class="project_Label_New">
<span class="homepageLabelText">标签</span>
<div class="tag_h ml10" >
2015-08-19 16:32:05 +08:00
<%= render :partial => 'tags/user_tag', :locals => {:obj => @user,:object_flag => "1"}%>
2015-08-19 14:43:12 +08:00
</div>
2015-08-18 10:59:31 +08:00
<div class="cl"></div>
</div>
</div>
</div>
<div class="homepageRight">
2015-08-18 11:47:22 +08:00
<%= yield %>
2015-08-18 10:59:31 +08:00
</div>
</div>
2015-08-19 14:43:12 +08:00
<%= render :partial => 'layouts/new_feedback' %>
2015-08-18 10:59:31 +08:00
</div>
2015-08-19 17:14:19 +08:00
<div id="ajax-modal" style="display:none;"></div>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
<div>
<div><a href="javascript:hideModal();" class="box_close"></a></div>
<div class="cl"></div>
<div class="pro_new">
<h3 class="box_h3 mb10">头像设置</h3>
<div class="uppicBox">
<%= file_field_tag 'avatar[image]',
:id => nil,
:class => 'uppic_btn',
:style => 'width:70px;',#added by young
:size => "1",
:multiple => false,
:onchange => 'addInputAvatar(this);',
:data => {
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
:file_type => Redmine::Configuration['pic_types'].to_s,
:type_support_message => l(:error_pic_type),
:upload_path => upload_avatar_path(:format => 'js'),
:description_placeholder => nil ,# l(:label_optional_description)
:source_type => @user.class.to_s,
:source_id => @user.id.to_s
} %>
<!--<br/>-->
<!--<span>只支持jpg,png,gif,大小不超过5M</span>-->
</div>
<div class="showpicBox">
<p>预览</p>
<%= image_tag(url_to_avatar(@user), :style=>"width:96px;height:96px;",:class=>"mb5 mt10",:nhname=>'avatar_image') %>
<span >96px*96px</span> <br />
<div class="mb20"></div>
<%= image_tag(url_to_avatar(@user), :style=>"width:48px;height:48px;",:class=>"mb5",:nhname=>'avatar_image') %>
<br />
<span>48px*48px</span> <br />
</div>
<div class="cl mb10"></div>
<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-->
<div class="cl"></div>
</div><!--floatbox end-->
</div>
2015-08-18 10:59:31 +08:00
</body>
</html>