mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Updated user view
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
ae2f9571b4
commit
c700127f1a
|
@ -141,6 +141,10 @@ class IconHelper
|
|||
return 'fas fa-map-marker-alt';
|
||||
case 'superadmin':
|
||||
return 'fas fa-crown';
|
||||
case 'print':
|
||||
return 'fa-solid fa-print';
|
||||
case 'checkin-and-delete':
|
||||
return 'fa-solid fa-user-xmark';
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,20 +182,20 @@
|
|||
|
||||
@can('update', $user)
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('users.edit', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('admin/users/general.edit') }}</a>
|
||||
<a href="{{ route('users.edit', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print">
|
||||
<x-icon type="edit" />
|
||||
{{ trans('admin/users/general.edit') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@can('create', $user)
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('users.clone.show', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('admin/users/general.clone') }}</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@can('view', $user)
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
@if($user->allAssignedCount() != '0')
|
||||
<a href="{{ route('users.print', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print" target="_blank" rel="noopener">{{ trans('admin/users/general.print_assigned') }}</a>
|
||||
<a href="{{ route('users.print', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print" target="_blank" rel="noopener">
|
||||
<x-icon type="print" />
|
||||
{{ trans('admin/users/general.print_assigned') }}
|
||||
</a>
|
||||
@else
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_assets_assigned') }}">{{ trans('admin/users/general.print_assigned') }}</button>
|
||||
@endif
|
||||
|
@ -207,12 +207,21 @@
|
|||
@if(!empty($user->email) && ($user->allAssignedCount() != '0'))
|
||||
<form action="{{ route('users.email',['userId'=> $user->id]) }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary hidden-print" rel="noopener">{{ trans('admin/users/general.email_assigned') }}</button>
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print" rel="noopener">
|
||||
<x-icon type="email" />
|
||||
{{ trans('admin/users/general.email_assigned') }}
|
||||
</button>
|
||||
</form>
|
||||
@elseif(!empty($user->email) && ($user->allAssignedCount() == '0'))
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_assets_assigned') }}">{{ trans('admin/users/general.email_assigned') }}</button>
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_assets_assigned') }}">
|
||||
<x-icon type="email" />
|
||||
{{ trans('admin/users/general.email_assigned') }}
|
||||
</button>
|
||||
@else
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_email') }}">{{ trans('admin/users/general.email_assigned') }}</button>
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_email') }}">
|
||||
<x-icon type="email" />
|
||||
{{ trans('admin/users/general.email_assigned') }}
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
@endcan
|
||||
|
@ -223,26 +232,48 @@
|
|||
@if($user->email != '')
|
||||
<form action="{{ route('users.password',['userId'=> $user->id]) }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('button.send_password_link') }}</button>
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print">
|
||||
<x-icon type="password" />
|
||||
{{ trans('button.send_password_link') }}
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_email') }}">{{ trans('button.send_password_link') }}</button>
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_email') }}">
|
||||
<x-icon type="email" />
|
||||
{{ trans('button.send_password_link') }}
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@endcan
|
||||
|
||||
@can('delete', $user)
|
||||
@can('create', $user)
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('users.clone.show', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-info btn-social hidden-print">
|
||||
<x-icon type="clone" />
|
||||
{{ trans('admin/users/general.clone') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
|
||||
@can('delete', $user)
|
||||
@if ($user->deleted_at=='')
|
||||
<div class="col-md-12" style="padding-top: 30px;">
|
||||
@if ($user->isDeletable())
|
||||
<form action="{{route('users.destroy',$user->id)}}" method="POST">
|
||||
{{csrf_field()}}
|
||||
{{ method_field("DELETE")}}
|
||||
<button style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('button.delete')}}</button>
|
||||
<button style="width: 100%;" class="btn btn-sm btn-warning btn-social hidden-print">
|
||||
<x-icon type="delete" />
|
||||
{{ trans('button.delete')}}
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<button style="width: 100%;" class="btn btn-sm btn-warning hidden-print disabled">{{ trans('button.delete')}}</button>
|
||||
<button style="width: 100%;" class="btn btn-sm btn-warning btn-social hidden-print disabled">
|
||||
<x-icon type="delete" />
|
||||
{{ trans('button.delete')}}
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
|
@ -252,14 +283,20 @@
|
|||
<input type="hidden" name="bulk_actions" value="delete" />
|
||||
|
||||
<input type="hidden" name="ids[{{ $user->id }}]" value="{{ $user->id }}" />
|
||||
<button style="width: 100%;" class="btn btn-sm btn-danger hidden-print">{{ trans('button.checkin_and_delete') }}</button>
|
||||
<button style="width: 100%;" class="btn btn-sm btn-danger btn-social hidden-print">
|
||||
<x-icon type="checkin-and-delete" />
|
||||
{{ trans('button.checkin_and_delete') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@else
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<form method="POST" action="{{ route('users.restore.store', $user->id) }}">
|
||||
@csrf
|
||||
<button style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('button.restore') }}</button>
|
||||
<button style="width: 100%;" class="btn btn-sm btn-warning btn-social hidden-print">
|
||||
<x-icon type="restore" />
|
||||
{{ trans('button.restore') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
|
@ -636,7 +673,7 @@
|
|||
{{ trans('admin/users/general.two_factor_active') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if ($user->$user->two_factor_active()) == '1')
|
||||
@if ($user->two_factor_active()) == '1')
|
||||
<x-icon type="checkmark" class="fa-fw text-success" />
|
||||
{{ trans('general.yes') }}
|
||||
@else
|
||||
|
@ -653,7 +690,7 @@
|
|||
{{ trans('admin/users/general.two_factor_enrolled') }}
|
||||
</div>
|
||||
<div class="col-md-9" id="two_factor_reset_toggle">
|
||||
@if ($user->$user->two_factor_active_and_enrolled()) == '1')
|
||||
@if ($user->two_factor_active_and_enrolled()) == '1')
|
||||
<x-icon type="checkmark" class="fa-fw text-success" />
|
||||
{{ trans('general.yes') }}
|
||||
@else
|
||||
|
|
Loading…
Reference in a new issue