11@extends (' layouts.app' )
22
33@section (' content' )
4- <!-- Displays the user management table with options to add, edit, activate or deactivate users -->
5- @include (' layouts.navbars.auth.topnav' , [' title' => __ (" nav/side.user_manager" )] )
6- <div class =" row mt-4 mx-4" >
7- <div class =" col-12" >
8- <div class =" card mb-4" >
9- <div class =" card-header pb-0" >
10- <div class =" d-flex justify-content-between align-items-center" >
11- <h6 >{{ __ (" pages/user-manager.Users" ) } } </h6 >
12- <a href =" {{ route (' user.create' ) } }" class =" btn btn-primary btn-sm"
13- style =" background-color :black ;" >{{ __ (" pages/user-manager.Add_User" ) } } </a >
14- </div >
15- </div >
16- <div class =" card-body px-0 pt-0 pb-2" >
17- <div class =" table-responsive p-0" >
18- <table class =" table align-items-center mb-0" >
19- <thead >
20- <tr >
21- <th class =" text-uppercase text-secondary text-xxs font-weight-bolder opacity-7" >
22- {{ __ (" pages/user-manager.Name" ) } }
23- </th >
24- <th class =" text-uppercase text-secondary text-xxs font-weight-bolder opacity-7 ps-2" >
25- {{ __ (" pages/user-manager.Role" ) } }
26- </th >
27- <th
28- class =" text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7" >
29- {{ __ (" pages/user-manager.Institution" ) } }
30- </th >
31- <th
32- class =" text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7" >
33- {{ __ (" pages/user-manager.Country" ) } }
34- </th >
35- <th
36- class =" text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7" >
37- {{ __ (" pages/user-manager.Status" ) } }
38- </th >
39- <th
40- class =" text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7" >
41- {{ __ (" pages/user-manager.Actions" ) } }
42- </th >
43- </tr >
44- </thead >
45- <tbody >
46- @foreach ($users as $user )
47- <tr >
48- <td >
49- <div class =" d-flex px-3 py-1" >
50- <div class =" d-flex flex-column justify-content-center" >
51- <h6 class =" mb-0 text-sm" >{{ $user -> firstname } } {{ $user -> lastname } } </h6 >
52- </div >
53- </div >
54- </td >
55- <td >
56- @if ($user -> role == ' SUPER_USER' )
57- <p class =" text-sm font-weight-bold mb-0" >{{ __ (' pages/user-manager.super_user' ) } }
58- </p >
59- @elseif ($user -> role == ' USER' )
60- <p class =" text-sm font-weight-bold mb-0" >{{ __ (' pages/user-manager.user' ) } } </p >
61- @else
62- <p class =" text-sm font-weight-bold mb-0" >{{ $user -> role } } </p >
63- @endif
64- </td >
65- <td class =" align-middle text-center text-sm" >
66- <p class =" text-sm font-weight-bold mb-0" >{{ $user -> institution } } </p >
67- </td >
68- <td class =" align-middle text-center text-sm" >
69- <p class =" text-sm font-weight-bold mb-0" >{{ $user -> country } } </p >
70- </td >
71- <td class =" align-middle text-center text-sm" >
72- <p class =" text-sm font-weight-bold mb-0" >
73- {{ $user -> active ? __ (" pages/user-manager.Yes" ) : __ (" pages/user-manager.No" ) } }
74- </td >
75- </p >
76- </td >
77- <td class =" align-middle text-end" >
78- <div class =" d-flex px-3 py-1 justify-content-center align-items-center" >
79- <a href =" {{ route (' user.edit' , [' user' => $user ]) } }"
80- class =" btn btn-sm btn-primary me-2" >
81- {{ __ (" pages/user-manager.Edit" ) } }
82- </a >
83- @if ($user -> active )
84- <a href =" {{ route (' user.deactivate' , [' user' => $user ]) } }"
85- class =" btn btn-sm btn-danger" >
86- {{ __ (' pages/user-manager.Deactivate' ) } }
87- </a >
88- @else
89- <a href =" {{ route (' user.deactivate' , [' user' => $user ]) } }"
90- class =" btn btn-sm btn-success" >
91- {{ __ (' pages/user-manager.Activate' ) } }
92- </a >
93- @endif
944
95- </div >
96- </td >
97- </tr >
98- @endforeach
99- </tbody >
100- </table >
101- </div >
102- </div >
103- </div >
104- </div >
105- </div >
106- @endsection
5+ @include (' layouts.navbars.auth.topnav' , [' title' => __ (" nav/side.user_manager" )] )
6+ <style >
7+ /* ---------- Estilos de melhoria visual ---------- */
8+ .table-wrapper {
9+ border-radius : 12px ;
10+ overflow : hidden ;
11+ background-color : #fff ;
12+ box-shadow : 0 2px 10px rgba (0 , 0 , 0 , 0.05 );
13+ }
14+
15+ .table thead th {
16+ background-color : #f8f9fa ;
17+ color : #6c757d ;
18+ font-size : 0.75rem ;
19+ text-transform : uppercase ;
20+ letter-spacing : 0.05em ;
21+ border-bottom : 2px solid #dee2e6 ;
22+ }
23+
24+ .table tbody tr :hover {
25+ background-color : #f1f5f9 ;
26+ transition : background-color 0.2s ease ;
27+ }
28+
29+ .table td , .table th {
30+ vertical-align : middle ;
31+ padding : 0.9rem 1rem ;
32+ }
33+
34+ .table td h6 {
35+ font-weight : 600 ;
36+ margin-bottom : 0 ;
37+ }
38+
39+ .btn-action {
40+ min-width : 90px ;
41+ border-radius : 6px ;
42+ }
43+
44+ .table-responsive {
45+ max-height : 70vh ;
46+ overflow-y : auto ;
47+ }
48+
49+ /* Scroll suave dentro da div */
50+ .table-responsive ::-webkit-scrollbar {
51+ width : 6px ;
52+ }
53+
54+ .table-responsive ::-webkit-scrollbar-thumb {
55+ background : #ccc ;
56+ border-radius : 3px ;
57+ }
58+
59+ .card-header h6 {
60+ font-weight : 700 ;
61+ margin-bottom : 0 ;
62+ }
63+ </style >
64+ <div class =" container mt-4 mb-3" >
65+ <div class =" page-header d-flex flex-column pt-4 pb-2 border-radius-lg" >
66+ <div
67+ class =" row justify-content-center rounded-3 py-4 bg-gradient-faded-dark opacity-8 "
68+ style =" width : 100% "
69+ >
70+ <div class =" col-lg-6 text-center mx-auto" >
71+ <h1 class =" text-white" style =" font-size : 2rem " >
72+ {{ __ (" pages/user-manager.Users" ) } }
73+ </h1 >
74+
75+ <p class =" text-lead text-white" >
76+ {{ __ (" pages/user-manager.description" ) } }
77+ </p >
78+ </div >
79+ </div >
80+ </div >
81+ </div >
82+ <div class =" row mt-1 mx-4" >
83+ <div class =" col-12" >
84+ <div class =" card mb-4 table-wrapper" >
85+ <div class =" card-header d-flex justify-content-between align-items-center pb-3" >
86+ <h5 >{{ __ (" pages/user-manager.Users" ) } } </h5 >
87+ <a href =" {{ route (' user.create' ) } }" class =" btn btn-dark btn-sm" >
88+ <i class =" fas fa-user-plus me-1" ></i > {{ __ (" pages/user-manager.Add_User" ) } }
89+ </a >
90+ </div >
91+
92+ <div class =" card-body px-0 pt-0 pb-3" >
93+ <div class =" table-responsive" >
94+ <table class =" table table-hover align-items-center mb-0" >
95+ <thead >
96+ <tr >
97+ <th >{{ __ (" pages/user-manager.Name" ) } } </th >
98+ <th >{{ __ (" pages/user-manager.Role" ) } } </th >
99+ <th >{{ __ (" pages/user-manager.Institution" ) } } </th >
100+ <th >{{ __ (" pages/user-manager.Country" ) } } </th >
101+ <th >{{ __ (" pages/user-manager.Status" ) } } </th >
102+ <th class =" text-center" >{{ __ (" pages/user-manager.Actions" ) } } </th >
103+ </tr >
104+ </thead >
105+ <tbody >
106+ @foreach ($users as $user )
107+ <tr >
108+ <td >
109+ <h6 >{{ $user -> firstname } } {{ $user -> lastname } } </h6 >
110+ </td >
111+ <td >
112+ @if ($user -> role == ' SUPER_USER' )
113+ <span class =" badge bg-dark" >{{ __ (' pages/user-manager.super_user' ) } } </span >
114+ @elseif ($user -> role == ' USER' )
115+ <span class =" badge bg-secondary" >{{ __ (' pages/user-manager.user' ) } } </span >
116+ @else
117+ <span class =" badge bg-info text-dark" >{{ $user -> role } } </span >
118+ @endif
119+ </td >
120+ <td class =" text-center" >
121+ <span >{{ $user -> institution } } </span >
122+ </td >
123+ <td class =" text-center" >
124+ <span >{{ $user -> country } } </span >
125+ </td >
126+ <td class =" text-center" >
127+ @if ($user -> active )
128+ <span class =" badge bg-success" >{{ __ (" pages/user-manager.Yes" ) } } </span >
129+ @else
130+ <span class =" badge bg-danger" >{{ __ (" pages/user-manager.No" ) } } </span >
131+ @endif
132+ </td >
133+ <td class =" text-center" >
134+ <div class =" d-flex justify-content-center gap-2" >
135+ <a href =" {{ route (' user.edit' , [' user' => $user ]) } }" class =" btn btn-sm btn-outline-primary btn-action" >
136+ <i class =" fas fa-edit me-1" ></i > {{ __ (" pages/user-manager.Edit" ) } }
137+ </a >
138+ @if ($user -> active )
139+ <a href =" {{ route (' user.deactivate' , [' user' => $user ]) } }" class =" btn btn-sm btn-outline-danger btn-action" >
140+ <i class =" fas fa-user-slash me-1" ></i > {{ __ (' pages/user-manager.Deactivate' ) } }
141+ </a >
142+ @else
143+ <a href =" {{ route (' user.deactivate' , [' user' => $user ]) } }" class =" btn btn-sm btn-outline-success btn-action" >
144+ <i class =" fas fa-user-check me-1" ></i > {{ __ (' pages/user-manager.Activate' ) } }
145+ </a >
146+ @endif
147+ </div >
148+ </td >
149+ </tr >
150+ @endforeach
151+ </tbody >
152+ </table >
153+ </div >
154+ </div >
155+ </div >
156+ </div >
157+ </div >
158+ @endsection
0 commit comments