mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
translations for messages
This commit is contained in:
parent
382d849ee1
commit
0f72554a9f
|
@ -335,13 +335,13 @@ class BulkAssetsController extends Controller
|
||||||
public function restore(Request $request) {
|
public function restore(Request $request) {
|
||||||
$assetIds = $request->get('ids');
|
$assetIds = $request->get('ids');
|
||||||
if (empty($assetIds)) {
|
if (empty($assetIds)) {
|
||||||
return redirect()->route('hardware.index')->with('error', 'No Assets Selected');
|
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.restore.nothing_updated'));
|
||||||
} else {
|
} else {
|
||||||
foreach ($assetIds as $key => $assetId) {
|
foreach ($assetIds as $key => $assetId) {
|
||||||
$asset = Asset::withTrashed()->find($assetId);
|
$asset = Asset::withTrashed()->find($assetId);
|
||||||
$asset->restore();
|
$asset->restore();
|
||||||
}
|
}
|
||||||
return redirect()->route('hardware.index')->with('success', 'Assets Restored');
|
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.restore.success'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,8 @@ return [
|
||||||
'restore' => [
|
'restore' => [
|
||||||
'error' => 'Asset was not restored, please try again',
|
'error' => 'Asset was not restored, please try again',
|
||||||
'success' => 'Asset restored successfully.',
|
'success' => 'Asset restored successfully.',
|
||||||
|
'bulk_success' => 'Asset restored successfully.',
|
||||||
|
'nothing_updated' => 'No assets were selected, so nothing was restored.',
|
||||||
],
|
],
|
||||||
|
|
||||||
'audit' => [
|
'audit' => [
|
||||||
|
|
Loading…
Reference in a new issue