v0.10.17 - Added permission check (create/edit/delete) on all admin sites
This commit is contained in:
@@ -34,20 +34,24 @@
|
||||
<th style="width: 6em;">Dato</th>
|
||||
<th>Feedback Besked</th>
|
||||
<th style="width: 5em;">Ris el. Ros</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@if(auth()->user()->can('feedback.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($feedback as $fb)
|
||||
<tr>
|
||||
<td>{{ date('d-m-Y', strtotime($fb->created_at)) }}</td>
|
||||
<td>{{ $fb->message }}</td>
|
||||
<td>{{ $fb->suggestion_form }}</td>
|
||||
<td><form method="post" action="{{ route("feedbacks.destroy", [ "feedback" => $fb ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
@if(auth()->user()->can('feedback.delete'))
|
||||
<td><form method="post" action="{{ route("feedbacks.destroy", [ "feedback" => $fb ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user