2021-08-22 14:15:58 +02:00
|
|
|
@extends('layouts.simple')
|
2016-02-27 00:44:02 +01:00
|
|
|
|
2017-08-26 18:17:04 +02:00
|
|
|
@section('body')
|
|
|
|
|
2019-02-03 18:34:15 +01:00
|
|
|
<div class="container small">
|
2022-03-26 22:36:05 +01:00
|
|
|
@include('settings.parts.navbar', ['selected' => 'roles'])
|
2019-02-02 16:49:57 +01:00
|
|
|
|
2021-12-19 13:27:14 +01:00
|
|
|
<div class="card content-wrap">
|
|
|
|
<h1 class="list-heading">{{ trans('settings.role_edit') }}</h1>
|
|
|
|
|
|
|
|
<form action="{{ url("/settings/roles/{$role->id}") }}" method="POST">
|
|
|
|
{{ csrf_field() }}
|
|
|
|
{{ method_field('PUT') }}
|
|
|
|
|
|
|
|
@include('settings.roles.parts.form', ['role' => $role])
|
|
|
|
|
|
|
|
<div class="form-group text-right">
|
|
|
|
<a href="{{ url("/settings/roles") }}" class="button outline">{{ trans('common.cancel') }}</a>
|
|
|
|
<a href="{{ url("/settings/roles/new?copy_from={$role->id}") }}" class="button outline">{{ trans('common.copy') }}</a>
|
|
|
|
<a href="{{ url("/settings/roles/delete/{$role->id}") }}" class="button outline">{{ trans('settings.role_delete') }}</a>
|
|
|
|
<button type="submit" class="button">{{ trans('settings.role_save') }}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="card content-wrap auto-height">
|
|
|
|
<h2 class="list-heading">{{ trans('settings.role_users') }}</h2>
|
|
|
|
@if(count($role->users ?? []) > 0)
|
|
|
|
<div class="grid third">
|
|
|
|
@foreach($role->users as $user)
|
|
|
|
<div class="user-list-item">
|
|
|
|
<div>
|
|
|
|
<img class="avatar small" src="{{ $user->getAvatar(40) }}" alt="{{ $user->name }}">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
@if(userCan('users-manage') || user()->id == $user->id)
|
|
|
|
<a href="{{ url("/settings/users/{$user->id}") }}">
|
|
|
|
@endif
|
|
|
|
{{ $user->name }}
|
|
|
|
@if(userCan('users-manage') || user()->id == $user->id)
|
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
@else
|
|
|
|
<p class="text-muted">
|
|
|
|
{{ trans('settings.role_users_none') }}
|
|
|
|
</p>
|
|
|
|
@endif
|
|
|
|
</div>
|
2019-02-02 16:49:57 +01:00
|
|
|
</div>
|
|
|
|
|
2016-02-27 00:44:02 +01:00
|
|
|
@stop
|