From edec5a98bee422d5ea6e366e76fe7237caad01d1 Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Fri, 18 Mar 2022 08:35:07 -0700 Subject: [PATCH] Removed unused data and columns from datatables --- app/datatables/registration_datatable.rb | 2 -- app/datatables/user_datatable.rb | 4 +--- app/views/admin/registrations/index.html.haml | 10 ---------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/app/datatables/registration_datatable.rb b/app/datatables/registration_datatable.rb index 7384933c..ce0b37d4 100644 --- a/app/datatables/registration_datatable.rb +++ b/app/datatables/registration_datatable.rb @@ -14,7 +14,6 @@ class RegistrationDatatable < AjaxDatatablesRails::ActiveRecord @view_columns ||= { id: { source: 'Registration.id', cond: :eq }, name: { source: 'User.name' }, - roles: { source: 'Role.name' }, email: { source: 'User.email' }, accepted_code_of_conduct: { source: 'Registration.accepted_code_of_conduct', searchable: false }, actions: { source: 'Registration.id', searchable: false, orderable: false } @@ -41,7 +40,6 @@ class RegistrationDatatable < AjaxDatatablesRails::ActiveRecord roles: conference_role_titles(record.user), email: record.email, accepted_code_of_conduct: !!record.accepted_code_of_conduct, # rubocop:disable Style/DoubleNegation - questions: {}, edit_url: edit_admin_conference_registration_path(conference, record), DT_RowId: record.id } diff --git a/app/datatables/user_datatable.rb b/app/datatables/user_datatable.rb index b21f6fea..fdee7340 100644 --- a/app/datatables/user_datatable.rb +++ b/app/datatables/user_datatable.rb @@ -21,9 +21,7 @@ class UserDatatable < AjaxDatatablesRails::ActiveRecord email: { source: 'User.email' }, name: { source: 'User.name' }, attended: { source: 'attended_count', searchable: false }, - roles: { source: 'Role.name' }, - view_url: { source: 'User.id', searchable: false, orderable: false }, - edit_url: { source: 'User.id', searchable: false, orderable: false } + roles: { source: 'Role.name' } } end diff --git a/app/views/admin/registrations/index.html.haml b/app/views/admin/registrations/index.html.haml index 09f674e9..f5a7343e 100644 --- a/app/views/admin/registrations/index.html.haml +++ b/app/views/admin/registrations/index.html.haml @@ -26,7 +26,6 @@ %tr %th{ width: '0' } ID# %th{ width: '25%' } Name - %th{ width: '0' } Roles %th{ width: '0' } E-Mail %th{ width: '0' } %abbr{ title: 'Code of Conduct' } CoC @@ -63,14 +62,6 @@ return content; } }, - { - "name": "roles", - "data": "roles", - "className": "truncate", - "render": function(data, type, row) { - return data.join(', '); - } - }, { "data": "email" }, @@ -94,5 +85,4 @@ }); registrationsDataTable.columns(3).visible(codeOfConductPresent); - registrationsDataTable.columns(2).visible(false); });