users.blade.php 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. @extends('layouts.app')
  2. @section('content')
  3. <div class="container">
  4. <div class="row justify-content-center">
  5. <div class="col-md-12">
  6. <div class="card">
  7. <div class="card-header d-flex flex-row">
  8. <div class="flex-grow-1 text-primary text-uppercase font-weight-bold">
  9. {{ __('ui.panelC') }}
  10. </div>
  11. @auth
  12. @if(Auth::user()->isAdmin)
  13. <div class="btn-group">
  14. <a href="{{route('home')}}" class="btn btn-sm btn-outline-primary text-right" title="{{ __('ui.back_catlog') }}">
  15. &larr;&nbsp;<i class="fas fa-walking"></i>
  16. </a>
  17. <a href="{{route('ushutdown')}}" class="btn btn-sm btn-outline-primary text-right" title="{{ __('ui.disable_all') }}">
  18. <i class="fas fa-user-slash"></i>
  19. </a>
  20. <a href="{{route('ugreen')}}" class="btn btn-sm btn-outline-primary text-right" title="{{ __('ui.allow_all') }}">
  21. <i class="fas fa-user"></i>
  22. </a>
  23. <a href="{{ route('manualadd') }}" class="btn btn-sm btn-outline-primary text-right" title="{{ __('ui.register2') }}">
  24. <i class="fas fa-user-plus"></i>
  25. </a>
  26. </div>
  27. @endif
  28. @endauth
  29. </div>
  30. <div class="card-body">
  31. @if (session('status'))
  32. <div class="alert alert-success" role="alert">
  33. {{ session('status') }}
  34. </div>
  35. @endif
  36. @guest
  37. <div class="alert alert-danger">{{ __('ui.login_req') }}</div>
  38. @else
  39. <table class="table table-bordered">
  40. <thead class="thead-dark">
  41. <tr>
  42. <th scope="col" class="col-8">{{__('ui.tb_uname')}}</th>
  43. <th scope="col" class="controls col-sm-1" title="{{__('ui.logs')}}"><i class="fas fa-sign-in-alt"></th>
  44. <th scope="col" class="controls col-sm-1" title="{{__('ui.tb_ctrl')}}"><i class="fas fa-wrench"></th>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. @foreach($user_list as $user)
  49. <tr>
  50. <td style="text-align: left; @if(!$user->isEnabled) text-decoration:line-through @endif">
  51. {{$user->name}}
  52. </td>
  53. <td class="text-center">
  54. {{$user->numLogin}}
  55. </td>
  56. <td class="controls">
  57. @if(!$user->isAdmin)
  58. <a class="btn btn-sm btn-outline-primary"
  59. href="{{route('uswitch', $user->id)}}">
  60. <i class="fas @if(!$user->isEnabled)fa-user-slash @else fa-user @endif"></i>
  61. </a>
  62. <a class="btn btn-sm btn-outline-primary"
  63. href="{{route('asknepw', [$user->id, 'users'])}}">
  64. <i class="fas fa-key"></i>
  65. </a>
  66. </td>
  67. @endif
  68. </tr>
  69. @endforeach
  70. </tbody>
  71. </table>
  72. @endguest
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. @endsection
  79. @section('modals')
  80. @endsection