性别的判断
This commit is contained in:
parent
8ef6225084
commit
d942cc3123
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="navContainer">
|
<div class="navContainer">
|
||||||
|
<% is_current_user = User.current.logged? && User.current == @user%>
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<%= render :partial => 'layouts/logined_header' %>
|
<%= render :partial => 'layouts/logined_header' %>
|
||||||
<% else%>
|
<% else%>
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
<div class="homepagePortraitImage" id="homepage_portrait_image">
|
<div class="homepagePortraitImage" id="homepage_portrait_image">
|
||||||
<%= image_tag(url_to_avatar(@user),width:"206", height: "206", :id=>'nh_user_tx') %>
|
<%= image_tag(url_to_avatar(@user),width:"206", height: "206", :id=>'nh_user_tx') %>
|
||||||
<% if User.current.logged?%>
|
<% if User.current.logged?%>
|
||||||
<% if User.current == @user%>
|
<% if is_current_user%>
|
||||||
<div id="edit_user_file_btn" class="none">
|
<div id="edit_user_file_btn" class="none">
|
||||||
<div class="homepageEditProfile">
|
<div class="homepageEditProfile">
|
||||||
<a href="<%= url_for(:controller => 'my', :action => 'clear_user_avatar_temp') %>" data-remote="true" class="homepageEditProfileIcon"></a>
|
<a href="<%= url_for(:controller => 'my', :action => 'clear_user_avatar_temp') %>" data-remote="true" class="homepageEditProfileIcon"></a>
|
||||||
|
@ -49,8 +50,10 @@
|
||||||
<div class="homepageImageName hidden">
|
<div class="homepageImageName hidden">
|
||||||
<%= @user.login %>
|
<%= @user.login %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepageImageSex"></div>
|
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
|
||||||
<%= link_to "编辑资料", my_account_path, :class => "fr gz_btn mr10"%>
|
<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%>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -63,7 +66,7 @@
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<% else%>
|
<% else%>
|
||||||
<% if User.current == @user%>
|
<% if is_current_user%>
|
||||||
<p>
|
<p>
|
||||||
这位童鞋很懒,什么也没有留下~
|
这位童鞋很懒,什么也没有留下~
|
||||||
<a href="javascript:void(0);">
|
<a href="javascript:void(0);">
|
||||||
|
|
|
@ -410,7 +410,8 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
|
||||||
.homepageEditProfile {width:20px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:9px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;}
|
.homepageEditProfile {width:20px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:9px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;}
|
||||||
.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -11px -35px no-repeat; width:20px; height:20px; display:block;}
|
.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -11px -35px no-repeat; width:20px; height:20px; display:block;}
|
||||||
.homepageImageName {font-size:16px; color:#484848; margin-left:15px; height:21px; float:left;max-width: 100px;}
|
.homepageImageName {font-size:16px; color:#484848; margin-left:15px; height:21px; float:left;max-width: 100px;}
|
||||||
.homepageImageSex {width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
|
.homepageImageSexMan {width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
|
||||||
|
.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;}
|
||||||
.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;}
|
.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;}
|
||||||
.homepageImageBlock {margin:0 auto; width:78px; float:left; text-align:center; display:inline-block;}
|
.homepageImageBlock {margin:0 auto; width:78px; float:left; text-align:center; display:inline-block;}
|
||||||
.homepageImageNumber {font-size:12px; color:#484848;}
|
.homepageImageNumber {font-size:12px; color:#484848;}
|
||||||
|
|
Loading…
Reference in New Issue