socialforge/app/views/users/_user_show.html.erb

49 lines
1.8 KiB
Plaintext
Raw Normal View History

2013-11-08 11:25:33 +08:00
<div class="autoscroll">
<% for user in @users -%>
<% unless user.id == 1%>
<div class="well">
<%= content_tag "p", "#{format_date(user.created_on)} #{l(:label_member_since)}", :class => "float_right member_since" %>
<%= image_tag "/images/time_member.png", :class => "img_member_time"%>
<div>
<%= image_tag(url_to_avatar(user), :class => 'avatar') %>
<%= content_tag "span", link_to_user(user), :class => "nomargin avatar_name" %>
<div style="position:relative;float:left;margin-top:-2px;margin-left: 160px">
<%= l(:label_user_grade) %>: <span style="color:#ec6300"><%= user.user_status.grade %></span>
</div>
</div>
<div style="margin-top: 20px;margin-left:66px">
<%= l(:label_x_has_fans,:count=>user.watcher_users.count)%>
<%= l(:label_has_watchers,:count=>User.watched_by(user.id).count) %>
</div>
<div class="user-bottom">
<% unless user.memberships.empty? %>
<% cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1" %>
<% memberships = user.memberships.all(:conditions => cond) %>
<%= l(:label_x_contribute_to, :count => memberships.count) %>
<% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>
<% end %>
<p>
<% unless user.memberships.empty? %>
<% cond = Project.visible_condition(User.current) + "AND projects.project_type = 1" %>
<% memberships = user.memberships.all(:conditions => cond) %>
<%= l(:label_x_course_contribute_to, :count => memberships.count) %>
<% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>
<% end %>
</p>
<%= user.changesets.count == 0 ? '' : "#{l(:label_x_total_commit, :count => user.changesets.count)}" %>
</div>
</div>
<% end -%>
<% end -%>
</div>