-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7773ab4
commit d5c20b9
Showing
15 changed files
with
221 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
resources/views/components/table/data-row-actions-delete-relationship.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<form class="d-inline-block" method="POST" | ||
action="{{ route($routeDelete, [$routeDeleteRelationship => $routeDeleteRelationshipId, 'relationship' => $routeDeleteRelationship]) }}"> | ||
@method('DELETE') | ||
@csrf | ||
<input type="hidden" name="_return_url" value="{{ $returnUrl }}"> | ||
<input type="hidden" name="data[0][type]" value="{{ $routeDeleteRelationship }}"> | ||
<input type="hidden" name="data[0][id]" value="{{ $record['id'] }}"> | ||
<button type="submit" class="btn btn-danger ms-2" role="button"> | ||
<span class="fa-solid fa-xmark"></span> | ||
<span class="d-none d-inline-sm">Delete</span> | ||
</button> | ||
</form> |
10 changes: 10 additions & 0 deletions
10
resources/views/components/table/data-row-actions-delete.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<form class="d-inline-block" method="POST" | ||
action="{{ route($routeDelete, [$routeParameter => $record[$routeParameterKey]]) }}"> | ||
@method('DELETE') | ||
@csrf | ||
<input type="hidden" name="_return_url" value="{{ $returnUrl }}"> | ||
<button type="submit" class="btn btn-danger ms-2" role="button"> | ||
<span class="fa-solid fa-xmark"></span> | ||
<span class="d-none d-sm-inline">Delete</span> | ||
</button> | ||
</form> |
19 changes: 19 additions & 0 deletions
19
resources/views/components/table/data-row-actions-edit.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@if (!empty($record['deleted_at']) && $routeRestore) | ||
<form class="d-inline-block" method="POST" | ||
action="{{ route($routeRestore, [$routeParameter => $record[$routeParameterKey]]) }}"> | ||
@method('PUT') | ||
@csrf | ||
<input type="hidden" name="_return_url" value="{{ $returnUrl }}"> | ||
<button type="submit" class="btn btn-primary" role="button"> | ||
<i class="fa-solid fa-recycle"></i> | ||
<span class="d-none d-sm-inline">Restore</span> | ||
</button> | ||
</form> | ||
@elseif ($withEdit && $routeEdit) | ||
<a class="btn btn-primary" | ||
href="{{ route($routeEdit, [$routeParameter => $record[$routeParameterKey], '_return_url' => $returnUrl]) }}" | ||
role="button"> | ||
<i class="fa-solid fa-pen"></i> | ||
<span class="d-none d-sm-inline">Edit</span> | ||
</a> | ||
@endif |
10 changes: 10 additions & 0 deletions
10
resources/views/components/table/data-row-actions-unlock.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<form class="d-inline-block" method="POST" | ||
action="{{ route($routeUnlock, [$routeParameter => $record[$routeParameterKey]]) }}"> | ||
@method('DELETE') | ||
@csrf | ||
<input type="hidden" name="_return_url" value="{{ $returnUrl }}"> | ||
<button type="submit" class="btn btn-danger ms-2" role="button"> | ||
<span class="fas fa-unlock text-success"></span> | ||
<span class="d-none d-sm-inline">Unlock</span> | ||
</button> | ||
</form> |
59 changes: 7 additions & 52 deletions
59
resources/views/components/table/data-row-actions.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,12 @@ | ||
<th> | ||
<div class="text-nowrap" role="group" aria-label="{{ __('playground::pagination.row.actions.label') }}"> | ||
|
||
@php | ||
if (!empty($record['deleted_at'])) { | ||
$withDelete = false; | ||
} | ||
@endphp | ||
|
||
@if ($withDelete && $routeDeleteRelationship && $routeDelete) | ||
<form class="d-inline-block" method="POST" | ||
action="{{ route($routeDelete, ['product' => $routeDeleteRelationshipId, 'relationship' => $routeDeleteRelationship]) }}"> | ||
@method('DELETE') | ||
@csrf | ||
<input type="hidden" name="_return_url" value="{{ $returnUrl }}"> | ||
<input type="hidden" name="data[0][type]" value="{{ $routeDeleteRelationship }}"> | ||
<input type="hidden" name="data[0][id]" value="{{ $record['id'] }}"> | ||
<button type="submit" class="btn btn-danger ms-2" role="button"> | ||
<span class="fa-solid fa-xmark"></span> | ||
<span class="d-none d-inline-sm">Delete</span> | ||
</button> | ||
</form> | ||
@elseif ($withDelete && $routeDelete) | ||
<form class="d-inline-block" method="POST" | ||
action="{{ route($routeDelete, [$routeParameter => $record[$routeParameterKey]]) }}"> | ||
@method('DELETE') | ||
@csrf | ||
<input type="hidden" name="_return_url" value="{{ $returnUrl }}"> | ||
<button type="submit" class="btn btn-danger ms-2" role="button"> | ||
<span class="fa-solid fa-xmark"></span> | ||
<span class="d-none d-sm-inline">Delete</span> | ||
</button> | ||
</form> | ||
@if ($withUnlock && !empty($record['locked']) && $routeUnlock) | ||
@include('playground::components/table/data-row-actions-unlock') | ||
@else | ||
@if ($withDelete && $routeDelete && empty($record['deleted_at'])) | ||
@include('playground::components/table/data-row-actions-delete') | ||
@endif | ||
@include('playground::components/table/data-row-actions-edit') | ||
@endif | ||
|
||
@if (!empty($record['deleted_at']) && $routeRestore) | ||
<form class="d-inline-block" method="POST" | ||
action="{{ route($routeRestore, [$routeParameter => $record[$routeParameterKey]]) }}"> | ||
@method('PUT') | ||
@csrf | ||
<input type="hidden" name="_return_url" value="{{ $returnUrl }}"> | ||
<button type="submit" class="btn btn-primary" role="button"> | ||
<i class="fa-solid fa-recycle"></i> | ||
<span class="d-none d-sm-inline">Restore</span> | ||
</button> | ||
</form> | ||
@elseif ($withEdit && $routeEdit) | ||
<a class="btn btn-primary" | ||
href="{{ route($routeEdit, [$routeParameter => $record[$routeParameterKey], '_return_url' => $returnUrl]) }}" | ||
role="button"> | ||
<i class="fa-solid fa-pen"></i> | ||
<span class="d-none d-sm-inline">Edit</span> | ||
</a> | ||
@endif | ||
|
||
</div> | ||
</th> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.