2015-08-18 14:40:12 +08:00
|
|
|
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', :media => 'all' %>
|
2015-08-15 17:06:50 +08:00
|
|
|
|
<h3>
|
|
|
|
|
<%=l(:label_latest_login_user_list)%>
|
|
|
|
|
</h3>
|
2016-02-26 16:26:20 +08:00
|
|
|
|
<%= render 'tab_users' %>
|
|
|
|
|
<h3>
|
|
|
|
|
<%=l(:label_latest_login_user_list)%>
|
|
|
|
|
</h3>
|
2015-08-18 14:40:12 +08:00
|
|
|
|
<%= form_tag({}, :method => :get) do %>
|
|
|
|
|
<fieldset>
|
|
|
|
|
<legend>
|
|
|
|
|
<%= l(:label_filter_plural) %>
|
|
|
|
|
</legend>
|
|
|
|
|
<label style="float:left">开始日期:</label>
|
2015-08-18 17:00:58 +08:00
|
|
|
|
<%= text_field_tag 'startdate', params[:startdate], :size => 15, :onchange=>"$('#ui-datepicker-div').hide()", :style=>"float:left"%>
|
|
|
|
|
<%= calendar_for('startdate')%><span style="float: left "> </span>
|
2015-08-18 14:40:12 +08:00
|
|
|
|
<label style="float:left">结束日期:</label>
|
2015-08-18 17:00:58 +08:00
|
|
|
|
<%= text_field_tag 'enddate', params[:enddate], :size => 15, :onchange =>"$('#ui-datepicker-div').hide()", :style=>"float:left"%>
|
2015-08-18 14:40:12 +08:00
|
|
|
|
<%= calendar_for('enddate')%>
|
|
|
|
|
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
|
|
|
|
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'latest_login_users'}, :class => 'icon icon-reload' %>
|
|
|
|
|
</fieldset>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-15 17:06:50 +08:00
|
|
|
|
<div class="autoscroll">
|
|
|
|
|
<table class="list" style="width: 100%;table-layout: fixed">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th style="width: 30px;">
|
|
|
|
|
序号
|
|
|
|
|
</th>
|
|
|
|
|
<th style="width: 70px;">
|
|
|
|
|
登录时间
|
|
|
|
|
</th>
|
|
|
|
|
<th style="width: 30px;">
|
|
|
|
|
用户id
|
|
|
|
|
</th>
|
|
|
|
|
<th style="width: 50px;">
|
|
|
|
|
用户姓名
|
|
|
|
|
</th>
|
|
|
|
|
<th style="width: 50px;">
|
2016-01-22 17:27:21 +08:00
|
|
|
|
用户登录名
|
2015-08-15 17:06:50 +08:00
|
|
|
|
</th>
|
|
|
|
|
<th style="width: 50px;">
|
|
|
|
|
用户身份
|
|
|
|
|
</th>
|
2016-03-14 17:40:49 +08:00
|
|
|
|
<th style="width: 50px;">
|
|
|
|
|
用户单位
|
|
|
|
|
</th>
|
2015-08-15 17:06:50 +08:00
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2015-08-18 14:40:12 +08:00
|
|
|
|
<% @count=@page * 30 %>
|
2016-01-25 10:16:33 +08:00
|
|
|
|
<% for user in @users do %>
|
2015-08-15 17:06:50 +08:00
|
|
|
|
<tr>
|
|
|
|
|
<% @count +=1 %>
|
|
|
|
|
<td align="center">
|
|
|
|
|
<%=@count %>
|
|
|
|
|
</td>
|
|
|
|
|
<td align="center">
|
2015-09-07 15:30:11 +08:00
|
|
|
|
<%=format_time(user.last_login_on) %>
|
2015-08-15 17:06:50 +08:00
|
|
|
|
</td>
|
|
|
|
|
<td align="center">
|
|
|
|
|
<%=user.id %>
|
|
|
|
|
</td>
|
|
|
|
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if user.try(:realname) == ' '%><%= user.login%><% else %><%=user.try(:realname) %><% end %>'>
|
|
|
|
|
<% if user.try(:realname) == ' '%>
|
|
|
|
|
<%= link_to(user.login, user_path(user)) %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to(user.try(:realname), user_path(user)) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</td>
|
|
|
|
|
<td align="center">
|
|
|
|
|
<%=link_to(user.login, user_path(user)) %>
|
|
|
|
|
</td>
|
|
|
|
|
<td align="center">
|
2015-09-09 09:36:44 +08:00
|
|
|
|
<%if user.user_extensions%>
|
|
|
|
|
<% case user.user_extensions.identity %>
|
|
|
|
|
<% when 0 %>
|
|
|
|
|
<%='老师' %>
|
|
|
|
|
<% when 1 %>
|
|
|
|
|
<%='学生' %>
|
|
|
|
|
<% when 2 %>
|
|
|
|
|
<%='企业' %>
|
|
|
|
|
<% when 3 %>
|
|
|
|
|
<%='开发者' %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%='未知身份' %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end%>
|
2015-08-15 17:06:50 +08:00
|
|
|
|
</td>
|
2016-03-14 17:40:49 +08:00
|
|
|
|
<td align="center">
|
2016-03-15 09:47:27 +08:00
|
|
|
|
<% unless user.user_extensions.nil? %>
|
|
|
|
|
<% if user.user_extensions.identity.to_i == 0 %>
|
2016-03-15 09:31:35 +08:00
|
|
|
|
<!--优先取school中校名,如果校名不存在就取occupation-->
|
2016-03-15 09:47:27 +08:00
|
|
|
|
<% occupation = user.user_extensions.school_id.nil? ? "" : (School.where("id =?", user.user_extensions.school_id)).first.try(:name) %>
|
|
|
|
|
<%= occupation.blank? ? user.user_extensions.occupation : occupation %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= user.user_extensions.occupation %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
2016-03-14 17:40:49 +08:00
|
|
|
|
</td>
|
2015-08-15 17:06:50 +08:00
|
|
|
|
</tr>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
|
2015-08-18 14:40:12 +08:00
|
|
|
|
<div class="pagination">
|
|
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
|
|
|
|
</div>
|
|
|
|
|
|
2015-08-15 17:06:50 +08:00
|
|
|
|
<% html_title(l(:label_latest_login_user_list)) -%>
|