my_notice.blade.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. @extends('layouts.master')
  2. @section('content')
  3. <!-- DataTables -->
  4. <link rel="stylesheet" href="{{ asset('/assets/') }}/css/dataTables.bootstrap.min.css">
  5. <link rel="stylesheet" href="{{ asset('/assets/') }}/switch/rcswitcher.css">
  6. <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/pnotify.css">
  7. <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweetalert.css">
  8. <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweet-alert-animations.css">
  9. <div class="row">
  10. <div class="col-md-8 col-md-offset-2">
  11. <div class="panel panel-default">
  12. <!-- Default panel contents -->
  13. <div class="panel-heading"></div>
  14. <header class="panel-heading" style="height:50px;">
  15. <div class="pull-left">
  16. {{$title}}
  17. </div>
  18. <div>
  19. <a href="{{ url('admin/notice_board/my_notice') }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-list"></i> My Notice</a>
  20. <a style="margin-right: 5px" href="{{ url('admin/notice_board/add') }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-plus"></i> Add Notice</a>
  21. <a style="margin-right: 5px" href="{{ url('admin/notice_board') }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-list"></i> Notice Board</a> <br><br>
  22. </div>
  23. </header>
  24. <div class="panel-body">
  25. <div class="table-responsive ">
  26. <table class="table table-hover" id="example">
  27. <thead>
  28. <tr>
  29. <td>#</td>
  30. <td>Title</td>
  31. <td> Description</td>
  32. <!-- <td>Status</td> -->
  33. <td>Action</td>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. <?php $i=1;?>
  38. @foreach($notices as $info)
  39. <tr>
  40. <td> {{ $i++ }}</td>
  41. <td> {{ str_limit($info->notice_title , 15, '...')}}</td>
  42. <td> {{ str_limit($info->description, 30, '...') }}</td>
  43. <td><a href="{{ url('admin/notice_board/edit') }}/{{ $info->id }}" class='btn btn-default btn-sm' data-toggle="tooltip" title="Edit" data-placement="top"><i class="fa fa-edit"></i></a>
  44. <a href="{{ url('admin/notice_board/delete') }}/{{ $info->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></td>
  45. </tr>
  46. @endforeach
  47. </tbody>
  48. </table>
  49. <!-- /.table -->
  50. </div>
  51. <!-- /.mail-box-messages -->
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="modal fade" id="modalPreview">
  57. <div class="modal-dialog" style='width: 70%;'>
  58. </div>
  59. </div>
  60. @stop
  61. @section('style')
  62. <style>
  63. .modal-dialog {
  64. width: 70% !important;
  65. height: 70% !important;
  66. }
  67. .modal-content {
  68. height: auto;
  69. min-height: 70% !important;
  70. border-radius: 0;
  71. }
  72. </style>
  73. @stop
  74. @section('script')
  75. <script src="{{ asset('/assets/') }}/js/jquery.dataTables.min.js"></script>
  76. <script src="{{ asset('/assets/') }}/js/dataTables.bootstrap.min.js"></script>
  77. <script src="{{ asset('/assets/') }}/switch/rcswitcher.js"></script>
  78. <script src="{{ asset('/assets/') }}/alert/sweetalert.min.js"></script>
  79. <script src="{{ asset('/assets/') }}/alert/pnotify-init.js"></script>
  80. <script src="{{ asset('/assets/') }}/alert/notify.js"></script>
  81. <script type="text/javascript">
  82. $(document).ready(function(){
  83. $('[data-toggle="tooltip"]').tooltip();
  84. $("input[type='checkbox']").rcSwitcher();
  85. });
  86. $(document).ready(function() {
  87. $('body').on('hidden.bs.modal', '.modal', function () {
  88. $(this).removeData('bs.modal');
  89. });
  90. var table=$("#example").DataTable({
  91. "searching": true,
  92. "lengthChange": true,
  93. "info": true,
  94. "paging": true,
  95. "ordering": true,
  96. "showNEntries": true
  97. });
  98. $("input[type='checkbox']").rcSwitcher().on({'toggle.rcSwitcher': function( e, dataObj, changeType ){
  99. var id = $(this).data('id');
  100. var urll="{{ url('admin/education_level/status') }}/"+id;
  101. var msg_success = 'Status Updated Successfully.';
  102. var msg_error = 'Something went wrong!';
  103. $.ajax({
  104. url:urll,
  105. success: function(data){
  106. notify('success',msg_success);
  107. },
  108. error: function (data) {
  109. notify('error',msg_error);
  110. }
  111. });
  112. },
  113. });
  114. });
  115. </script>
  116. @if(Session::has('msg'))
  117. <div class="alert alert-success center-block msg_alt" >
  118. <a class="close" data-dismiss="alert" href="#">&times;</a>
  119. <strong><i class="fa fa-check"></i></strong>&nbsp;
  120. {{Session::get('msg')}}
  121. </div>
  122. @endif
  123. @stop