%
define_admin_breadcrumbs do
add_admin_breadcrumb('用户管理', admins_users_path)
add_admin_breadcrumb('用户详情')
end
%>
<%= link_to "/users/#{@user.login}", class: 'user-info-avatar col-md-1', target: '_blank', data: { toggle: 'tooltip', title: '个人中心' } do %>
<% end %>
<%= @user.real_name %> | <%= @user.id %> | <%= @user.login %>
<% if @user.authentication? %>
<% elsif @user.process_real_name_apply.present? %>
<% else %>
<% end %>
<% if @user.professional_certification %>
<% elsif @user.process_professional_apply.present? %>
<% else %>
<% end %>
<% if @user.phone.present? %>
<% else %>
<% end %>
<% if @user.mail.present? %>
<% else %>
<% end %>
最近登录:<%= @user.last_login_on&.strftime('%Y-%m-%d %H:%M') %>
<%= simple_form_for(@user, url: admins_user_path(@user)) do |f| %>
基本信息
<%= f.input :lastname, label: '姓名', wrapper_html: { class: 'col-md-3' }, input_html: { class: 'col-md-11', value: @user.only_real_name } %>
<%= f.input :nickname, label: '昵称', wrapper_html: { class: 'col-md-3' }, input_html: { class: 'col-md-11' } %>
<%= f.input :gender, as: :radio_buttons, label: '性别', collection: [%w(男 0), %w(女 1)], wrapper_html: { class: 'col-md-3' } %>
<%= f.input :mail, as: :email, label: '邮箱地址', wrapper_html: { class: 'col-md-3' }, input_html: { class: 'col-sm-11' } %>
<%= f.input :phone, as: :tel, label: '手机号', wrapper_html: { class: 'col-md-3' }, input_html: { class: 'col-sm-11', autocomplete: 'off' } %>
管理
<%= f.button :submit, value: '保存', class: 'btn-primary mr-3 px-4' %>
<%= link_to '取消', admins_users_path, class: 'btn btn-secondary px-4' %>
<% end %>