minor changes in datagrid frontend templates
This commit is contained in:
parent
6c8bdf20c0
commit
436557fe81
|
|
@ -52,7 +52,7 @@ class UserDataGrid extends AbsGrid
|
|||
'index' => 'u.status',
|
||||
'alias' => 'adminStatus',
|
||||
'label' => 'Status',
|
||||
'type' => 'string',
|
||||
'type' => 'boolean',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'width' => '100px',
|
||||
|
|
@ -74,16 +74,6 @@ class UserDataGrid extends AbsGrid
|
|||
'sortable' => true,
|
||||
'width' => '100px'
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'ro.name',
|
||||
'alias' => 'rolename',
|
||||
'label' => 'Role',
|
||||
'type' => 'string',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'width' => '100px'
|
||||
]);
|
||||
}
|
||||
|
||||
public function prepareActions() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
<tbody>
|
||||
@foreach($records as $key => $record)
|
||||
{{-- {{ dd($record) }} --}}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<span class="checkbox">
|
||||
|
|
@ -10,14 +8,24 @@
|
|||
<label class="checkbox-view" for="checkbox1"></label>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
@foreach($record as $column)
|
||||
@if(isset($columns[$key]))
|
||||
@if(isset($columns[$key]['wrapper']))
|
||||
|
||||
<?php $i = 0; ?>
|
||||
@foreach($record as $key1 => $column)
|
||||
@if($columns[$i]['type'] == 'boolean' && $columns[$i]['label'] == 'Status')
|
||||
@if($column == 0)
|
||||
<td>Inactive</td>
|
||||
@else
|
||||
<td>Active</td>
|
||||
@endif
|
||||
@elseif($columns[$i]['type'] == 'boolean' && $columns[$i]['label'] != 'Status')
|
||||
@if($column == 0)
|
||||
<td>False</td>
|
||||
@else
|
||||
<td>True</td>
|
||||
@endif
|
||||
@else
|
||||
<td>{{ $column }}</td>
|
||||
@endif
|
||||
<td>{{ $column }}</td>
|
||||
<?php $i++; ?>
|
||||
@endforeach
|
||||
|
||||
<td style="width: 50px;">
|
||||
|
|
|
|||
|
|
@ -355,11 +355,11 @@
|
|||
if(this.filters[i].column == 'sort') {
|
||||
this.currentSort = this.filters[i].val;
|
||||
|
||||
if(this.currentSort = 'asc') {
|
||||
this.currentSortIcon = this.sortUpIcon;
|
||||
} else {
|
||||
this.currentSortIcon = this.sortDownIcon;
|
||||
}
|
||||
// if(this.currentSort = 'asc') {
|
||||
// this.currentSortIcon = this.sortUpIcon;
|
||||
// } else {
|
||||
// this.currentSortIcon = this.sortDownIcon;
|
||||
// }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue