forked from crocodic-studio/crudbooster
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce6bbfb
commit 140aee5
Showing
2 changed files
with
51 additions
and
44 deletions.
There are no files selected for viewing
85 changes: 50 additions & 35 deletions
85
src/Modules/PrivilegeModule/views/_privileges/table.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters