[WIP] Setup of skeleton
This commit is contained in:
52
resources/views/users/permissions/create.blade.php
Normal file
52
resources/views/users/permissions/create.blade.php
Normal file
@@ -0,0 +1,52 @@
|
||||
@extends('layout.index', [
|
||||
'title' => 'Permissions',
|
||||
'subtitle' => __('permissions.edit.title'),
|
||||
'breadcrumb' => [
|
||||
__('permissions.title') => 'boilerplate.Users.Permissions.index',
|
||||
__('permissions.edit.title')
|
||||
]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.icheck')
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => ['boilerplate.Users.Permissions.update', ''], 'method' => 'put', 'autocomplete' => 'off']) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("boilerplate.Users.Permissions.index") }}" class="btn btn-default">
|
||||
{{ __('permissions.list.title') }}
|
||||
</a>
|
||||
<span class="btn-group pull-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('permissions.savebutton') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('permissions.parameters') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group {{ $errors->has('display_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('display_name', __('permissions.label')) }}
|
||||
{{ Form::text('display_name', '', ['class' => 'form-control', 'autofocus']) }}
|
||||
{!! $errors->first('display_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('description') ? 'has-error' : '' }}">
|
||||
{{ Form::label('description', __('permissions.description')) }}
|
||||
{{ Form::text('description', '', ['class' => 'form-control']) }}
|
||||
{!! $errors->first('description','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('name', __('permissions.name')) }}
|
||||
{{ Form::text('name', '', ['class' => 'form-control']) }}
|
||||
{!! $errors->first('name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
@endsection
|
||||
52
resources/views/users/permissions/edit.blade.php
Normal file
52
resources/views/users/permissions/edit.blade.php
Normal file
@@ -0,0 +1,52 @@
|
||||
@extends('layout.index', [
|
||||
'title' => 'Permissions',
|
||||
'subtitle' => 'Edition',
|
||||
'breadcrumb' => [
|
||||
__('permissions.title') => 'boilerplate.Users.Permissions.index',
|
||||
__('permissions.edit.title')
|
||||
]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.icheck')
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => ['boilerplate.Users.Permissions.update', $permission->id], 'method' => 'put', 'autocomplete' => 'off']) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("boilerplate.Users.Permissions.index") }}" class="btn btn-default">
|
||||
{{ __('permissions.list.title') }}
|
||||
</a>
|
||||
<span class="btn-group pull-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('permissions.savebutton') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('permissions.parameters') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group {{ $errors->has('display_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('display_name', __('permissions.label')) }}
|
||||
{{ Form::text('display_name', old('display_name', $permission->display_name), ['class' => 'form-control', 'autofocus']) }}
|
||||
{!! $errors->first('display_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('description') ? 'has-error' : '' }}">
|
||||
{{ Form::label('description', __('permissions.description')) }}
|
||||
{{ Form::text('description', old('description', $permission->description), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('description','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('name', __('permissions.name')) }}
|
||||
{{ Form::text('name', old('name', $permission->name), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
@endsection
|
||||
85
resources/views/users/permissions/list.blade.php
Normal file
85
resources/views/users/permissions/list.blade.php
Normal file
@@ -0,0 +1,85 @@
|
||||
@extends('boilerplate::layout.index', [
|
||||
'title' => __('permissions.title'),
|
||||
'subtitle' => __('permissions.list.title'),
|
||||
'breadcrumb' => ['Utilisateurs', 'Permissions']
|
||||
])
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<span class="pull-right">
|
||||
<a href="{{ route("boilerplate.Users.Permissions.create") }}" class="btn btn-primary">{{ __('permissions.create.title') }}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box box-info">
|
||||
<div class="box-body">
|
||||
<table class="table table-striped table-hover va-middle" id="permissions-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('permissions.name') }}</th>
|
||||
<th>{{ __('permissions.label') }}</th>
|
||||
<th>{{ __('permissions.description') }}</th>
|
||||
<th>{{ __('permissions.list.nbusers') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($permissions as $permission)
|
||||
<tr>
|
||||
<td>
|
||||
<strong>{{ $permission->name }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $permission->display_name }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ $permission->description }}<br />
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('boilerplate.Users.Permissions.edit', $permission->id) }}" class="btn btn-sm btn-primary">
|
||||
<span class="fa fa-pencil"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@include('boilerplate::load.datatables')
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#permissions-table').dataTable();
|
||||
|
||||
$('#permissions-table').on('click', '.destroy', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var href = $(this).attr('href');
|
||||
var line = $(this).closest('tr');
|
||||
|
||||
bootbox.confirm("{{ __('boilerplate::permission.list.confirmdelete') }}", function (result) {
|
||||
if (result === false) return;
|
||||
|
||||
$.ajax({
|
||||
url: href,
|
||||
method: 'delete',
|
||||
headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}'},
|
||||
success: function(){
|
||||
line.remove();
|
||||
growl("{{ __('boilerplate::permission.list.deletesuccess') }}", 'success');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
74
resources/views/users/roles/create.blade.php
Normal file
74
resources/views/users/roles/create.blade.php
Normal file
@@ -0,0 +1,74 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('boilerplate::role.title'),
|
||||
'subtitle' => __('boilerplate::role.create.title'),
|
||||
'breadcrumb' => [
|
||||
__('boilerplate::role.title') => 'boilerplate.roles.index',
|
||||
__('boilerplate::role.create.title')
|
||||
]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.icheck')
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => 'boilerplate.roles.store', 'autocomplete' => 'off']) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("boilerplate.roles.index") }}" class="btn btn-default">
|
||||
{{ __('boilerplate::role.list.title') }}
|
||||
</a>
|
||||
<span class="btn-group pull-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('boilerplate::role.savebutton') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('boilerplate::role.parameters') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group {{ $errors->has('display_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('display_name', __('boilerplate::role.label')) }}
|
||||
{{ Form::text('display_name', old('display_name'), ['class' => 'form-control', 'autofocus']) }}
|
||||
{!! $errors->first('display_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('description') ? 'has-error' : '' }}">
|
||||
{{ Form::label('description', __('boilerplate::role.description')) }}
|
||||
{{ Form::text('description', old('description'), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('description','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if(count($permissions) > 0)
|
||||
<div class="col-md-7">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('boilerplate::role.permissions') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table table-hover table-striped table-condensed">
|
||||
<tbody>
|
||||
@foreach($permissions as $permission)
|
||||
<tr>
|
||||
<td style="width:25px;">
|
||||
{{ Form::checkbox('permission['.$permission->id.']', 1, old('permission['.$permission->id.']'), ['id' => 'permission_'.$permission->id, 'class' => 'icheck']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::label('permission_'.$permission->id, $permission->display_name, ['class' => 'mbn']) }}<br />
|
||||
<small>{{ __($permission->description) }}</small>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
@endsection
|
||||
78
resources/views/users/roles/edit.blade.php
Normal file
78
resources/views/users/roles/edit.blade.php
Normal file
@@ -0,0 +1,78 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('boilerplate::role.title'),
|
||||
'subtitle' => __('boilerplate::role.edit.title'),
|
||||
'breadcrumb' => [
|
||||
__('boilerplate::role.title') => 'boilerplate.roles.index',
|
||||
__('boilerplate::role.edit.title')
|
||||
]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.icheck')
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => ['boilerplate.roles.update', $role->id], 'method' => 'put', 'autocomplete' => 'off']) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("boilerplate.roles.index") }}" class="btn btn-default">
|
||||
{{ __('boilerplate::role.list.title') }}
|
||||
</a>
|
||||
<span class="btn-group pull-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('boilerplate::role.savebutton') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('boilerplate::role.parameters') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{!! $errors->first('name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
<div class="form-group {{ $errors->has('display_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('display_name', __('boilerplate::role.label')) }}
|
||||
{{ Form::text('display_name', old('display_name', $role->display_name), ['class' => 'form-control', 'autofocus']) }}
|
||||
{!! $errors->first('display_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('description') ? 'has-error' : '' }}">
|
||||
{{ Form::label('description', __('boilerplate::role.description')) }}
|
||||
{{ Form::text('description', old('description', $role->description), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('description','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if(count($permissions) > 0)
|
||||
<div class="col-md-7">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('boilerplate::role.permissions') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table table-hover table-striped table-condensed">
|
||||
<tbody>
|
||||
@foreach($permissions as $permission)
|
||||
<tr>
|
||||
<td style="width:25px;">
|
||||
@if($role->id == 1)
|
||||
<input type="checkbox" checked disabled class="icheck"/>
|
||||
@else
|
||||
{{ Form::checkbox('permission['.$permission->id.']', 1, old('permission['.$permission->id.']', $role->permissions()->where(['id' => $permission->id])->count()), ['id' => 'permission_'.$permission->id, 'class' => 'icheck']) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::label('permission_'.$permission->id, $permission->display_name, ['class' => 'mbn']) }}<br />
|
||||
<small>{{ $permission->description }}</small>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
{{ Form::close() }}
|
||||
@endsection
|
||||
95
resources/views/users/roles/list.blade.php
Normal file
95
resources/views/users/roles/list.blade.php
Normal file
@@ -0,0 +1,95 @@
|
||||
@extends('boilerplate::layout.index', [
|
||||
'title' => __('boilerplate::role.title'),
|
||||
'subtitle' => __('boilerplate::role.list.title'),
|
||||
'breadcrumb' => [__('boilerplate::role.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<span class="pull-right">
|
||||
<a href="{{ route("boilerplate.roles.create") }}" class="btn btn-primary">{{ __('boilerplate::role.create.title') }}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('boilerplate::role.list.title') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table table-striped table-hover va-middle" id="roles-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('boilerplate::role.label') }}</th>
|
||||
<th>{{ __('boilerplate::role.description') }}</th>
|
||||
<th>{{ __('boilerplate::role.permissions') }}</th>
|
||||
<th>{{ __('boilerplate::role.list.nbusers') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td>
|
||||
<strong>{{ $role->display_name }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ $role->description }}<br />
|
||||
</td>
|
||||
<td>
|
||||
{!! $role->permissions->implode('display_name', ', ') !!}
|
||||
</td>
|
||||
<td>
|
||||
{{ $role->getNbUsers() }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('boilerplate.roles.edit', $role->id) }}" class="btn btn-sm btn-primary">
|
||||
<span class="fa fa-pencil"></span>
|
||||
</a>
|
||||
@if($role->name !== 'admin' &&
|
||||
!(config('boilerplate.auth.register') && $role->name === config('boilerplate.auth.register_role')) &&
|
||||
$role->getNbUsers() === 0)
|
||||
<a href="{{ route('boilerplate.roles.destroy', $role->id) }}" class="btn btn-sm btn-danger destroy">
|
||||
<span class="fa fa-trash"></span>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@include('boilerplate::load.datatables')
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#roles-table').dataTable();
|
||||
|
||||
$('#roles-table').on('click', '.destroy', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var href = $(this).attr('href');
|
||||
var line = $(this).closest('tr');
|
||||
|
||||
bootbox.confirm("{{ __('boilerplate::role.list.confirmdelete') }}", function (result) {
|
||||
if (result === false) return;
|
||||
|
||||
$.ajax({
|
||||
url: href,
|
||||
method: 'delete',
|
||||
headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}'},
|
||||
success: function(){
|
||||
line.remove();
|
||||
growl("{{ __('boilerplate::role.list.deletesuccess') }}", 'success');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
74
resources/views/users/teams/create.blade.php
Normal file
74
resources/views/users/teams/create.blade.php
Normal file
@@ -0,0 +1,74 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('team.title'),
|
||||
'subtitle' => __('team.create.title'),
|
||||
'breadcrumb' => [
|
||||
__('team.title') => 'boilerplate.Users.Teams.index',
|
||||
__('team.create.title')
|
||||
]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.icheck')
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => 'boilerplate.Users.Teams.store', 'autocomplete' => 'off']) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("boilerplate.Users.Teams.index") }}" class="btn btn-default">
|
||||
{{ __('team.list.title') }}
|
||||
</a>
|
||||
<span class="btn-group pull-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('team.savebutton') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('team.parameters') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group {{ $errors->has('display_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('display_name', __('team.label')) }}
|
||||
{{ Form::text('display_name', old('display_name'), ['class' => 'form-control', 'autofocus']) }}
|
||||
{!! $errors->first('display_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('description') ? 'has-error' : '' }}">
|
||||
{{ Form::label('description', __('team.description')) }}
|
||||
{{ Form::text('description', old('description'), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('description','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if(count($permissions) > 0)
|
||||
<div class="col-md-7">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('team.permissions') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table table-hover table-striped table-condensed">
|
||||
<tbody>
|
||||
@foreach($permissions as $permission)
|
||||
<tr>
|
||||
<td style="width:25px;">
|
||||
{{ Form::checkbox('permission['.$permission->id.']', 1, old('permission['.$permission->id.']'), ['id' => 'permission_'.$permission->id, 'class' => 'icheck']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::label('permission_'.$permission->id, __($permission->display_name), ['class' => 'mbn']) }}<br />
|
||||
<small>{{ __($permission->description) }}</small>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
@endsection
|
||||
52
resources/views/users/teams/edit.blade.php
Normal file
52
resources/views/users/teams/edit.blade.php
Normal file
@@ -0,0 +1,52 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('team.title'),
|
||||
'subtitle' => __('team.edit.title'),
|
||||
'breadcrumb' => [
|
||||
__('team.title') => 'boilerplate.Users.Teams.index',
|
||||
__('team.edit.title')
|
||||
]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.icheck')
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => ['boilerplate.Users.Teams.update', $team->id], 'method' => 'put', 'autocomplete' => 'off']) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("boilerplate.Users.Teams.index") }}" class="btn btn-default">
|
||||
{{ __('team.list.title') }}
|
||||
</a>
|
||||
<span class="btn-group pull-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('team.savebutton') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('team.parameters') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group {{ $errors->has('display_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('display_name', __('team.label')) }}
|
||||
{{ Form::text('display_name', old('display_name', $team->display_name), ['class' => 'form-control', 'autofocus']) }}
|
||||
{!! $errors->first('display_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('description') ? 'has-error' : '' }}">
|
||||
{{ Form::label('description', __('team.description')) }}
|
||||
{{ Form::text('description', old('description', $team->description), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('description','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('name', __('team.name')) }}
|
||||
{{ Form::text('name', old('name', $team->name), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
@endsection
|
||||
108
resources/views/users/teams/list.blade.php
Normal file
108
resources/views/users/teams/list.blade.php
Normal file
@@ -0,0 +1,108 @@
|
||||
@extends('boilerplate::layout.index', [
|
||||
'title' => __('team.title'),
|
||||
'subtitle' => __('team.list.title'),
|
||||
'breadcrumb' => [__('team.list.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<table class="table table-striped table-hover va-middle" id="teams-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('team.label') }}</th>
|
||||
<th>{{ __('team.description') }}</th>
|
||||
<th>{{ __('team.list.nbusers') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@prepend('js')
|
||||
@include('components.js.ie11')
|
||||
@include('components.js', ['js' => '/js/laroute.js'])
|
||||
@include('components.js', ['js' => '/js/main.min.js'])
|
||||
@include('components.js', ['js' => '/js/datatables.min.js'])
|
||||
@endprepend
|
||||
|
||||
@push('css')
|
||||
@include('components.css', ['css' => '/css/main.min.css'])
|
||||
@include('components.css', ['css' => '/css/datatables.min.css'])
|
||||
@endpush
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(function() {
|
||||
|
||||
var columns = [
|
||||
{
|
||||
data: 'name',
|
||||
render: function (data, type, row) {
|
||||
if (data) {
|
||||
tpl = '<strong>' + data + '</strong>';
|
||||
} else {
|
||||
tpl = "Non défini";
|
||||
}
|
||||
return tpl;
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'description',
|
||||
render: function (data, type, row) {
|
||||
var tpl = '';
|
||||
if (row.societe) {
|
||||
if (row.societe.manager_prenom) {
|
||||
tpl += row.societe.manager_prenom;
|
||||
}
|
||||
if (row.societe.manager_nom) {
|
||||
tpl += ' - ' + row.societe.manager_nom;
|
||||
}
|
||||
}
|
||||
return tpl;
|
||||
}
|
||||
},
|
||||
{ data: "users_count"},
|
||||
{
|
||||
data: "id",
|
||||
name: "action",
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
render: function (data, type, row) {
|
||||
tpl = "<span class='pull-right'>";
|
||||
tpl += " <a data-id=" + data + " class='btn btn-xs btn-primary edit' href='" + laroute.route('boilerplate.Users.Teams.edit', {id: data}) + "'><i class='fa fa-pencil fa-fw'></i></a>";
|
||||
tpl += " <a data-id=" + data + " class='btn btn-xs btn-danger destroy' href='#'><i class='fa fa-trash fa-fw'></i></a>";
|
||||
tpl += "</span>";
|
||||
return tpl;
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
var options = {
|
||||
columns: columns,
|
||||
}
|
||||
|
||||
var model = "teams";
|
||||
var route = '{!! route('boilerplate.Users.Teams.getTable') !!}';
|
||||
var table = getDataTables(options,route,model);
|
||||
|
||||
tpl = '<a href="' + laroute.route('boilerplate.Users.Teams.create') + '" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> Création d\'un groupe</a>';
|
||||
$('div.col-md-4.add').html(tpl);
|
||||
|
||||
$('#teams-table').on('click', '.destroy', function (e) {
|
||||
e.preventDefault();
|
||||
var id = $(this).data('id');
|
||||
confirm_delete(id, laroute.route('boilerplate.Users.Teams.destroy'), function() {
|
||||
table.draw();
|
||||
// growl("{{ __('boilerplate::teams.list.deletesuccess') }}", 'success');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
12
resources/views/users/users/agenda.blade.php
Normal file
12
resources/views/users/users/agenda.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<div id="calendar" class="calendar">
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
@include('components.js', ['js' => '/js/calendar.min.js'])
|
||||
@include('components.js', ['js' => '/js/events.min.js'])
|
||||
@endpush
|
||||
|
||||
@push('css')
|
||||
@include('components.css', ['css' => '/css/calendar.min.css'])
|
||||
@endpush
|
||||
|
||||
100
resources/views/users/users/create.blade.php
Normal file
100
resources/views/users/users/create.blade.php
Normal file
@@ -0,0 +1,100 @@
|
||||
@extends('boilerplate::layout.index', [
|
||||
'title' => __('boilerplate::users.title'),
|
||||
'subtitle' => __('boilerplate::users.create.title'),
|
||||
'breadcrumb' => [
|
||||
__('boilerplate::users.title') => 'boilerplate.users.index',
|
||||
__('boilerplate::users.create.title')
|
||||
]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.icheck')
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => 'boilerplate.users.store', 'autocomplete' => 'off']) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("boilerplate.users.index") }}" class="btn btn-default">
|
||||
{{ __('boilerplate::users.returntolist') }}
|
||||
</a>
|
||||
<span class="btn-group pull-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('boilerplate::users.save') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('boilerplate::users.informations') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="form-group {{ $errors->has('active') ? 'has-error' : '' }}">
|
||||
{{ Form::label('active', __('boilerplate::users.status')) }}
|
||||
{{ Form::select("active", ['0' => __('boilerplate::users.inactive'), '1' => __('boilerplate::users.active')], old('active', 1), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('active','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-8">
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{{ Form::label('email', __('boilerplate::users.email')) }}
|
||||
{{ Form::input('text', 'email', old('email'), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('email','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<small class="text-muted">
|
||||
{{ __('boilerplate::users.create.help') }}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('last_name', __('boilerplate::users.firstname')) }}
|
||||
{{ Form::input('text', 'first_name', old('first_name'), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('first_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('last_name', __('boilerplate::users.lastname')) }}
|
||||
{{ Form::input('text', 'last_name', old('last_name'), ['class' => 'form-control', 'autofocus']) }}
|
||||
{!! $errors->first('last_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('boilerplate::users.roles') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table table-condensed table-hover">
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td style="width:25px">
|
||||
{{ Form::checkbox('roles['.$role->id.']', null, null, ['id' => 'role_'.$role->id, 'class' => 'icheck']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::label('role_'.$role->id, $role->display_name, ['class' => 'mbn']) }}<br />
|
||||
<span class="small">{{ $role->description }}</span><br />
|
||||
<!--
|
||||
<span class="small text-muted">{{ $role->permissions->implode('display_name', ', ') }}</span>
|
||||
-->
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
@endsection
|
||||
97
resources/views/users/users/edit.blade.php
Normal file
97
resources/views/users/users/edit.blade.php
Normal file
@@ -0,0 +1,97 @@
|
||||
@extends('boilerplate::layout.index', [
|
||||
'title' => __('boilerplate::users.title'),
|
||||
'subtitle' => __('boilerplate::users.edit.title'),
|
||||
'breadcrumb' => [
|
||||
__('boilerplate::users.title') => 'boilerplate.users.index',
|
||||
__('boilerplate::users.edit.title')
|
||||
]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => ['boilerplate.users.update', $user->id], 'method' => 'put', 'autocomplete' => 'off']) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("boilerplate.users.index") }}" class="btn btn-default">
|
||||
{{ __('boilerplate::users.returntolist') }}
|
||||
</a>
|
||||
<span class="btn-group pull-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('boilerplate::users.save') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('boilerplate::users.informations') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(Auth::user()->id !== $user->id)
|
||||
<div class="form-group {{ $errors->has('active') ? 'has-error' : '' }}">
|
||||
{{ Form::label('active', __('boilerplate::users.status')) }}
|
||||
{{ Form::select('active', ['0' => __('boilerplate::users.inactive'), '1' => __('boilerplate::users.active')], old('active', $user->active), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('active','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('last_name', __('boilerplate::users.lastname')) }}
|
||||
{{ Form::text('last_name', old('last_name', $user->last_name), ['class' => 'form-control', 'autofocus']) }}
|
||||
{!! $errors->first('last_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('first_name', __('boilerplate::users.firstname')) }}
|
||||
{{ Form::text('first_name', old('first_name', $user->first_name), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('first_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{{ Form::label('email', __('boilerplate::users.email')) }}
|
||||
{{ Form::email('email', old('email', $user->email), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('email','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('boilerplate::users.roles') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table table-condensed table-hover">
|
||||
@foreach($roles as $role)
|
||||
@if($role->name !== 'admin' || ($role->name === 'admin' && Auth::user()->hasRole('admin')))
|
||||
<tr>
|
||||
<td style="width:25px">
|
||||
@if(Auth::user()->id === $user->id && $role->name === 'admin' && Auth::user()->hasRole('admin'))
|
||||
{{ Form::checkbox('roles['.$role->id.']', 1, old('roles['.$role->id.']', $user->hasRole($role->name)), ['id' => 'role_'.$role->id, 'class' => 'icheck', 'checked', 'disabled']) }}
|
||||
{!! Form::hidden('roles['.$role->id.']', '1', ['id' => 'role_'.$role->id]) !!}
|
||||
@else
|
||||
{{ Form::checkbox('roles['.$role->id.']', 1, old('roles['.$role->id.']', $user->hasRole($role->name)), ['id' => 'role_'.$role->id, 'class' => 'icheck']) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::label('role_'.$role->id, $role->display_name, ['class' => 'mbn']) }}<br />
|
||||
<span class="small">{{ $role->description }}</span><br />
|
||||
<span class="small text-muted">{{ $role->permissions->implode('display_name', ', ') }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
@endsection
|
||||
|
||||
@include('boilerplate::load.icheck')
|
||||
88
resources/views/users/users/list.blade.php
Normal file
88
resources/views/users/users/list.blade.php
Normal file
@@ -0,0 +1,88 @@
|
||||
@extends('boilerplate::layout.index', [
|
||||
'title' => __('boilerplate::users.title'),
|
||||
'subtitle' => __('boilerplate::users.list.title'),
|
||||
'breadcrumb' => [
|
||||
__('boilerplate::users.title') => 'boilerplate.users.index'
|
||||
]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<span class="btn-group pull-right">
|
||||
<a href="{{ route("boilerplate.users.create") }}" class="btn btn-primary">
|
||||
{{ __('boilerplate::users.create.title') }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('boilerplate::users.list.title') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table table-striped table-hover va-middle" id="users-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('boilerplate::users.list.state') }}</th>
|
||||
<th>{{ __('boilerplate::users.list.lastname') }}</th>
|
||||
<th>{{ __('boilerplate::users.list.firstname') }}</th>
|
||||
<th>{{ __('boilerplate::users.list.email') }}</th>
|
||||
<th>{{ __('boilerplate::users.list.roles') }}</th>
|
||||
<th>{{ __('boilerplate::users.list.creationdate') }}</th>
|
||||
<th>{{ __('boilerplate::users.list.lastconnect') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@include('boilerplate::load.datatables')
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function () {
|
||||
oTable = $('#users-table').DataTable({
|
||||
processing: false,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: '{!! route('boilerplate.users.datatable') !!}',
|
||||
type: 'post',
|
||||
headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}'}
|
||||
},
|
||||
columns: [
|
||||
{data: 'active', name: 'active', searchable: false},
|
||||
{data: 'last_name', name: 'last_name'},
|
||||
{data: 'first_name', name: 'first_name'},
|
||||
{data: 'email', name: 'email'},
|
||||
{data: 'roles', name: 'roles', searchable: false},
|
||||
{data: 'created_at', name: 'created_at', searchable: false},
|
||||
{data: 'last_login', name: 'last_login', searchable: false},
|
||||
{data: 'actions', name: 'actions', orderable: false, searchable: false, width : '86px'}
|
||||
]
|
||||
});
|
||||
|
||||
$('#users-table').on('click', '.destroy', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var href = $(this).attr('href');
|
||||
|
||||
bootbox.confirm("{{ __('boilerplate::users.list.confirmdelete') }}", function (result) {
|
||||
if (result === false) return;
|
||||
|
||||
$.ajax({
|
||||
url: href,
|
||||
method: 'delete',
|
||||
headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}'},
|
||||
success: function(){
|
||||
oTable.ajax.reload();
|
||||
growl("{{ __('boilerplate::users.list.deletesuccess') }}", "success");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
132
resources/views/users/users/profile.blade.php
Normal file
132
resources/views/users/users/profile.blade.php
Normal file
@@ -0,0 +1,132 @@
|
||||
@extends('boilerplate::layout.index', [
|
||||
'title' => __('boilerplate::users.profile.title'),
|
||||
'subtitle' => $user->name,
|
||||
'breadcrumb' => [
|
||||
$user->name => 'boilerplate.user.profile',
|
||||
]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => ['boilerplate.user.profile'], 'method' => 'post', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<span class="btn-group pull-right">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('boilerplate::users.save') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-5">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon" style="line-height: normal">
|
||||
<img src="{{ $user->avatar_url }}" class="avatar" alt="avatar"/>
|
||||
</span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">
|
||||
<p class="mbn"><strong class="h3">{{ $user->name }}</strong></p>
|
||||
<p class="">{{ $user->getRolesList() }}</p>
|
||||
</span>
|
||||
<span class="info-box-more">
|
||||
<p class="mbn text-muted">
|
||||
{{ __('boilerplate::users.profile.subscribedsince', [
|
||||
'date' => $user->created_at->isoFormat(__('boilerplate::date.lFdY')),
|
||||
'since' => $user->created_at->diffForHumans()]) }}
|
||||
</p>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
@if(is_file($user->avatar_path))
|
||||
<span class="pull-right">
|
||||
<button class="btn btn-xs btn-default" id="remove_avatar">
|
||||
{{ __('boilerplate::users.profile.delavatar') }}
|
||||
</button>
|
||||
</span>
|
||||
@endif
|
||||
<h3 class="box-title">{{ __('boilerplate::users.profile.avatar') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group {{ $errors->has('avatar') ? 'has-error' : '' }}">
|
||||
{!! Form::file('avatar', ['id' => 'avatar']) !!}
|
||||
{!! $errors->first('avatar','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-7">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{ __('boilerplate::users.informations') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('first_name', __('boilerplate::users.firstname')) }}
|
||||
{{ Form::text('first_name', old('first_name', $user->first_name), ['class' => 'form-control']) }}
|
||||
{!! $errors->first('first_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
{{ Form::label('last_name', __('boilerplate::users.lastname')) }}
|
||||
{{ Form::text('last_name', old('last_name', $user->last_name), ['class' => 'form-control', 'autofocus']) }}
|
||||
{!! $errors->first('last_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group {{ $errors->has('password') ? 'has-error' : '' }}">
|
||||
{{ Form::label('password', ucfirst(__('boilerplate::auth.fields.password'))) }}
|
||||
{{ Form::password('password', ['class' => 'form-control']) }}
|
||||
{!! $errors->first('password','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group {{ $errors->has('password_confirmation') ? 'has-error' : '' }}">
|
||||
{{ Form::label('password_confirmation', ucfirst(__('boilerplate::auth.fields.password_confirm'))) }}
|
||||
{{ Form::password('password_confirmation', ['class' => 'form-control']) }}
|
||||
{!! $errors->first('password_confirmation','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
@endsection
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$('#avatar').fileinput({
|
||||
showUpload: false,
|
||||
uploadAsync: false
|
||||
});
|
||||
|
||||
$('#remove_avatar').on('click', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
bootbox.confirm("{{ __('boilerplate::users.profile.confirmdelavatar') }}", function(e){
|
||||
if(e === false) return;
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route('boilerplate.user.avatardelete') }}',
|
||||
type: 'post',
|
||||
headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}'},
|
||||
cache: false,
|
||||
success: function(res) {
|
||||
$('.avatar').attr('src', "{{ asset('/assets/vendor/boilerplate/images/default-user.png') }}");
|
||||
growl("{{ __('boilerplate::users.profile.successdelavatar') }}", "success");
|
||||
$('#remove_avatar').remove();
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user