Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. <table class="table">
  2. <thead>
  3. <th>#</th>
  4. <th>Name</th>
  5. <th>Email</th>
  6. <th>Position</th>
  7. <th></th>
  8. </thead>
  9.  
  10. <tbody>
  11. @foreach ($employees as $key => $employee)
  12. <!-- twitter bootstrap delete confrimation -->
  13. <div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="deleteModal" aria-hidden="true">
  14. <div class="modal-dialog">
  15. <div class="modal-content">
  16.  
  17. <div class="modal-header">
  18. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  19. <h4 class="modal-title" id="deleteModal">Confirm Remove</h4>
  20. </div>
  21.  
  22. <div class="modal-body">
  23. <p>You are about to remove a team member.</p>
  24. <p>Do you want to proceed?</p>
  25. <p class="debug-url"></p>
  26. </div>
  27.  
  28. <div class="modal-footer">
  29. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  30. {!! Form::open(['route' => ['employees.destroy', $employee->id], 'method' => 'DELETE', 'style' => 'display: inline-block']) !!}
  31. <button type="submit" class="btn btn-danger btn-ok"><i class="fa fa-btn fa-trash-o"></i>Remove</button>
  32. {!! Form::close() !!}
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <tr>
  38. <th>{{ (($employees->currentPage() - 1 ) * $employees->perPage() ) + $key + 1 }}</th>
  39. <td>{{ $employee->name }}</td>
  40. <td>{{ $employee->email }}</td>
  41. <td>{{ $employee->position->name }}</td>
  42. <td class="position-btn-in-the-right input-prepend">
  43. <a href="{{ route('employees.show', $employee->id) }}" class="btn btn-sm btn-default"><i class="fa fa-btn fa-eye"></i>View</a>
  44. <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>
  45. <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>
  46. </td>
  47. </tr>
  48. @endforeach
  49. </tbody>
  50. </table>
  51.  
  52. $('#confirm-delete').on('show.bs.modal', function(e) {
  53. $(this).find('.btn-ok').attr('href', $(this)(e.relatedTarget).data('href'));
  54. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement