<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', :media => 'all' %>

<%=l(:label_latest_login_user_list)%>

<%= render 'tab_users' %>

<%=l(:label_latest_login_user_list)%>

<%= form_tag({}, :method => :get) do %>
<%= l(:label_filter_plural) %> <%= text_field_tag 'startdate', params[:startdate], :size => 15, :onchange=>"$('#ui-datepicker-div').hide()", :style=>"float:left"%> <%= calendar_for('startdate')%>    <%= text_field_tag 'enddate', params[:enddate], :size => 15, :onchange =>"$('#ui-datepicker-div').hide()", :style=>"float:left"%> <%= 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' %>
<% end %>  
<% @count=@page * 30 %> <% for user in @users do %> <% @count +=1 %> <% end %>
序号 登录时间 用户id 用户姓名 用户登录名 用户身份 用户单位
<%=@count %> <%=format_time(user.last_login_on) %> <%=user.id %> <%= 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 %> <%=link_to(user.login, user_path(user)) %> <%if user.user_extensions%> <% case user.user_extensions.identity %> <% when 0 %> <%='老师' %> <% when 1 %> <%='学生' %> <% when 2 %> <%='企业' %> <% when 3 %> <%='开发者' %> <% else %> <%='未知身份' %> <% end %> <% end%> <% unless user.user_extensions.nil? %> <% if user.user_extensions.identity.to_i == 0 %> <% 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 %>
<% html_title(l(:label_latest_login_user_list)) -%>