123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- @extends('layouts.master')
- @section('content')
- <!-- DataTables -->
- <link rel="stylesheet" href="{{ asset('/assets/') }}/css/dataTables.bootstrap.min.css">
- <link rel="stylesheet" href="{{ asset('/assets/') }}/switch/rcswitcher.css">
- <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/pnotify.css">
- <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweetalert.css">
- <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweet-alert-animations.css">
- <div class="row">
- <div class="col-md-7">
- <div class="panel panel-default">
- <!-- Default panel contents -->
- <div class="panel-heading"></div>
- <header class="panel-heading" style="height:50px;">
- <div class="pull-left">
- {{$title1}}
- </div>
- </header>
- <div class="panel-body">
- <div class="clearfix"></div>
- <table class="table table-bordered" id="example">
- <thead>
- <tr>
- <th>#</th>
- <th>Role Name</th>
- <th>Display Name</th>
- <th>Action</th>
- </tr>
- </thead>
- <tbody>
- @if($all_roles)
- <?php $i=1; ?>
- @foreach($all_roles as $row)
- <tr>
- <td>{{ $i++ }}</td>
- <td>{{ $row->name }}</td>
- <td>{{ $row->display_name }}</td>
- <td>
- @if(\Auth::user()->utype==1)
- <a href="{{ url('admin/roles/edit') }}/{{ $row->id }}" class='btn btn-default btn-sm' data-toggle="tooltip" title="Edit" data-placement="top"><i class="fa fa-edit"></i></a>
- <a href="{{ url('admin/roles/delete') }}/{{ $row->id }}" class='btn btn-default btn-sm' onclick="return confirm('Are you sure to delete this item ?')" data-toggle="tooltip" title="Delete" data-placement="top"><i class="fa fa-trash-o"></i></a>
- @endif
- </td>
- </tr>
- @endforeach
-
- @endif
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div class="col-md-5">
- <div class="panel panel-default">
- <!-- Default panel contents -->
- <div class="panel-heading"></div>
- <header class="panel-heading" style="height:50px;">
- <div class="pull-left">
- {{$title2}}
- </div>
- </header>
- <div class="panel-body">
- <div class="clearfix"></div>
- <form action="{{ url('admin/roles/store') }}" enctype="multipart/form-data" method="POST" role="form">
- {{ csrf_field() }}
- <div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
- <label for="name">Roles Name <i class="text-danger">*</i></label>
- <input type='text' name="name" id="name" class="form-control" value="{{ old('name') }}" placeholder="Name">
- <lebel class="text-danger"> {{ $errors->first('name') }}</lebel>
- </div>
- <div class="form-group {{ $errors->has('display_name') ? 'has-error' : '' }}">
- <label for="display_name">Display Name <i class="text-danger">*</i></label>
- <input type='text' name="display_name" id="display_name" class="form-control" value="{{ old('display_name') }}" placeholder="Display Name">
- <lebel class="text-danger"> {{ $errors->first('display_name') }}</lebel>
- </div>
- <div class="form-group {{ $errors->has('permission') ? 'has-error' : '' }}" style="height: 310px;overflow: scroll;">
- <label for="permission">Assign Permission <i class="text-danger">*</i></label>
- <div style="color: green;margin-bottom: 15px" class="checkbox">
- <label ><input type="checkbox" name="permission" id="select_all" /> Select All Items </label></br>
- </div>
- @foreach($all_permissions as $info)
- <div class="checkbox">
- <label><input type="checkbox" name="permission[]" value="{{ $info->id }}"> {{ $info->display_name }} </label>
- </div>
- @endforeach
- <lebel class="text-danger"> {{ $errors->first('permission') }}</lebel>
- </div>
- <div class="form-group pull-right">
- <label></label>
- <button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> Save Role</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
-
- <div class="modal fade" id="modalPreview">
- <div class="modal-dialog" style='width: 50%;'>
-
- </div>
- </div>
- @stop
- @section('style')
- <style>
- .modal-dialog {
- width: 70% !important;
- height: 70% !important;
- }
- .modal-content {
- height: auto;
- min-height: 70% !important;
- border-radius: 0;
- }
- </style>
- @stop
- @section('script')
- <script src="{{ asset('/assets/') }}/js/jquery.dataTables.min.js"></script>
- <script src="{{ asset('/assets/') }}/js/dataTables.bootstrap.min.js"></script>
- <script src="{{ asset('/assets/') }}/switch/rcswitcher.js"></script>
- <script src="{{ asset('/assets/') }}/alert/sweetalert.min.js"></script>
- <script src="{{ asset('/assets/') }}/alert/pnotify-init.js"></script>
- <script src="{{ asset('/assets/') }}/alert/notify.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $('body').on('hidden.bs.modal', '.modal', function () {
- $(this).removeData('bs.modal');
- });
- var table=$("#example").DataTable({
- "searching": true,
- "lengthChange": true,
- "ordering": true,
- stateSave: true
- });
- });
- </script>
- <script type="text/javascript">
- $('#select_all').click(function(event) {
- if(this.checked) {
- // Iterate each checkbox
- $(':checkbox').each(function() {
- this.checked = true;
- });
- }
- else {
- $(':checkbox').each(function() {
- this.checked = false;
- });
- }
- });
- </script>
- @if(Session::has('msg'))
- <div class="alert alert-success center-block msg_alt" >
- <a class="close" data-dismiss="alert" href="#">×</a>
- <strong><i class="fa fa-check"></i></strong>
- {{Session::get('msg')}}
- </div>
- @endif
- @stop
|