用户列表添加单位
This commit is contained in:
parent
3e70db4e82
commit
96f65f338c
|
@ -45,6 +45,9 @@
|
|||
<th style="width: 50px;">
|
||||
用户身份
|
||||
</th>
|
||||
<th style="width: 50px;">
|
||||
用户单位
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -59,7 +62,7 @@
|
|||
<%=format_time(teacher.last_login_on) %>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%=teacher.user_id %>
|
||||
<%= teacher.user_id %>
|
||||
</td>
|
||||
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if teacher.try(:realname) == ' '%><%= teacher.login%><% else %><%=teacher.try(:realname) %><% end %>'>
|
||||
<% if teacher.try(:realname) == ' '%>
|
||||
|
@ -69,11 +72,14 @@
|
|||
<% end %>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%=link_to(teacher.login, user_path(teacher.user_id)) %>
|
||||
<%= link_to(teacher.login, user_path(teacher.user_id)) %>
|
||||
</td>
|
||||
<td align="center">
|
||||
老师
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= teacher.school_id.nil? ? "" : (School.find teacher.school_id).try(:name) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
|
|
@ -46,6 +46,9 @@
|
|||
<th style="width: 50px;">
|
||||
用户身份
|
||||
</th>
|
||||
<th style="width: 50px;">
|
||||
用户单位
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -88,6 +91,13 @@
|
|||
<% end %>
|
||||
<% end%>
|
||||
</td>
|
||||
<td align="center">
|
||||
<% 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 %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in New Issue