From 96f65f338cbcb8bf30a54d50c2bde96b9bd262a7 Mon Sep 17 00:00:00 2001 From: linchun Date: Mon, 14 Mar 2016 17:40:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/admin/latest_login_teachers.html.erb | 10 ++++++++-- app/views/admin/latest_login_users.html.erb | 10 ++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/views/admin/latest_login_teachers.html.erb b/app/views/admin/latest_login_teachers.html.erb index 05f20ba8d..3c4eb3c5b 100644 --- a/app/views/admin/latest_login_teachers.html.erb +++ b/app/views/admin/latest_login_teachers.html.erb @@ -45,6 +45,9 @@ 用户身份 + + 用户单位 + @@ -59,7 +62,7 @@ <%=format_time(teacher.last_login_on) %> - <%=teacher.user_id %> + <%= teacher.user_id %> <%= teacher.login%><% else %><%=teacher.try(:realname) %><% end %>'> <% if teacher.try(:realname) == ' '%> @@ -69,11 +72,14 @@ <% end %> - <%=link_to(teacher.login, user_path(teacher.user_id)) %> + <%= link_to(teacher.login, user_path(teacher.user_id)) %> 老师 + + <%= teacher.school_id.nil? ? "" : (School.find teacher.school_id).try(:name) %> + <% end %> diff --git a/app/views/admin/latest_login_users.html.erb b/app/views/admin/latest_login_users.html.erb index 17680a8c8..10f7bcea1 100644 --- a/app/views/admin/latest_login_users.html.erb +++ b/app/views/admin/latest_login_users.html.erb @@ -46,6 +46,9 @@ 用户身份 + + 用户单位 + @@ -88,6 +91,13 @@ <% end %> <% end%> + + <% if User.current.user_extensions.identity == "0" %> + <%= user.user_extensions.school_id.nil? ? "" : (School.where("id =?", user.user_extensions.school_id)).first.try(:name) %> + <% else %> + <%= user.user_extensions.occupation %> + <% end %> + <% end %>