2021-08-22 20:15:58 +08:00
|
|
|
@extends('layouts.simple')
|
2016-02-27 07:44:02 +08:00
|
|
|
|
2017-08-27 00:17:04 +08:00
|
|
|
@section('body')
|
|
|
|
|
2019-02-04 01:34:15 +08:00
|
|
|
<div class="container small">
|
2019-02-02 23:49:57 +08:00
|
|
|
<div class="py-m">
|
2021-08-22 20:15:58 +08:00
|
|
|
@include('settings.parts.navbar', ['selected' => 'roles'])
|
2016-02-28 03:24:42 +08:00
|
|
|
</div>
|
2019-02-02 23:49:57 +08:00
|
|
|
|
2021-12-19 20:27:14 +08: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 23:49:57 +08:00
|
|
|
</div>
|
|
|
|
|
2016-02-27 07:44:02 +08:00
|
|
|
@stop
|