223 lines
10 KiB
Plaintext
223 lines
10 KiB
Plaintext
<!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>
|
|
<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 %>
|
|
<%= javascript_include_tag "bootstrap","avatars","user"%>
|
|
<%= heads_for_theme %>
|
|
<%= call_hook :view_layouts_base_html_head %>
|
|
<%= yield :header_tags -%>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="navContainer">
|
|
<% if User.current.logged? %>
|
|
<%= render :partial => 'layouts/logined_header' %>
|
|
<% else%>
|
|
<%= render :partial => 'layouts/unlogin_header' %>
|
|
<% end%>
|
|
</div>
|
|
|
|
<div class="homepageContentContainer">
|
|
<div class="homepageContent">
|
|
<div class="homepageLeft" id="LSide">
|
|
<div class="homepagePortraitContainer">
|
|
<div class="homepagePortraitImage" id="homepage_portrait_image">
|
|
<%= image_tag(url_to_avatar(@user),width:"206", height: "206", :id=>'nh_user_tx') %>
|
|
<% if User.current.logged?%>
|
|
<% if User.current == @user%>
|
|
<div id="edit_user_file_btn" class="none">
|
|
<div class="homepageEditProfile">
|
|
<a href="<%= url_for(:controller => 'my', :action => 'clear_user_avatar_temp') %>" data-remote="true" class="homepageEditProfileIcon"></a>
|
|
</div>
|
|
</div>
|
|
<% else %>
|
|
<div id="watch_user_btn" class="none">
|
|
<%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %>
|
|
</div>
|
|
<% end %>
|
|
<% end%>
|
|
</div>
|
|
<div>
|
|
<div class="homepageImageName hidden">
|
|
<%= @user.login %>
|
|
</div>
|
|
<div class="homepageImageSex"></div>
|
|
<%= link_to "编辑资料", my_account_path, :class => "fr gz_btn mr10"%>
|
|
<div class="cl"></div>
|
|
</div>
|
|
<div>
|
|
<div class="homepageSignature">
|
|
<% if @user.user_extensions && @user.user_extensions.brief_introduction && !@user.user_extensions.brief_introduction.empty? %>
|
|
<p>
|
|
<%= @user.user_extensions.brief_introduction %>
|
|
<a href="javascript:void(0);">
|
|
<img src="../images/signature_edit.png" width="12" height="12" />
|
|
</a>
|
|
</p>
|
|
<% else%>
|
|
<% if User.current == @user%>
|
|
<p>
|
|
这位童鞋很懒,什么也没有留下~
|
|
<a href="javascript:void(0);">
|
|
<img src="../images/signature_edit.png" width="12" height="12" />
|
|
</a>
|
|
</p>
|
|
<% end%>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="homepageImageBlock">
|
|
<div>
|
|
<%= link_to User.watched_by(@user.id).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"homepageImageNumber" %>
|
|
</div>
|
|
<div class="homepageImageText">关注</div>
|
|
</div>
|
|
<div class="homepageVerDiv"></div>
|
|
<div class="homepageImageBlock">
|
|
<div>
|
|
<%= link_to @user.watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"homepageImageNumber", :id => "user_fans_number"%>
|
|
</div>
|
|
<div class="homepageImageText">粉丝</div>
|
|
</div>
|
|
<div class="homepageVerDiv"></div>
|
|
<div class="homepageImageBlock">
|
|
<div>
|
|
<%= 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') %>
|
|
</div>
|
|
<div class="homepageImageText">积分</div>
|
|
</div>
|
|
<div class="cl"></div>
|
|
</div>
|
|
</div>
|
|
<div class="homepageLeftMenuContainer">
|
|
<div class="homepageLeftMenuBlock">
|
|
<%= link_to "动态",user_activities_path(@user.id),:class => "homepageMenuText"%>
|
|
</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>
|
|
<div class="homepageLeftMenuCourses">
|
|
<ul>
|
|
<% 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%>
|
|
</ul>
|
|
</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>
|
|
<div class="homepageLeftMenuCourses">
|
|
<ul>
|
|
<% 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%>
|
|
</ul>
|
|
</div>
|
|
<div class="homepageLeftMenuBlock">
|
|
<a href="javascript:void(0);" class="homepageMenuText">留言</a>
|
|
</div>
|
|
</div>
|
|
<div class="homepageLeftLabelContainer">
|
|
<div class="project_Label_New">
|
|
<span class="homepageLabelText">标签</span>
|
|
<div class="tag_h ml10" >
|
|
<%= render :partial => 'tags/user_tag', :locals => {:obj => @user,:object_flag => "1"}%>
|
|
</div>
|
|
<div class="cl"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="homepageRight">
|
|
<%= yield %>
|
|
</div>
|
|
</div>
|
|
<%= render :partial => 'layouts/new_feedback' %>
|
|
</div>
|
|
|
|
<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>
|
|
</body>
|
|
</html>
|