关注BUG修改,修改密码BUG修改

This commit is contained in:
yuanke 2016-11-22 08:52:19 +08:00
parent 6cb711d66b
commit f1ad70bb33
3 changed files with 80 additions and 80 deletions

View File

@ -214,7 +214,8 @@
<li>确认密码&nbsp;:&nbsp;</li>
</ul>
<ul class="setting_right ">
<li><input id="password" name="password" class="w210" type="password" required="true" nh_required="1"></li>
<input style="display:none;">
<li><input id="password" name="password" autocomplete="off" class="w210" type="password" required="true" nh_required="1"></li>
<li><input id="new_password" name="new_password" class="w210" type="password" required="true" nh_required="1"><span class="c_red ml5">请输入8-12个字符</span></li>
<li><input id="new_password_confirmation" name="new_password_confirmation" class="w210" type="password" required="true" nh_required="1"></li>
<li class="ml2">

View File

@ -1,65 +1,55 @@
<% unless list.nil?%>
<% for item in list %>
<div class="courses_list line" id="fans_item_<%=item.id%>">
<div class="courses_list_pic fl">
<a href="<%= user_path(item) %>">
<%= image_tag(url_to_avatar(item), :style=>"width:64px;height:64px;",:alt=>"头像") %>
</a>
</div>
<div class="courses_list_info fl ml10">
<a href="<%= user_path(item) %>" title="<%= item.show_name %>" class="courses_list_title f14 fb c_blue02 fl"><%= item.show_name %></a>
<div class="cl"></div>
<div class="courses_list_table ">
<% if item.user_extensions && !item.user_extensions.brief_introduction.nil? && !item.user_extensions.brief_introduction.empty? %>
<p class="fans_sign" title="<%= item.user_extensions.brief_introduction %>">个性签名:<%= item.user_extensions.brief_introduction %></p>
<% for item in list %>
<div class="courses_list line" id="fans_item_<%=item.id%>">
<div class="courses_list_pic fl">
<a href="<%= user_path(item) %>">
<%= image_tag(url_to_avatar(item), :style=>"width:64px;height:64px;",:alt=>"头像") %>
</a>
</div>
<div class="courses_list_info fl ml10">
<a href="<%= user_path(item) %>" title="<%= item.show_name %>" class="courses_list_title f14 fb c_blue02 fl"><%= item.show_name %></a>
<div class="cl"></div>
<div class="courses_list_table ">
<% if item.user_extensions && !item.user_extensions.brief_introduction.nil? && !item.user_extensions.brief_introduction.empty? %>
<p class="fans_sign" title="<%= item.user_extensions.brief_introduction %>">个性签名:<%= item.user_extensions.brief_introduction %></p>
<% end %>
<table><tbody><tr>
<td class="td_w60 ">加入时间:</td>
<td class="td_w110 "><%= format_date(item.created_on) %></td>
<% if (item.user_extensions.identity == 0 || item.user_extensions.identity == 1) && !item.user_extensions.school.nil? %>
<td class="td_w60 ">工作单位:</td>
<td class="td_w110 ">
<li style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="<%= item.user_extensions.school.name %>">
<a href="<%= url_for(:controller=>'welcome',:action => 'course', :school_id => item.user_extensions.school.id,:host=>Setting.host_course) %>"><%= item.user_extensions.school.name %></a>
</li>
</td>
<% elsif item.user_extensions.identity == 3 && !item.user_extensions.occupation.nil? && !item.user_extensions.occupation.empty? %>
<td class="td_w60 ">工作单位:</td>
<td class="td_w110 ">
<li style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="<%= item.user_extensions.occupation %>">
<%= item.user_extensions.occupation %>
</li>
</td>
<% elsif item.user_extensions.identity == 2 %>
<td class="td_w60 ">工作单位:</td>
<td class="td_w110 ">
<li style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="<%= item.show_name %>">
<%= item.show_name %>
</li>
</td>
<% end %>
</tr></tbody></table>
</div>
</div>
<!-- 如果只有自己的关注页面才能关注人 取消关注操作,那么还要加 一句&& User.current.id == target.id-->
<% if(User.current.logged? && User.current != item )%>
<%if(item.watched_by?(User.current))%>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id,:action_name=>action_name,:page=>page) %>" class="grey_n_btn fr mt20" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
<% else %>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id,:action_name=>action_name,:page=>page) %>" class="blue_n_btn fr mt20" data-method="post" data-remote="true" title="添加关注">添加关注</a>
<% end %>
<% end %>
<table><tbody><tr>
<td class="td_w60 ">加入时间:</td>
<td class="td_w110 "><%= format_date(item.created_on) %></td>
<% if (item.user_extensions.identity == 0 || item.user_extensions.identity == 1) && !item.user_extensions.school.nil? %>
<td class="td_w60 ">工作单位:</td>
<td class="td_w110 ">
<li style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="<%= item.user_extensions.school.name %>">
<a href="<%= url_for(:controller=>'welcome',:action => 'course', :school_id => item.user_extensions.school.id,:host=>Setting.host_course) %>"><%= item.user_extensions.school.name %></a>
</li>
</td>
<% elsif item.user_extensions.identity == 3 && !item.user_extensions.occupation.nil? && !item.user_extensions.occupation.empty? %>
<td class="td_w60 ">工作单位:</td>
<td class="td_w110 ">
<li style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="<%= item.user_extensions.occupation %>">
<%= item.user_extensions.occupation %>
</li>
</td>
<% elsif item.user_extensions.identity == 2 %>
<td class="td_w60 ">工作单位:</td>
<td class="td_w110 ">
<li style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="<%= item.show_name %>">
<%= item.show_name %>
</li>
</td>
<% end %>
</tr></tbody></table>
<div class="cl"></div>
</div>
</div>
<!-- 如果只有自己的关注页面才能关注人 取消关注操作,那么还要加 一句&& User.current.id == target.id-->
<% if(User.current.logged? && User.current != item )%>
<%if(item.watched_by?(User.current))%>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id,:action_name=>action_name,:page=>page) %>" class="grey_n_btn fr mt20" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
<% else %>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id,:action_name=>action_name,:page=>page) %>" class="blue_n_btn fr mt20" data-method="post" data-remote="true" title="添加关注">添加关注</a>
<% end %>
<% end %>
<div class="cl"></div>
</div>
<% end %>
<div style="text-align:center;">
<div class="pages" style="width:auto; display:inline-block;">
<ul id="homework_pository_ref_pages">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true%>
</ul>
<div class="cl"></div>
</div>
</div>
<% else %>
<p id="nodata" class="nodata" style="display:<%= @list.count > 0 ? 'none' : 'block' %>;"><%= l(:label_no_data) %></p>
<% end %>
<% end %>
<% end %>

