| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- @extends('layouts.app')
- @section('content')
- <div class="row mb-2">
- <div class="col-md-6">
- <h3>Роли и права</h3>
- </div>
- <div class="col-md-6 text-end">
- <a href="{{ route('admin.roles.create') }}" class="btn btn-sm btn-primary">Добавить роль</a>
- </div>
- </div>
- <div class="table-responsive">
- <table class="table table-sm table-hover align-middle">
- <thead>
- <tr>
- <th>Роль</th>
- <th>Код</th>
- <th>Тип</th>
- <th>Активна</th>
- <th>Пользователей</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- @foreach($roles as $role)
- <tr>
- <td>
- <a href="{{ route('admin.roles.edit', $role) }}">{{ $role->name }}</a>
- @if($role->description)
- <div class="text-muted small">{{ $role->description }}</div>
- @endif
- </td>
- <td><code>{{ $role->slug }}</code></td>
- <td>{{ $role->is_system ? 'Базовая' : 'Пользовательская' }}</td>
- <td>{{ $role->is_active ? 'Да' : 'Нет' }}</td>
- <td>{{ $role->users_count }}</td>
- <td class="text-end">
- <a href="{{ route('admin.roles.edit', $role) }}" class="btn btn-sm btn-outline-primary">Открыть</a>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- </div>
- @endsection
|