userTraffic.blade.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. @extends('admin.table_layouts')
  2. @section('content')
  3. <div class="page-content container-fluid">
  4. <div class="panel">
  5. <div class="panel-heading">
  6. <h3 class="panel-title">{{ trans('admin.menu.log.traffic_flow') }}</h3>
  7. </div>
  8. <div class="panel-body">
  9. <form class="form-row">
  10. <div class="form-group col-lg-4 col-sm-6">
  11. <input class="form-control" name="username" type="text" value="{{ Request::query('username') }}"
  12. placeholder="{{ trans('common.account') }}" />
  13. </div>
  14. <div class="form-group col-lg-2 col-sm-6 btn-group">
  15. <button class="btn btn-primary" type="submit">{{ trans('common.search') }}</button>
  16. <button class="btn btn-danger" type="button" onclick="resetSearchForm()">{{ trans('common.reset') }}</button>
  17. </div>
  18. </form>
  19. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  20. <thead class="thead-default">
  21. <tr>
  22. <th> #</th>
  23. <th> {{ trans('common.account') }}</th>
  24. <th> {{ trans('model.order.attribute') }}</th>
  25. <th> {{ trans('model.user_data_modify.before') }}</th>
  26. <th> {{ trans('model.user_data_modify.after') }}</th>
  27. <th> {{ trans('model.common.description') }}</th>
  28. <th> {{ trans('model.user_data_modify.created_at') }}</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. @foreach ($userTrafficLogs as $log)
  33. <tr>
  34. <td> {{ $log->id }} </td>
  35. <td>
  36. @if (empty($log->user))
  37. 【{{ trans('common.deleted_item', ['attribute' => trans('common.account')]) }}】
  38. @else
  39. <a href="{{ route('admin.log.flow', ['username' => $log->user->username]) }}"> {{ $log->user->username }} </a>
  40. @endif
  41. </td>
  42. <td>
  43. @if ($log->order_id)
  44. @if ($log->order)
  45. @can('admin.order')
  46. <a href="{{ route('admin.order', ['id' => $log->order_id]) }}"></a>
  47. @else
  48. {{ $log->order->goods->name }}
  49. @endcan
  50. @else
  51. 【{{ trans('common.deleted_item', ['attribute' => trans('model.order.attribute')]) }}】
  52. @endif
  53. @endif
  54. </td>
  55. <td> {{ $log->before }} </td>
  56. <td> {{ $log->after }} </td>
  57. <td> {{ $log->description }} </td>
  58. <td> {{ $log->created_at }} </td>
  59. </tr>
  60. @endforeach
  61. </tbody>
  62. </table>
  63. </div>
  64. <div class="panel-footer">
  65. <div class="row">
  66. <div class="col-sm-4">
  67. {!! trans('admin.logs.counts', ['num' => $userTrafficLogs->total()]) !!}
  68. </div>
  69. <div class="col-sm-8">
  70. <nav class="Page navigation float-right">
  71. {{ $userTrafficLogs->links() }}
  72. </nav>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. @endsection