mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
1ef20ec622
|
@ -282,8 +282,7 @@
|
|||
if ((row.available_actions) && (row.available_actions.restore === true)) {
|
||||
actions += '<form style="display: inline;" method="POST" action="{{ url('/') }}/' + dest + '/' + row.id + '/restore"> ';
|
||||
actions += '@csrf';
|
||||
actions += '<a href="{{ url('/') }}/' + dest + '/' + row.id + '/restore" class="btn btn-sm btn-warning" data-toggle="tooltip" title="{{ trans('general.restore') }}"><i class="far fa-clone"></i></a> ';
|
||||
actions += '<i class="fa fa-retweet" aria-hidden="true"></i><span class="sr-only">{{ trans('general.restore') }}</span></button></form> ';
|
||||
actions += '<button class="btn btn-sm btn-warning" data-toggle="tooltip" title="{{ trans('general.restore') }}"><i class="far fa-retweet"></i></button> ';
|
||||
}
|
||||
|
||||
actions +='</nobr>';
|
||||
|
|
|
@ -141,11 +141,6 @@
|
|||
<div class="callout callout-warning">
|
||||
<i class="icon fas fa-exclamation-triangle"></i>
|
||||
{{ trans('admin/users/message.user_deleted_warning') }}
|
||||
@can('update', $user)
|
||||
<a href="{{ route('restore/user', $user->id) }}">
|
||||
{{ trans('admin/users/general.restore_user') }}
|
||||
</a>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
@ -229,7 +224,10 @@
|
|||
</div>
|
||||
@else
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('restore/user', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('button.restore') }}</a>
|
||||
<form method="POST" action="{{ route('restore/user', $user->id) }}">
|
||||
@csrf
|
||||
<button style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('button.restore') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
@endcan
|
||||
|
|
|
@ -134,7 +134,7 @@ Route::group(
|
|||
[AssetsController::class, 'getBarCode']
|
||||
)->name('barcode/hardware');
|
||||
|
||||
Route::get('{assetId}/restore',
|
||||
Route::post('{assetId}/restore',
|
||||
[AssetsController::class, 'getRestore']
|
||||
)->name('restore/hardware');
|
||||
|
||||
|
|
|
@ -4,47 +4,7 @@ use App\Http\Controllers\Users;
|
|||
use App\Http\Controllers\Users\UserFilesController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
// User Management
|
||||
Route::post(
|
||||
'{userId}/clone',
|
||||
[
|
||||
Users\UsersController::class,
|
||||
'postCreate'
|
||||
]
|
||||
);
|
||||
|
||||
Route::post(
|
||||
'{userId}/restore',
|
||||
[
|
||||
Users\UsersController::class,
|
||||
'getRestore'
|
||||
]
|
||||
)->name('restore/user');
|
||||
|
||||
Route::get(
|
||||
'{userId}/unsuspend',
|
||||
[
|
||||
Users\UsersController::class,
|
||||
'getUnsuspend'
|
||||
]
|
||||
)->name('unsuspend/user');
|
||||
|
||||
Route::post(
|
||||
'{userId}/upload',
|
||||
[
|
||||
Users\UserFilesController::class,
|
||||
'store'
|
||||
]
|
||||
)->name('upload/user');
|
||||
|
||||
Route::delete(
|
||||
'{userId}/deletefile/{fileId}',
|
||||
[
|
||||
Users\UserFilesController::class,
|
||||
'destroy'
|
||||
]
|
||||
)->name('userfile.destroy');
|
||||
|
||||
// User Management
|
||||
|
||||
Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
|
||||
|
||||
|
@ -88,7 +48,7 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
|
|||
]
|
||||
)->name('clone/user');
|
||||
|
||||
Route::get(
|
||||
Route::post(
|
||||
'{userId}/restore',
|
||||
[
|
||||
Users\UsersController::class,
|
||||
|
|
Loading…
Reference in a new issue