2014-07-14 16:29:59 +08:00
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
function searchUser(){
|
|
|
|
|
var name = $("#name").val();
|
|
|
|
|
if(name == "")
|
|
|
|
|
{
|
|
|
|
|
alert("搜索条件不能为空");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$("#search_user_form").submit();
|
|
|
|
|
}
|
|
|
|
|
</script>
|
2013-11-08 11:01:28 +08:00
|
|
|
|
|
2013-11-09 09:04:23 +08:00
|
|
|
|
<div class="top-content">
|
2014-07-14 16:29:59 +08:00
|
|
|
|
<%= form_tag( users_search_path, :method => :get, :id => 'search_user_form') do %>
|
2013-11-09 09:04:23 +08:00
|
|
|
|
<table width="940px">
|
|
|
|
|
<tr>
|
2014-02-25 11:27:36 +08:00
|
|
|
|
<td class="info_font" style="width: 220px; color: #15bccf "><%= l(:label_software_user ) %></td>
|
2013-11-09 09:04:23 +08:00
|
|
|
|
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
|
|
|
|
|
<td rowspan="2">
|
|
|
|
|
</td>
|
|
|
|
|
<td rowspan="2" >
|
|
|
|
|
<div class="project-search" style="float: right">
|
2014-07-14 16:29:59 +08:00
|
|
|
|
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
|
|
|
|
<input type="button" class="enterprise" value="<%= l(:label_search) %>" onclick="searchUser();"/>
|
|
|
|
|
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
2013-11-09 09:04:23 +08:00
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2014-02-25 11:27:36 +08:00
|
|
|
|
<td style="padding-left: 8px"><a><%= link_to request.host()+"/users", :controller => 'users', :action => 'index' %> </a></td>
|
2013-11-09 09:04:23 +08:00
|
|
|
|
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_software_user), :controller => 'users', :action => 'index' %></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2014-05-26 16:25:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
2013-09-10 21:02:29 +08:00
|
|
|
|
|
|
|
|
|
<div class="autoscroll">
|
2013-11-08 11:01:28 +08:00
|
|
|
|
<% if @users.size > 0 %>
|
2014-07-18 15:47:48 +08:00
|
|
|
|
<%= render :partial => 'user_show' %>
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
<%# @users.each do |user| -%>
|
|
|
|
|
<%# 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>
|
|
|
|
|
<div style="margin-top: 20px;margin-left:66px">
|
|
|
|
|
<%#= l(:label_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? %>
|
|
|
|
|
<%#= l(:label_contribute_to, :project_count => "#{user.memberships.count}") %>
|
|
|
|
|
<%# for member in user.memberships %>
|
|
|
|
|
<%#= link_to_project(member.project) %><%#= (user.memberships.last == member) ? '' : ',' %>
|
|
|
|
|
<%# end %>
|
|
|
|
|
<%# end %>
|
|
|
|
|
<%#= user.changesets.count == 0 ? '' : ",#{l(:label_total_commit, :total_commit => user.changesets.count)}" %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<%# end -%>
|
|
|
|
|
<%# end -%>
|
|
|
|
|
-->
|
2013-11-08 11:01:28 +08:00
|
|
|
|
<% else %>
|
2013-12-19 19:54:39 +08:00
|
|
|
|
<%= render :partial => "layouts/no_content"%>
|
2013-11-08 11:01:28 +08:00
|
|
|
|
<% end %>
|
2013-09-10 21:02:29 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="pagination">
|
|
|
|
|
<ul>
|
|
|
|
|
<%= pagination_links_full @user_pages, @user_count %>
|
2014-05-26 16:25:53 +08:00
|
|
|
|
</ul>
|
2013-09-10 21:02:29 +08:00
|
|
|
|
</div>
|
|
|
|
|
<% html_title(l(:label_user_plural)) -%>
|
2014-05-26 16:25:53 +08:00
|
|
|
|
|