[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
|
||||
Reference in New Issue
Block a user