index.blade.php 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. @extends('admin/public/layout')
  2. @section('title')举报管理@endsection
  3. @section('content')
  4. <section class="content-header">
  5. <h1>
  6. 举报管理
  7. <small>管理系统的所有举报</small>
  8. </h1>
  9. </section>
  10. <section class="content">
  11. <div class="row">
  12. <div class="col-xs-12">
  13. <div class="box">
  14. <div class="box-header">
  15. <div class="row">
  16. <div class="col-xs-3">
  17. <div class="btn-group">
  18. <button class="btn btn-default btn-sm" data-toggle="tooltip" title="标记为已处理" onclick="confirm_submit('item_form','{{ route('admin.report.dispose') }}','确认忽略选中项?')"><i class="fa fa-check"></i></button>
  19. <button class="btn btn-default btn-sm" data-toggle="tooltip" title="标记为已忽略" onclick="confirm_submit('item_form','{{ route('admin.report.ignore') }}','确认处理选中项?')"><i class="fa fa-ban"></i></button>
  20. </div>
  21. </div>
  22. <div class="col-xs-9">
  23. <div class="row">
  24. <form name="searchForm" action="{{ route('admin.report.index') }}" method="GET">
  25. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  26. <div class="col-xs-2">
  27. <input type="text" class="form-control" name="user_id" placeholder="举报人UID" value="{{ $filter['user_id'] or '' }}"/>
  28. </div>
  29. <div class="col-xs-2">
  30. <select class="form-control" name="status">
  31. <option value="-1">状态</option>
  32. @foreach(trans_report_status('all') as $key => $status)
  33. <option value="{{ $key }}" @if( isset($filter['status']) && $filter['status']==$key) selected @endif >{{ $status }}</option>
  34. @endforeach
  35. </select>
  36. </div>
  37. <div class="col-xs-3">
  38. <input type="text" name="date_range" id="date_range" class="form-control" placeholder="时间范围" value="{{ $filter['date_range'] or '' }}" />
  39. </div>
  40. <div class="col-xs-1">
  41. <button type="submit" class="btn btn-primary">搜索</button>
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="box-body no-padding">
  49. <form name="itemForm" id="item_form" method="POST">
  50. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  51. <div class="table-responsive">
  52. <table class="table table-striped">
  53. <tr>
  54. <th><input type="checkbox" class="checkbox-toggle" /></th>
  55. <th>类型</th>
  56. <th>主题</th>
  57. <th>举报原因</th>
  58. <th>用户</th>
  59. <th>状态</th>
  60. <th>时间</th>
  61. </tr>
  62. @foreach($reports as $report)
  63. <tr>
  64. <td><input type="checkbox" name="id[]" value="{{ $report->id }}"/></td>
  65. <td width="5%"><span class="label pull-left mr-5 @if(str_contains($report->source_type,'Answer')) label-success @elseif(str_contains($report->source_type,'Question'))label-default @elseif(str_contains($report->source_type,'Article'))label-warning @endif">
  66. @if(str_contains($report->source_type,'Answer')) 回答 @elseif(str_contains($report->source_type,'Question'))问题 @elseif(str_contains($report->source_type,'Article'))文章 @endif
  67. </span></td>
  68. <td>
  69. @if(str_contains($report->source_type,'Answer'))
  70. <a href="{{ route('ask.question.detail',['id'=>$report->answer->question_id]) }}" target="_blank">{{ str_limit($report->subject,40) }}</a>
  71. @elseif(str_contains($report->source_type,'Question'))
  72. <a href="{{ route('ask.question.detail',['id'=>$report->source_id]) }}" target="_blank">{{ str_limit($report->subject,40) }}</a>
  73. @elseif(str_contains($report->source_type,'Article'))
  74. <a href="{{ route('blog.article.detail',['id'=>$report->source_id]) }}" target="_blank">{{ str_limit($report->subject,40) }}</a>
  75. @endif
  76. </td>
  77. <td>
  78. {{ trans_report_type($report->report_type) }} @if($report->reason):<span class="text-muted" title="{{ $report->reason }}">{{ str_limit($report->reason,120) }}</span> @endif
  79. </td>
  80. <td>{{ $report->user->name }} <span class="text-muted">[UID:{{ $report->user_id }}]</span></td>
  81. <td><span class="label @if($report->status===0) label-danger @elseif($report->status=== 4) label-default @elseif($report->status===1) label-success @endif">{{ trans_report_status($report->status) }}</span> </td>
  82. <td>{{ timestamp_format($report->created_at) }} {{ $report->status }}</td>
  83. </tr>
  84. @endforeach
  85. </table>
  86. </div>
  87. </form>
  88. </div>
  89. <div class="box-footer clearfix">
  90. <div class="row">
  91. {{-- <div class="col-sm-3">--}}
  92. {{-- <div class="btn-group">--}}
  93. {{-- <button class="btn btn-default btn-sm" data-toggle="tooltip" title="标记为已处理" onclick="confirm_submit('item_form','{{ route('admin.report.dispose') }}','确认忽略选中项?')"><i class="fa fa-check"></i></button>--}}
  94. {{-- <button class="btn btn-default btn-sm" data-toggle="tooltip" title="标记为已忽略" onclick="confirm_submit('item_form','{{ route('admin.report.ignore') }}','确认处理选中项?')"><i class="fa fa-ban"></i></button>--}}
  95. {{-- </div>--}}
  96. {{-- </div>--}}
  97. <div class="col-sm-9" style="float:right;">
  98. <div class="text-right">
  99. <span class="total-num">共 {{ $reports->total() }} 条数据</span>
  100. {!! str_replace('/?', '?', $reports->appends($filter)->links()) !!}
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </section>
  109. @endsection
  110. @section('script')
  111. <script type="text/javascript">
  112. set_active_menu('operations',"{{ route('admin.report.index') }}");
  113. </script>
  114. @endsection