File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed
Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 1616 <table class =" table table-striped" id =" data-table" >
1717 <thead ><tr >
1818 <th >Name</th >
19+ <th >Email</th >
1920 <th >Joined</th >
2021 <th >Status</th >
2122 <th >Team(s)</th >
2526 @foreach ($users as $user )
2627 <tr >
2728 <td >{{ $user -> get_name () } } </td >
29+ <td >{{ $user -> email } } </td >
2830 <td nowrap >@isset ($user -> date_admitted ) {{ $user -> date_admitted -> toDateString () } } @endisset </td >
2931 <td >@include (' users.status' )
3032 @php ($roles = $user -> roles ()-> get () )
7375 iDisplayLength: {{ config (' kwartzlabos.results_per_page.default' ) } } ,
7476 " language" : {
7577 " emptyTable" : " No results???"
76- }
78+ },
79+ // Enable member search by email without displaying the email address.
80+ columnDefs: [{
81+ targets: 1 , // Email column
82+ visible: false
83+ }]
7784 });
85+
86+ // Hiding a column with data tables gives the table a goofy behaviour where the table itself shrinks in width.
87+ // This is a known issue where the "fix" is to reset the table back to full width once the column has been
88+ // hidden.
89+ $ (' #data-table' ).width (' 100%' );
7890 });
7991 </script >
8092@stop
Original file line number Diff line number Diff line change 2525 <thead ><tr >
2626 <th scope =" col" >First Name</th >
2727 <th scope =" col" >Last Name</th >
28+ <th scope =" col" >Email</th >
2829 <th scope =" col" >Status / Role</th >
2930 <th scope =" col" >Team(s)</th >
3031 <th scope =" col" ># Keys</th >
3536 <tr >
3637 <td >{{ $user -> get_name (' first' ) } } </td >
3738 <td >{{ $user -> get_name (' last' ) } } </td >
39+ <td >{{ $user -> email } } </td >
3840 <td >@include (' users.status' )
3941 @foreach ($user -> roles ()-> get () as $role )
4042 @if ($role -> id > 1 )
7375@section (' js' )
7476 <script >
7577 $ (document ).ready (function () {
76- $ (' #data-table' ).dataTable ({
78+ $ (' #data-table' ).dataTable ({
7779 ordering: false ,
7880 pagingType: " simple_numbers" ,
7981 iDisplayLength: {{ config (' kwartzlabos.results_per_page.default' ) } } ,
8082 " language" : {
81- " emptyTable" : " No results."
83+ " emptyTable" : " No results."
8284 }
83- });
84-
85+ });
8586 });
8687
8788 function modal_do_stuff_success (data ) {
You can’t perform that action at this time.
0 commit comments