View File

@ -7,30 +7,39 @@
}
</script>
<div class="courses_box" id="RSide" style="margin-left:0; margin-bottom:0; width:728px;">
<div class="courses_top mb10" id="<%= (@action == 'fans' || @action == 'visitor' ) ? 'nh_fans_list' : 'nh_wacth_list' %>">
<% if @action == 'fans' %>
<div class="courses_box" id="RSide" style="margin-left:0; margin-bottom:0; width:728px;">
<div class="courses_top mb10" id="<%= (@action == 'fans' || @action == 'visitor' ) ? 'nh_fans_list' : 'nh_wacth_list' %>">
<% if @action == 'fans' %>
<h2 class="courses_h2 fl">粉丝</h2>
<div class="courses_select fr">共有<span class="c_orange" nh_name="fans_count" id="fans_span"><%=@obj_count%></span>名粉丝</div>
<% elsif @action == 'visitor' %>
<% elsif @action == 'visitor' %>
<h2 class="courses_h2 fl">访客</h2>
<div class="courses_select fr">共有<span class="c_orange"><%=@obj_count%></span>访客</div>
<% else %>
<% else %>
<h2 class="courses_h2 fl">关注</h2>
<div class="courses_select fr">一共关注<span class="c_orange" nh_name="watcher_count" id="watch_span"><%=@obj_count%></span>人</div>
<% end %>
<% end %>
<div class="cl"></div>
</div>
<div id="users_list">
<%# for item in @list %>
<%= render :partial => 'users/user_fans_item', :locals => {:list => @list,:target=>@user,:action_name=>@action,:page=>params[:page]} %>
<%# end %>
</div>
<p id="nodata" class="nodata" style="display:<%= @list.count > 0 ? 'none' : 'block' %>;"><%= l(:label_no_data) %></p>
<div style="text-align:center;">
<div class="pages" style="width:auto; display:inline-block;">
<ul id="homework_pository_ref_pages">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true%>
</ul>
<div class="cl"></div>
</div>
<div id="users_list">
<%# for item in @list %>
<%= render :partial => 'users/user_fans_item', :locals => {:list => @list,:target=>@user,:action_name=>@action,:page=>params[:page]} %>
<%# end %>
</div>
<!--<ul class="wlist" style=" border:none;">-->
<!--<%#= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>-->
<!--</ul>-->
<!--<div class="cl"></div>-->
</div>
<!--<ul class="wlist" style=" border:none;">-->
<!--<%#= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>-->
<!--</ul>-->
<!--<div class="cl"></div>-->
</div>
<!--</div>-->