From 35ef0dbae9aa9c134b34b238a30efac91588326f Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Mon, 27 Jul 2020 18:40:23 -0700 Subject: [PATCH] Add username to admin users index --- app/datatables/user_datatable.rb | 3 ++- app/views/admin/users/index.html.haml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/datatables/user_datatable.rb b/app/datatables/user_datatable.rb index 6c7e835e..7bdd79fa 100644 --- a/app/datatables/user_datatable.rb +++ b/app/datatables/user_datatable.rb @@ -14,6 +14,7 @@ class UserDatatable < AjaxDatatablesRails::Base confirmed_at: { source: 'User.confirmed_at', searchable: false }, email: { source: 'User.email' }, name: { source: 'User.name' }, + username: { source: 'User.username' }, attended: { source: 'attended_count', searchable: false }, roles: { source: 'Role.name' }, view_url: { source: 'User.id', searchable: false, orderable: false }, @@ -71,4 +72,4 @@ class UserDatatable < AjaxDatatablesRails::Base # end # ==== Insert 'presenter'-like methods below if necessary -end \ No newline at end of file +end diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 91a751e5..95f21029 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -14,8 +14,9 @@ %thead %th{ width: '0' } ID %th{ width: '0' } Confirmed? - %th{ width: '0' } Email %th{ width: '50%' } Name + %th{ width: '0' } Email + %th{ width: '0' } Username %th{ width: '0' } Conferences Attended %th{ width: '50%' } Roles %th{ width: '0' } Actions