63 lines
2.9 KiB
PHP
63 lines
2.9 KiB
PHP
@extends('admin::layouts.app')
|
|
|
|
@section('lock-channel-selector', '1')
|
|
|
|
@section('title', 'Channels')
|
|
|
|
@section('content')
|
|
<div class="flex items-center justify-between mb-6">
|
|
<h1 class="text-xl font-semibold text-gray-900">Channels</h1>
|
|
<a href="{{ route('admin.settings.channels.create') }}"
|
|
class="px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white text-sm font-medium rounded">
|
|
New channel
|
|
</a>
|
|
</div>
|
|
|
|
<div class="bg-white rounded shadow overflow-hidden">
|
|
<table class="w-full text-sm">
|
|
<thead>
|
|
<tr class="border-b border-gray-200 text-left text-xs font-medium text-gray-500 uppercase tracking-wide">
|
|
<th class="px-4 py-3">Name</th>
|
|
<th class="px-4 py-3">Hostname</th>
|
|
<th class="px-4 py-3">Locale</th>
|
|
<th class="px-4 py-3">Template</th>
|
|
<th class="px-4 py-3">Prefixes</th>
|
|
<th class="px-4 py-3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100">
|
|
@forelse($channels as $channel)
|
|
<tr class="hover:bg-gray-50">
|
|
<td class="px-4 py-3 font-medium text-gray-900">{{ $channel->name }}</td>
|
|
<td class="px-4 py-3 text-gray-500 font-mono text-xs">{{ $channel->hostname }}</td>
|
|
<td class="px-4 py-3 text-gray-500">{{ $channel->locale }}</td>
|
|
<td class="px-4 py-3 text-gray-500">{{ $channel->template }}</td>
|
|
<td class="px-4 py-3 text-gray-500">{{ $channel->prefixes_count }}</td>
|
|
<td class="px-4 py-3 text-right">
|
|
<a href="{{ route('admin.settings.channels.edit', $channel) }}"
|
|
class="text-indigo-600 hover:underline mr-3">Edit</a>
|
|
<form method="POST" action="{{ route('admin.settings.channels.destroy', $channel) }}"
|
|
class="inline" onsubmit="return confirm('Delete channel {{ addslashes($channel->name) }}?')">
|
|
@csrf @method('DELETE')
|
|
<button type="submit" class="text-red-500 hover:underline">Delete</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="6" class="px-4 py-8 text-center text-gray-400">No channels yet.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
@if($channels->hasPages())
|
|
<div class="px-4 py-3 border-t border-gray-100">{{ $channels->links() }}</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="mt-6 text-sm text-gray-500">
|
|
<a href="{{ route('admin.settings.prefixes.index') }}" class="text-indigo-600 hover:underline">Manage prefixes</a>
|
|
·
|
|
<a href="{{ route('admin.settings.users.index') }}" class="text-indigo-600 hover:underline">Manage users</a>
|
|
</div>
|
|
@endsection
|