index.blade.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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> <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> <br><br>
  20. </div>
  21. </header>
  22. <div class="panel-body no-padding">
  23. <div class="table-responsive ">
  24. <table class="table table-hover">
  25. <thead>
  26. <tr>
  27. <td></td>
  28. <td></td>
  29. <td></td>
  30. <td></td>
  31. <td></td>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. @foreach($notices as $info)
  36. <tr>
  37. <td><i class="fa fa-envelope"> </i></td>
  38. <td class="mailbox-name"><a href="{{ url('admin/notice_board/details/'.$info->id) }}">{{ $info->name }}</a></td>
  39. <td class="mailbox-subject"><b>{{ str_limit($info->notice_title , 15, '...')}}</b> {{ str_limit($info->description, 30, '...') }}...
  40. </td>
  41. <td class="mailbox-attachment">@if($info->attached == NULL)@else<i class="fa fa-paperclip"></i>@endif</td>
  42. <td class="mailbox-date">{{ date('d/m/Y', strtotime($info->created_at)) }}</td>
  43. </tr>
  44. @endforeach
  45. </tbody>
  46. </table>
  47. <!-- /.table -->
  48. </div>
  49. <!-- /.mail-box-messages -->
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="modal fade" id="modalPreview">
  55. <div class="modal-dialog" style='width: 70%;'>
  56. </div>
  57. </div>
  58. @stop
  59. @section('style')
  60. <style>
  61. .modal-dialog {
  62. width: 70% !important;
  63. height: 70% !important;
  64. }
  65. .modal-content {
  66. height: auto;
  67. min-height: 70% !important;
  68. border-radius: 0;
  69. }
  70. </style>
  71. @stop
  72. @section('script')
  73. <script src="{{ asset('/assets/') }}/js/jquery.dataTables.min.js"></script>
  74. <script src="{{ asset('/assets/') }}/js/dataTables.bootstrap.min.js"></script>
  75. <script src="{{ asset('/assets/') }}/switch/rcswitcher.js"></script>
  76. <script src="{{ asset('/assets/') }}/alert/sweetalert.min.js"></script>
  77. <script src="{{ asset('/assets/') }}/alert/pnotify-init.js"></script>
  78. <script src="{{ asset('/assets/') }}/alert/notify.js"></script>
  79. <script type="text/javascript">
  80. $(document).ready(function(){
  81. $('[data-toggle="tooltip"]').tooltip();
  82. $("input[type='checkbox']").rcSwitcher();
  83. });
  84. $(document).ready(function() {
  85. $('body').on('hidden.bs.modal', '.modal', function () {
  86. $(this).removeData('bs.modal');
  87. });
  88. var table=$("#example").DataTable({
  89. "searching": true,
  90. "lengthChange": false,
  91. "info": false,
  92. "paging": false,
  93. "ordering": false,
  94. "showNEntries": false
  95. });
  96. $("input[type='checkbox']").rcSwitcher().on({'toggle.rcSwitcher': function( e, dataObj, changeType ){
  97. var id = $(this).data('id');
  98. var urll="{{ url('admin/education_level/status') }}/"+id;
  99. var msg_success = 'Status Updated Successfully.';
  100. var msg_error = 'Something went wrong!';
  101. $.ajax({
  102. url:urll,
  103. success: function(data){
  104. notify('success',msg_success);
  105. },
  106. error: function (data) {
  107. notify('error',msg_error);
  108. }
  109. });
  110. },
  111. });
  112. });
  113. </script>
  114. @if(Session::has('msg'))
  115. <div class="alert alert-success center-block msg_alt" >
  116. <a class="close" data-dismiss="alert" href="#">&times;</a>
  117. <strong><i class="fa fa-check"></i></strong>&nbsp;
  118. {{Session::get('msg')}}
  119. </div>
  120. @endif
  121. @stop