mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
Small tweaks to user export, user view translations
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
f710b1aac3
commit
a46e2ebfd8
|
@ -563,7 +563,7 @@ class UsersController extends Controller
|
|||
trans('general.accessories'),
|
||||
trans('general.consumables'),
|
||||
trans('general.groups'),
|
||||
trans('general.permission_level'),
|
||||
trans('general.permissions'),
|
||||
trans('general.notes'),
|
||||
trans('admin/users/table.activated'),
|
||||
trans('general.created_at'),
|
||||
|
@ -580,10 +580,11 @@ class UsersController extends Controller
|
|||
|
||||
|
||||
$permissionstring = "";
|
||||
if(array_key_exists("superuser", json_decode($user->permissions, true))) {
|
||||
|
||||
if($user->isSuperUser()) {
|
||||
$permissionstring = trans('general.superuser');
|
||||
}
|
||||
elseif(array_key_exists("admin", json_decode($user->permissions, true))) {
|
||||
elseif($user->hasAccess('admin')) {
|
||||
$permissionstring = trans('general.admin');
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -11,6 +11,9 @@ return [
|
|||
'activity_report' => 'Activity Report',
|
||||
'address' => 'Address',
|
||||
'admin' => 'Admin',
|
||||
'admin_tooltip' => 'This user has admin privileges',
|
||||
'superuser' => 'Superuser',
|
||||
'superuser_tooltip' => 'This user has superuser privileges',
|
||||
'administrator' => 'Administrator',
|
||||
'add_seats' => 'Added seats',
|
||||
'age' => "Age",
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
|
||||
@if (($user->isSuperUser()) || ($user->hasAccess('admin')))
|
||||
<i class="fas fa-crown fa-2x{{ ($user->isSuperUser()) ? ' text-danger' : ' text-orange'}}"></i>
|
||||
<div class="{{ ($user->isSuperUser()) ? 'text-danger' : ' text-orange'}}" style="font-weight: bold">{{ ($user->isSuperUser()) ? 'superadmin' : 'admin'}}</div>
|
||||
<div class="{{ ($user->isSuperUser()) ? 'text-danger' : ' text-orange'}}" style="font-weight: bold">{{ ($user->isSuperUser()) ? strtolower(trans('general.superuser')) : strtolower(trans('general.admin')) }}</div>
|
||||
@endif
|
||||
|
||||
|
||||
|
@ -309,9 +309,9 @@
|
|||
<div class="col-md-9">
|
||||
|
||||
@if ($user->isSuperUser())
|
||||
<label class="label label-danger"><i class="fas fa-crown" title="superuser"></i></label>
|
||||
<label class="label label-danger" data-tooltip="true" title="{{ trans('general.superuser_tooltip') }}"><i class="fas fa-crown" title="{{ trans('general.superuser') }}"></i></label>
|
||||
@elseif ($user->hasAccess('admin'))
|
||||
<label class="label label-warning"><i class="fas fa-crown" title="admin"></i></label>
|
||||
<label class="label label-warning" data-tooltip="true" title="{{ trans('general.admin_tooltip') }}"><i class="fas fa-crown" title="{{ trans('general.admin') }}"></i></label>
|
||||
@endif
|
||||
{{ $user->username }}
|
||||
|
||||
|
|
Loading…
Reference in a new issue