app/views/backstage/users/show.html.haml
= render "backstage/header"
.container
.row
.col-lg-12
= title @user
%table.table
%tbody
%tr
%th URL
%td= link_to user_url(@user), @user
%tr
%th State
%td= @user.current_state
%tr
%th Avatar
%td= image_tag @user.avatar_url
%tr
%th Email
%td= @user.email
-# %tr
-# %th Address
-# %td= @user.address
-# %tr
-# %th Country
-# %td= @user.country
%tr
%th URL
%td= @user.url
%tr
%th DOB
%td= @user.dob
%tr
%th Bio
%td= simple_format @user.bio
%tr
%th Locale
%td= @user.locale
%tr
%th Use Metric?
%td= @user.use_metric
-# %tr
-# %th Timezone
-# %td= @user.timezone
%tr
%th Joined
%td= @user.created_at
%tr
%th Updated
%td= @user.updated_at
%tr
%th Roles
%td
- if current_user.has_role?(:superadmin)
= link_to '(edit roles)', [:backstage, @user, :roles]
- @user.roles.each do |role|
%ul.list-unstyled.mt-2
%li
= role.name
@
- if role.resource.present?
= link_to role.resource&.name, role.resource
= link_to "Edit User", edit_backstage_user_path(@user), class: 'btn btn-primary'