Added fieldset button

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-02-15 14:14:18 +00:00
parent cc58d4c3ad
commit 6237f6192c
2 changed files with 14 additions and 6 deletions

View file

@ -502,5 +502,6 @@ return [
'action_source' => 'Action Source', 'action_source' => 'Action Source',
'or' => 'or', 'or' => 'or',
'url' => 'URL', 'url' => 'URL',
'edit_fieldset' => 'Edit fieldset fields and options',
]; ];

View file

@ -73,7 +73,14 @@
<nobr> <nobr>
@can('update', $fieldset) @can('update', $fieldset)
<a href="{{ route('fieldsets.edit', $fieldset->id) }}" class="btn btn-warning btn-sm">
<a href="{{ route('fieldsets.show', ['fieldset' => $fieldset->id]) }}" data-tooltip="true" title="{{ trans('general.edit_fieldset') }}">
<button type="submit" class="btn btn-info btn-sm">
<i class="fa-regular fa-rectangle-list"></i>
</button>
</a>
<a href="{{ route('fieldsets.edit', $fieldset->id) }}" class="btn btn-warning btn-sm" data-tooltip="true" title="{{ trans('general.update') }}">
<i class="fas fa-pencil-alt" aria-hidden="true"></i> <i class="fas fa-pencil-alt" aria-hidden="true"></i>
<span class="sr-only">{{ trans('button.edit') }}</span> <span class="sr-only">{{ trans('button.edit') }}</span>
</a> </a>
@ -82,9 +89,9 @@
@can('delete', $fieldset) @can('delete', $fieldset)
{{ Form::open(['route' => array('fieldsets.destroy', $fieldset->id), 'method' => 'delete','style' => 'display:inline-block']) }} {{ Form::open(['route' => array('fieldsets.destroy', $fieldset->id), 'method' => 'delete','style' => 'display:inline-block']) }}
@if($fieldset->models->count() > 0) @if($fieldset->models->count() > 0)
<button type="submit" class="btn btn-danger btn-sm disabled" disabled><i class="fas fa-trash"></i></button> <button type="submit" class="btn btn-danger btn-sm disabled" data-tooltip="true" title="{{ trans('general.cannot_be_deleted') }}" disabled><i class="fas fa-trash"></i></button>
@else @else
<button type="submit" class="btn btn-danger btn-sm"><i class="fas fa-trash"></i></button> <button type="submit" class="btn btn-danger btn-sm" data-tooltip="true" title="{{ trans('general.delete') }}"><i class="fas fa-trash"></i></button>
@endif @endif
{{ Form::close() }} {{ Form::close() }}
@endcan @endcan
@ -188,7 +195,7 @@
<nobr> <nobr>
{{ Form::open(array('route' => array('fields.destroy', $field->id), 'method' => 'delete', 'style' => 'display:inline-block')) }} {{ Form::open(array('route' => array('fields.destroy', $field->id), 'method' => 'delete', 'style' => 'display:inline-block')) }}
@can('update', $field) @can('update', $field)
<a href="{{ route('fields.edit', $field->id) }}" class="btn btn-warning btn-sm"> <a href="{{ route('fields.edit', $field->id) }}" class="btn btn-warning btn-sm" data-tooltip="true" title="{{ trans('general.update') }}">
<i class="fas fa-pencil-alt" aria-hidden="true"></i> <i class="fas fa-pencil-alt" aria-hidden="true"></i>
<span class="sr-only">{{ trans('button.edit') }}</span> <span class="sr-only">{{ trans('button.edit') }}</span>
</a> </a>
@ -197,11 +204,11 @@
@can('delete', $field) @can('delete', $field)
@if($field->fieldset->count()>0) @if($field->fieldset->count()>0)
<button type="submit" class="btn btn-danger btn-sm disabled" disabled> <button type="submit" class="btn btn-danger btn-sm disabled" data-tooltip="true" title="{{ trans('general.cannot_be_deleted') }}" disabled>
<i class="fas fa-trash" aria-hidden="true"></i> <i class="fas fa-trash" aria-hidden="true"></i>
<span class="sr-only">{{ trans('button.delete') }}</span></button> <span class="sr-only">{{ trans('button.delete') }}</span></button>
@else @else
<button type="submit" class="btn btn-danger btn-sm"> <button type="submit" class="btn btn-danger btn-sm" data-tooltip="true" title="{{ trans('general.delete') }}">
<i class="fas fa-trash" aria-hidden="true"></i> <i class="fas fa-trash" aria-hidden="true"></i>
<span class="sr-only">{{ trans('button.delete') }}</span> <span class="sr-only">{{ trans('button.delete') }}</span>
</button> </button>