bigdir/app/views/layouts/base_users.html.erb

203 lines
8.2 KiB
Plaintext

<!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', :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 -%>
</head>
<body class="<%= h body_css_classes %>">
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">
<%= render :partial => 'layouts/base_header'%>
<div id="main">
<!--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" ><%= link_to image_tag(url_to_avatar(@user), :class => 'avatar2'), :class => "avatar" %></td>
<td>
<table>
<tr>
<td class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all"><%= h @user.lastname<<@user.firstname %>
<!-- added by bai -->
<% unless @user.user_extensions.nil?%>
<% if @user.user_extensions.gender == 1 %> <%=image_tag("/images/sidebar/female.png", weight:"22px", height:"22px") %>
<% else %> <%=image_tag("/images/sidebar/male.png", weight:"25px", height:"25px") %> <% end %>
<% else %> <%=image_tag("/images/sidebar/male.png", weight:"25px", height:"25px") %> <% end %>
<!-- end -->
</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>
</table></td>
</tr>
</table>
<div>
<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> &nbsp;
<strong class="font_small_watch"><%=link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@user.watcher_users(@user.id).count.to_s+")", :controller=>"users", :action=>"user_fanslist" %></strong>
<p><%= toggle_link l(:label_brief_introduction), 'introduction', {:focus => 'new_form_project_message'} %></p>
<% unless @user.user_extensions.nil? %>
<%= @user.user_extensions.brief_introduction %>
<% end %>
<div id="introduction" style="display: none">
<%= form_for('new_form', :method => :post,
: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>
<% end %>
</div>
</div>
</div>
<div class="user_underline"></div>
<!--info-->
<div class="inf_user_context">
<table style="font-family:微软雅黑" width="240">
<tr>
<td style="padding-left: 8px" width="70px"><%= l(:label_user_joinin) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= format_time(@user.created_on) %></td>
</tr>
<tr>
<td style="padding-left: 8px"><%= l(:label_user_login) %></td><td class="font_lighter_sidebar" style="padding-left: 0px"><%= format_time(@user.last_login_on) %></td>
</tr>
<tr>
<td valign="top" style="padding-left: 8px;"><%= l(:label_user_mail) %></td><td class="font_lighter_sidebar" style="padding-left: 0px; word-wrap: break-word; word-break: break-all"><%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></td>
</tr>
<!-- added by bai 在个人主页里显示“工作单位”“地区”-->
<% unless @user.user_extensions.nil? %>
<tr>
<td style="padding-left: 8px" width="70px"><%= l(:field_occupation) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.occupation %></td>
</tr>
<tr>
<td style="padding-left: 8px" width="70px"><%= l(:label_location) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.location %></td>
</tr>
<% else%>
<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>
<% end %>
</tr>
<!-- end -->
</table>
</div>
<!--Modified by nie-->
<!--tags-->
<div class="user_underline"></div>
<!-- <div class="user_fans"> -->
<!-- added by william -for tag -->
<!-- <div class="user_tags"> -->
<div class="user_tags">
<div id="tags">
<%= render :partial => 'tags/tag', :locals => {:obj => @user,:object_flag => "1"}%>
</div>
</div>
<!-- </div> -->
<!-- </div> -->
<!--watch-->
<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">
<%= render_menu :user_menu %>
</div>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
<%= render_flash_messages %>
</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>