| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- @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>
- <form action="{{ route('admin.roles.copy', $role) }}" method="post" class="d-inline">
- @csrf
- <button type="submit" class="btn btn-sm btn-outline-secondary">Копировать</button>
- </form>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- </div>
- @endsection
|