From 27dd4163f060a5e9609989a5cd8a551eacd12fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sat, 25 Feb 2023 15:32:50 +0800 Subject: [PATCH] Add more data to admin user page --- app/views/admin/users/show.html.erb | 33 ++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/app/views/admin/users/show.html.erb b/app/views/admin/users/show.html.erb index 5354ef0..2cc45c7 100644 --- a/app/views/admin/users/show.html.erb +++ b/app/views/admin/users/show.html.erb @@ -11,12 +11,22 @@ Confirmed at - <%= @user.confirmed_at.strftime("%Y-%m-%d (%H:%M UTC)") %> + + <% if @user.confirmed_at %> + <%= @user.confirmed_at.strftime("%Y-%m-%d (%H:%M UTC)") %> + <% else %> + <%= badge "pending", :yellow %> + <% end %> + Email <%= @user.email %> + + Roles + <%= @user.is_admin? ? badge("admin", :red) : "—" %> + Invited by @@ -25,6 +35,27 @@ <% else %>—<% end %> + + Invitations available + + <%= @user.invitations.count %> + + + + Invited users + + <% if @user.invitees.length > 0 %> + + <% else %>—<% end %> + + + + +