Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
imanghafoori1 committed Nov 7, 2017
1 parent ce6bbfb commit 140aee5
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 44 deletions.
85 changes: 50 additions & 35 deletions src/Modules/PrivilegeModule/views/_privileges/table.blade.php
Original file line number Diff line number Diff line change
@@ -1,36 +1,51 @@
@foreach($data as $i => $module)
@if($data)
<table class='table table-striped table-hover table-bordered'>
<thead>
@include('CbPrivilege::_privileges.thead')
</thead>
<tbody>

<tr>
<td>{!! $i + 1 !!}</td>
<td>{{$module->name}}</td>
<td class='info' align="center">
<input type='checkbox' title='Check All Horizontal'
{!!($module->privilege->is_create && $module->privilege->is_read && $module->privilege->is_edit && $module->privilege->is_delete) ? "checked" : "" !!} class='select_horizontal'/>
</td>
<td class='active' align="center">
<input type='checkbox' class='is_visible'
name='privileges[{{$module->id}}][is_visible]'
{!! $module->privilege->is_visible ? "checked" : "" !!} value='1'/>
</td>
<td class='warning' align="center">
<input type='checkbox' class='is_create'
name='privileges[{{$module->id}}][is_create]'
{!! $module->privilege->is_create ? "checked" : "" !!} value='1'/>
</td>
<td class='info' align="center">
<input type='checkbox' class='is_read'
name='privileges[{{$module->id}}][is_read]'
{!! $module->privilege->is_read ? "checked" : "" !!} value='1'/>
</td>
<td class='success' align="center">
<input type='checkbox' class='is_edit'
name='privileges[{{$module->id}}][is_edit]'
{!! $module->privilege->is_edit ? "checked" : "" !!} value='1'/>
</td>
<td class='danger' align="center">
<input type='checkbox' class='is_delete'
name='privileges[{{$module->id}}][is_delete]'
{!! $module->privilege->is_delete ? "checked" : "" !!} value='1'/>
</td>
</tr>
@endforeach
@foreach($data as $i => $module)

<tr>
<td>{!! $i + 1 !!}</td>
<td>{{$module->name}}</td>
<td class='info' align="center">
<input type='checkbox' title='Check All Horizontal'
{!!($module->privilege->is_create && $module->privilege->is_read && $module->privilege->is_edit && $module->privilege->is_delete) ? "checked" : "" !!} class='select_horizontal'/>
</td>
<td class='active' align="center">
<input type='checkbox' class='is_visible'
name='privileges[{{$module->id}}][is_visible]'
{!! $module->privilege->is_visible ? "checked" : "" !!} value='1'/>
</td>
<td class='warning' align="center">
<input type='checkbox' class='is_create'
name='privileges[{{$module->id}}][is_create]'
{!! $module->privilege->is_create ? "checked" : "" !!} value='1'/>
</td>
<td class='info' align="center">
<input type='checkbox' class='is_read'
name='privileges[{{$module->id}}][is_read]'
{!! $module->privilege->is_read ? "checked" : "" !!} value='1'/>
</td>
<td class='success' align="center">
<input type='checkbox' class='is_edit'
name='privileges[{{$module->id}}][is_edit]'
{!! $module->privilege->is_edit ? "checked" : "" !!} value='1'/>
</td>
<td class='danger' align="center">
<input type='checkbox' class='is_delete'
name='privileges[{{$module->id}}][is_delete]'
{!! $module->privilege->is_delete ? "checked" : "" !!} value='1'/>
</td>
</tr>

@endforeach
</tbody>
</table>
@else
<h3>
There is no module to set permissions for.
</h3>
@endif
10 changes: 1 addition & 9 deletions src/Modules/PrivilegeModule/views/privileges.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,7 @@
@include('CbPrivilege::_privileges.bottom_js')
@endpush


<table class='table table-striped table-hover table-bordered'>
<thead>
@include('CbPrivilege::_privileges.thead')
</thead>
<tbody>
@widget('\crocodicstudio\crudbooster\Modules\PrivilegeModule\PrivilegeTableWidget', ['roleId' => $id])
</tbody>
</table>
@widget('\crocodicstudio\crudbooster\Modules\PrivilegeModule\PrivilegeTableWidget', ['roleId' => $id])


</div>
Expand Down

0 comments on commit 140aee5

Please sign in to comment.