mailbox.blade.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. @extends('admin/layout')
  2. @section('header')
  3. <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
  4. <style>
  5. .btn-danger, .btn-primary, .btn-info {
  6. background: #009688 !important;
  7. border-color: #009688 !important;
  8. }
  9. .table-striped > tbody > tr:nth-of-type(odd) {
  10. background: #f8f8f8 !important;
  11. }
  12. .table-striped > tbody > tr .btn {
  13. background: none !important;
  14. }
  15. .table-striped > tbody > tr td {
  16. font-size: 14px !important;
  17. }
  18. .table-striped > tbody > tr:hover {
  19. background: #ffebd8 !important;
  20. }
  21. .table-striped > tbody > tr:hover .btn {
  22. background: #009688 !important;
  23. color: #fff !important;
  24. }
  25. .table-striped > tbody > tr:hover .btn .glyphicon {
  26. color: #fff !important;
  27. }
  28. </style>
  29. @endsection
  30. @section('content')
  31. @php $authUser=auth()->user() @endphp
  32. <body class="gray-bg">
  33. <div class="wrapper wrapper-content animated fadeInRight">
  34. <div class="row">
  35. <div class="col-sm-12">
  36. <div class="ibox float-e-margins">
  37. <div class="ibox-content">
  38. <div class="col-md-4">
  39. <div class="input-group">
  40. <span class="input-group-btn">
  41. <button type="button" class="btn btn-md btn-primary"
  42. onclick="units.read()" style="border-radius:3px;"> 全部已读</button>
  43. </span>
  44. </div>
  45. </div>
  46. <form class="row" id="searchForm" onsubmit="units.search();return false;">
  47. <div class="input-group">
  48. <input type="text" placeholder="请输入任务标题" class="input-md form-control"
  49. name="message" id="message" style="width: 150px;float: right">
  50. <span class="input-group-btn">
  51. <button type="button" class="btn btn-md btn-primary"
  52. onclick="units.search()" style="border-radius:3px;"> 搜索</button>
  53. <button type="button" class="btn btn-md" style="margin-left: 10px;border-radius:3px;"
  54. name="btnReset"> 重置</button>
  55. </div>
  56. </form>
  57. <hr>
  58. <div class="table-responsive">
  59. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </body>
  67. @endsection
  68. @section('footer')
  69. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  70. <script>
  71. var units = {
  72. search: function () {
  73. tips.selectPage();
  74. },
  75. read: function () {
  76. var url = '/admin/mailbox/batchRead';
  77. var type = 'get';
  78. var ajaxConfig = {
  79. url: url,
  80. type: type,
  81. data: {},
  82. success: function (result) {
  83. layer.msg(result.message, {icon: 6});
  84. tips.tableRefresh();
  85. }
  86. };
  87. tips.ajax(ajaxConfig);
  88. }
  89. };
  90. var config = {};
  91. config.url = '/admin/mailbox';
  92. config.pageSize = 20;
  93. config.columns = [ //字段
  94. {
  95. title: '序号', align: 'center', formatter: function (value, item, index) {
  96. return index + 1;
  97. },
  98. width: '10px'
  99. },
  100. {title: '消息时间', field: 'created_at', align: 'center'},
  101. {title: '接收人', field: 'user', align: 'center'},
  102. {title: '消息', field: 'message', align: 'center'},
  103. {title: '是否已读', field: 'read', align: 'center'}
  104. ];
  105. tips.bootstrapTable(config);
  106. </script>
  107. @endsection