2017-09-10 21:12:57 +01:00
|
|
|
@extends(Theme::viewName('layout'))
|
2017-02-13 12:08:16 +00:00
|
|
|
@section('title', trans('admin.edit_group_title', ['group_name' => $group->name]))
|
|
|
|
|
|
|
|
@section('breadcrumb')
|
2017-03-25 21:21:22 +00:00
|
|
|
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
|
|
|
<li class="breadcrumb-item"><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
|
|
|
|
<li class="breadcrumb-item"><a href="{{ route('groups.index') }}">@lang('navigation.breadcrumb.groups')</a></li>
|
|
|
|
<li class="breadcrumb-item active">@lang('navigation.breadcrumb.edit_group')</li>
|
2017-02-13 12:08:16 +00:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
2017-03-25 21:21:22 +00:00
|
|
|
<div class="col">
|
2017-02-13 12:08:16 +00:00
|
|
|
<h1>@yield('title')</h1>
|
|
|
|
<p>@lang('admin.edit_group_intro')</p>
|
|
|
|
<hr/>
|
|
|
|
|
2017-03-25 21:21:22 +00:00
|
|
|
<form action="{{ route('groups.update', [$group->id]) }}" method="post">
|
|
|
|
{{ csrf_field() }}
|
|
|
|
{{ method_field('PUT') }}
|
|
|
|
<div>
|
|
|
|
{{-- Nav tabs --}}
|
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
|
|
@include(Theme::viewName('partials.tab'), ['active_tab' => 'details', 'tab_name' => 'details', 'tab_icon' => 'info-circle', 'tab_text' => trans('admin.group_details_tab')])
|
|
|
|
@include(Theme::viewName('partials.tab'), ['active_tab' => 'details', 'tab_name' => 'users', 'tab_icon' => 'users', 'tab_text' => trans('admin.group_users_tab')])
|
2017-04-15 09:41:15 +01:00
|
|
|
@include(Theme::viewName('partials.tab'), ['active_tab' => 'details', 'tab_name' => 'permissions', 'tab_icon' => 'lock', 'tab_text' => trans('admin.group_permissions_tab')])
|
2017-03-25 21:21:22 +00:00
|
|
|
</ul>
|
2017-02-13 12:08:16 +00:00
|
|
|
|
2017-03-25 21:21:22 +00:00
|
|
|
{{-- Tab panes --}}
|
|
|
|
<div class="tab-content">
|
|
|
|
{{-- Details --}}
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="details-tab">
|
|
|
|
<div class="row">
|
2017-09-01 14:52:06 +01:00
|
|
|
<div class="col-md-6 ml-md-auto mr-md-auto">
|
|
|
|
<div class="form-group">
|
2017-03-25 21:21:22 +00:00
|
|
|
<label class="form-control-label" for="group-name">@lang('forms.name_label')</label>
|
2017-09-01 14:52:06 +01:00
|
|
|
<input type="text" class="form-control{{ $errors->has('name') ? ' is-invalid' : '' }}" id="group-name" name="name" value="{{ old('name') }}">
|
2017-02-15 09:14:52 +00:00
|
|
|
|
2017-03-25 21:21:22 +00:00
|
|
|
@if ($errors->has('name'))
|
2017-09-01 14:52:06 +01:00
|
|
|
<div class="invalid-feedback">
|
2017-03-25 21:21:22 +00:00
|
|
|
<strong>{{ $errors->first('name') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2017-02-15 09:14:52 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-02-13 12:08:16 +00:00
|
|
|
|
2017-03-25 21:21:22 +00:00
|
|
|
{{-- Users --}}
|
|
|
|
<div role="tabpanel" class="tab-pane" id="users-tab">
|
|
|
|
@if ($group->users()->count() > 0)
|
|
|
|
<p>@lang('admin.group_users_message', ['group_name' => $group->name])</p>
|
|
|
|
<ul class="nav nav-pills">
|
|
|
|
@foreach ($group->users as $user)
|
|
|
|
<li class="nav-item"><a class="nav-link" href="{{ route('users.edit', [$user->id]) }}">{{ $user->name }}</a></li>
|
|
|
|
@endforeach
|
|
|
|
</ul>
|
|
|
|
@else
|
|
|
|
<p class="text-danger">@lang('admin.group_no_users_message')</p>
|
|
|
|
<div><a class="btn btn-secondary" href="{{ route('users.index') }}">@lang('admin.users_title')</a></div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2017-04-15 09:41:15 +01:00
|
|
|
|
|
|
|
{{-- Permissions --}}
|
|
|
|
<div role="tabpanel" class="tab-pane" id="permissions-tab">
|
|
|
|
@php
|
|
|
|
$callback = [$group, 'hasAdminPermission'];
|
|
|
|
$callback_object = $group;
|
|
|
|
$key_id = 'group_' . $group->id;
|
|
|
|
$object_id = $group->id
|
|
|
|
@endphp
|
|
|
|
|
|
|
|
@include(Theme::viewName('partials.permission_checkbox'), [
|
|
|
|
'permission' => Theme::getPermission($all_permissions, 'admin', 'access')
|
|
|
|
])
|
|
|
|
|
|
|
|
@include(Theme::viewName('partials.permission_checkbox'), [
|
|
|
|
'permission' => Theme::getPermission($all_permissions, 'admin', 'configure')
|
|
|
|
])
|
|
|
|
|
|
|
|
@include(Theme::viewName('partials.permission_checkbox'), [
|
|
|
|
'permission' => Theme::getPermission($all_permissions, 'admin', 'manage-albums')
|
|
|
|
])
|
2017-04-15 09:58:33 +01:00
|
|
|
|
2017-09-10 09:07:56 +01:00
|
|
|
@include(Theme::viewName('partials.permission_checkbox'), [
|
|
|
|
'permission' => Theme::getPermission($all_permissions, 'admin', 'manage-labels')
|
|
|
|
])
|
|
|
|
|
2018-09-21 15:00:07 +01:00
|
|
|
@include(Theme::viewName('partials.permission_checkbox'), [
|
|
|
|
'permission' => Theme::getPermission($all_permissions, 'admin', 'manage-comments')
|
|
|
|
])
|
|
|
|
|
2017-04-15 09:58:33 +01:00
|
|
|
@include(Theme::viewName('partials.permission_checkbox'), [
|
|
|
|
'permission' => Theme::getPermission($all_permissions, 'admin', 'manage-users')
|
|
|
|
])
|
|
|
|
|
|
|
|
@include(Theme::viewName('partials.permission_checkbox'), [
|
|
|
|
'permission' => Theme::getPermission($all_permissions, 'admin', 'manage-groups')
|
|
|
|
])
|
|
|
|
|
|
|
|
@include(Theme::viewName('partials.permission_checkbox'), [
|
|
|
|
'permission' => Theme::getPermission($all_permissions, 'admin', 'manage-storage')
|
|
|
|
])
|
2017-04-15 09:41:15 +01:00
|
|
|
</div>
|
2017-02-13 12:08:16 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-15 09:41:15 +01:00
|
|
|
|
|
|
|
<div class="text-right mt-3">
|
|
|
|
<a href="{{ route('groups.index') }}" class="btn btn-link">@lang('forms.cancel_action')</a>
|
|
|
|
<button class="btn btn-success" type="submit"><i class="fa fa-fw fa-check"></i> @lang('forms.save_action')</button>
|
|
|
|
</div>
|
2017-03-25 21:21:22 +00:00
|
|
|
</form>
|
2017-02-13 12:08:16 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|