对于当前用户,鼠标经过该用户头像显示详细信息时,有编辑资料按钮

This commit is contained in:
ouyangxuhua 2016-01-08 10:11:47 +08:00
parent 178f9e167c
commit 9e286ef8a5
2 changed files with 9 additions and 5 deletions

View File

@ -4,7 +4,7 @@
<!--<img src="images/homepageImage.jpg" width="50" height="50" alt="个人头像" />--> <!--<img src="images/homepageImage.jpg" width="50" height="50" alt="个人头像" />-->
</div> </div>
<div class="fl ml15"> <div class="fl ml15">
<p class="homepageImageName mb5" style="max-width:88px;"><%= user %></p><span class="fb f14"><%#= user.show_name %></span> <p class="homepageImageName mb5" style="max-width:88px;"><%= user %></p><span class="fb f14"><%= user.show_name %></span>
<span class="homepageImageSex"></span> <span class="homepageImageSex"></span>
<div class="cl"></div> <div class="cl"></div>
<p class="mb8 c_dark f14"><%= user.user_extensions.technical_title %></p> <p class="mb8 c_dark f14"><%= user.user_extensions.technical_title %></p>
@ -30,8 +30,8 @@
<%= render :partial => 'users/watch_btn_for_picture', :locals => {:user => user} %> <%= render :partial => 'users/watch_btn_for_picture', :locals => {:user => user} %>
</div> </div>
<!--<a href="javascript:void(0);" class="userFollow mr27 fl">添加关注</a> <a href="javascript:void(0);" class="userCancel mr27 fl" style="display:none;">取消关注</a>--> <!--<a href="javascript:void(0);" class="userFollow mr27 fl">添加关注</a> <a href="javascript:void(0);" class="userCancel mr27 fl" style="display:none;">取消关注</a>-->
<%= link_to "私信", feedback_path(user), :class => 'greyBtn fl', :target => "_blank" %>
<%= link_to "留言", feedback_path(user), :class => 'greyBtn fr', :target => "_blank" %> <%= link_to "留言", feedback_path(user), :class => 'greyBtn fr', :target => "_blank" %>
<%= link_to "私信", feedback_path(user), :class => 'greyBtn fr', :style => 'margin-right:20px;', :target => "_blank" %>
<!--<a href="javascript:void(0);" class="greyBtn fl">私信</a><a href="javascript:void(0);" class="greyBtn fr">留言</a> --> <!--<a href="javascript:void(0);" class="greyBtn fl">私信</a><a href="javascript:void(0);" class="greyBtn fr">留言</a> -->
</div> </div>
<em></em> <em></em>

View File

@ -1,5 +1,9 @@
<%if(user.watched_by?(User.current))%> <% if User.current == user %>
<%= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>user.id,:target_id=>user.id),:class => "userFollow mr27 fl", :method => "delete",:remote => "true", :title => "取消关注"%> <%= link_to("编辑资料", my_account_path, :class => "fl UsersEditBtn") %>
<% else %> <% else %>
<%= link_to "添加关注",watch_path(:object_type=> 'user',:object_id=>user.id,:target_id=>user.id),:class => "userFollow mr27 fl", :method => "post",:remote => "true", :title => "添加关注"%> <%if(user.watched_by?(User.current))%>
<%= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>user.id,:target_id=>user.id),:class => "userFollow mr27 fl", :method => "delete",:remote => "true", :title => "取消关注"%>
<% else %>
<%= link_to "添加关注",watch_path(:object_type=> 'user',:object_id=>user.id,:target_id=>user.id),:class => "userFollow mr27 fl", :method => "post",:remote => "true", :title => "添加关注"%>
<% end %>
<% end %> <% end %>