Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table class="table">
- <thead>
- <th>#</th>
- <th>Name</th>
- <th>Email</th>
- <th>Position</th>
- <th></th>
- </thead>
- <tbody>
- @foreach ($employees as $key => $employee)
- <!-- twitter bootstrap delete confrimation -->
- <div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="deleteModal" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4 class="modal-title" id="deleteModal">Confirm Remove</h4>
- </div>
- <div class="modal-body">
- <p>You are about to remove a team member.</p>
- <p>Do you want to proceed?</p>
- <p class="debug-url"></p>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- {!! Form::open(['route' => ['employees.destroy', $employee->id], 'method' => 'DELETE', 'style' => 'display: inline-block']) !!}
- <button type="submit" class="btn btn-danger btn-ok"><i class="fa fa-btn fa-trash-o"></i>Remove</button>
- {!! Form::close() !!}
- </div>
- </div>
- </div>
- </div>
- <tr>
- <th>{{ (($employees->currentPage() - 1 ) * $employees->perPage() ) + $key + 1 }}</th>
- <td>{{ $employee->name }}</td>
- <td>{{ $employee->email }}</td>
- <td>{{ $employee->position->name }}</td>
- <td class="position-btn-in-the-right input-prepend">
- <a href="{{ route('employees.show', $employee->id) }}" class="btn btn-sm btn-default"><i class="fa fa-btn fa-eye"></i>View</a>
- <a href="{{ route('employees.edit', $employee->id) }}" class="btn btn-sm btn-primary"><i class="fa fa-btn fa-pencil-square-o"></i>Edit</i></a>
- <button class="btn btn-sm btn-danger" data-href="{{ route('employees.destroy', $employee->id) }}" data-toggle="modal" data-target="#confirm-delete"><i class="fa fa-btn fa-trash-o"></i>Remove</button>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- $('#confirm-delete').on('show.bs.modal', function(e) {
- $(this).find('.btn-ok').attr('href', $(this)(e.relatedTarget).data('href'));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement