mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Handle model route names
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
b035003546
commit
744d0d299e
|
@ -16,10 +16,10 @@
|
|||
<ul class="dropdown-menu">
|
||||
@if ($model->deleted_at=='')
|
||||
<li><a href="{{ route('models.edit', $model->id) }}">{{ trans('admin/models/table.edit') }}</a></li>
|
||||
<li><a href="{{ route('clone/model', $model->id) }}">{{ trans('admin/models/table.clone') }}</a></li>
|
||||
<li><a href="{{ route('models.clone.create', $model->id) }}">{{ trans('admin/models/table.clone') }}</a></li>
|
||||
<li><a href="{{ route('hardware.create', ['model_id' => $model->id]) }}">{{ trans('admin/hardware/form.create') }}</a></li>
|
||||
@else
|
||||
<li><a href="{{ route('restore/model', $model->id) }}">{{ trans('admin/models/general.restore') }}</a></li>
|
||||
<li><a href="{{ route('models.restore.store', $model->id) }}">{{ trans('admin/models/general.restore') }}</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -316,7 +316,7 @@
|
|||
|
||||
@can('create', \App\Models\AssetModel::class)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<a href="{{ route('clone/model', $model->id) }}" style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('admin/models/table.clone') }}</a>
|
||||
<a href="{{ route('models.clone.create', $model->id) }}" style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('admin/models/table.clone') }}</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
|
|||
AssetModelsController::class,
|
||||
'getClone'
|
||||
]
|
||||
)->name('clone/model');
|
||||
)->name('models.clone.create');
|
||||
|
||||
Route::post(
|
||||
'{modelId}/clone',
|
||||
|
@ -36,7 +36,7 @@ Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
|
|||
AssetModelsController::class,
|
||||
'postCreate'
|
||||
]
|
||||
)->name('clone/model');
|
||||
)->name('models.clone.store');
|
||||
|
||||
Route::get(
|
||||
'{modelId}/view',
|
||||
|
@ -52,7 +52,7 @@ Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
|
|||
AssetModelsController::class,
|
||||
'getRestore'
|
||||
]
|
||||
)->name('restore/model');
|
||||
)->name('models.restore.store');
|
||||
|
||||
Route::get(
|
||||
'{modelId}/custom_fields',
|
||||
|
|
Loading…
Reference in a new issue