Skip to content

Commit 8f65930

Browse files
add option in admin panel to delete threads
1 parent ce3b1f3 commit 8f65930

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

resources/views/admin/users.blade.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
{{ $user->createdAt()->format('j M Y H:i:s') }}
6969
</x-tables.table-data>
7070

71-
<x-tables.table-data class="text-center w-10">
71+
<x-tables.table-data class="text-center w-32">
7272
<a href="{{ route('profile', $user->username()) }}" class="text-lio-600 hover:text-lio-800">
7373
<x-heroicon-o-user-circle class="w-5 h-5 inline" />
7474
</a>
@@ -81,6 +81,14 @@
8181
<x-modal identifier="deleteUser{{ $user->getKey() }}" :action="route('admin.users.delete', $user->username())" title="Delete {{ $user->username() }}">
8282
<p>Deleting this user will remove their account and any related content like threads & replies. This cannot be undone.</p>
8383
</x-modal>
84+
85+
<button title="Delete {{ $user->name() }} threads." @click="activeModal = 'deleteUserThreads{{ $user->getKey() }}'" class="text-red-600 hover:text-red-800">
86+
<x-heroicon-o-chat-bubble-oval-left class="w-5 h-5 inline" />
87+
</button>
88+
89+
<x-modal identifier="deleteUserThreads{{ $user->getKey() }}" :action="route('admin.users.threads.delete', $user->username())" title="Delete {{ $user->username() }} threads">
90+
<p>All the threads from this user will be deleted. This cannot be undone.</p>
91+
</x-modal>
8492
@endcan
8593
</x-tables.table-data>
8694
</tr>

0 commit comments

Comments
 (0)