2015-08-26 11:41:32 +08:00
|
|
|
<% unless list.nil?%>
|
|
|
|
<% for item in list %>
|
2015-07-09 15:27:49 +08:00
|
|
|
<div class="courses_list line" id="fans_item_<%=item.id%>">
|
|
|
|
<div class="courses_list_pic fl">
|
2015-07-21 14:10:56 +08:00
|
|
|
<a href="<%= user_path(item) %>">
|
2015-07-09 15:27:49 +08:00
|
|
|
<%= 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>
|
2015-08-26 11:41:32 +08:00
|
|
|
<!-- 如果只有自己的关注页面才能关注人 取消关注操作,那么还要加 一句&& User.current.id == target.id-->
|
2015-07-09 15:27:49 +08:00
|
|
|
<% if(User.current.logged? && User.current != item )%>
|
|
|
|
<%if(item.watched_by?(User.current))%>
|
2015-08-26 11:41:32 +08:00
|
|
|
<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>
|
2015-07-09 15:27:49 +08:00
|
|
|
<% else %>
|
2015-08-26 11:41:32 +08:00
|
|
|
<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>
|
2015-07-09 15:27:49 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
2015-08-26 11:41:32 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|