notifications.blade.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. @extends('application.layouts.admin')
  2. @section('content')
  3. <link rel="stylesheet" href="{{ asset('/assets/css/lib/bootstrap-sweetalert/sweetalert.css') }}">
  4. <style type="text/css">
  5. #enroll_badge {
  6. border-color: transparent;
  7. background-color: rgba(11, 1, 70, 0.2);
  8. color: rgba(11, 1, 70, 1);
  9. padding: .5rem .7rem !important;
  10. border-radius: 30px;
  11. font-size: 14px !important;
  12. }
  13. .mark_as_btn{
  14. padding: 0px 12px !important;
  15. height: 24px;
  16. background-color: #2e58a6 !important;
  17. border-width: 1px !important;
  18. border-color: #2e58a6 !important;
  19. color: #fff !important;
  20. border-radius: 30px !important;
  21. padding: 0 12px !important;
  22. }
  23. .mark_as_btn:hover {
  24. background-color: #fff !important;
  25. border-color: #2e58a6 !important;
  26. color: #2e58a6 !important;
  27. }
  28. </style>
  29. <div class="page-content pr-0">
  30. <div class="container-fluid">
  31. {{-- <header class="section-header">
  32. <div class="tbl">
  33. <div class="tbl-row">
  34. <div class="tbl-cell">
  35. <h2>All Notifications</h2>
  36. <div class="subtitle"></div>
  37. </div>
  38. </div>
  39. </div>
  40. </header> --}}
  41. <div class="row">
  42. <div class="col-lg-2"></div>
  43. <div class="col-lg-8">
  44. <div class="row mb-3">
  45. <div class="col-lg-9">
  46. <h5 class="mb-0"><span class="badge badge-primary" id="enroll_badge">All Notifications</span></h5>
  47. </div>
  48. <div class="col-lg-3 text-right">
  49. <button class="btn btn-info btn-sm mark_as_btn" onclick="markAllAsRead();">Mark all as read</button>
  50. </div>
  51. </div>
  52. <ul class="exp-timeline" id="notification_load">
  53. </ul>
  54. </div>
  55. <div class="col-lg-2"></div>
  56. </div>
  57. </div><!--.container-fluid-->
  58. </div>
  59. <input type="hidden" id="base" value="{{url('/')}}">
  60. <script src="{{ asset('/assets/js/lib/bootstrap-sweetalert/sweetalert.min.js') }}"></script>
  61. <script type="text/javascript">
  62. $(document).ready(function(){
  63. load_page();
  64. });
  65. function load_page(){
  66. var base = $('#base').val();
  67. $('#notification_load').load(base+'/admin/notifications/get-notifications-partial');
  68. }
  69. function markAllAsRead(){
  70. var base = $('#base').val();
  71. swal({
  72. title: "Are you sure?",
  73. type: "warning",
  74. showCancelButton: true,
  75. confirmButtonClass: "btn-success",
  76. confirmButtonText: "Yes, sure!",
  77. cancelButtonText: "No, cancel!",
  78. });
  79. $('button.confirm').one('click',function(f){
  80. f.preventDefault();
  81. window.location.replace(base+'/admin/notifications/mark-all-as-read');
  82. });
  83. }
  84. </script>
  85. @endsection