first commit

This commit is contained in:
denisdulici
2017-09-14 22:21:00 +03:00
commit 515bdaf5cd
598 changed files with 48030 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
@extends('layouts.admin')
@section('title', trans('general.title.new', ['type' => trans_choice('general.users', 1)]))
@section('content')
<!-- Default box -->
<div class="box box-success">
{!! Form::open(['url' => 'auth/users', 'files' => true, 'role' => 'form']) !!}
<div class="box-body">
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
{{ Form::emailGroup('email', trans('general.email'), 'envelope') }}
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key') }}
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key') }}
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), setting('general.default_locale')) }}
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
@permission('read-companies-companies')
{{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'company_name') }}
@endpermission
@permission('read-auth-roles')
{{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }}
@endpermission
</div>
<!-- /.box-body -->
<div class="box-footer">
{{ Form::saveButtons('auth/users') }}
</div>
{!! Form::close() !!}
</div>
@endsection
@section('js')
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
@endsection
@section('css')
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
@endsection
@section('scripts')
<script type="text/javascript">
$(document).ready(function(){
$("#locale").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.languages', 1)]) }}"
});
$('#picture').fancyfile({
text : '{{ trans('general.form.select.file') }}',
style : 'btn-default',
placeholder : '{{ trans('general.form.no_file_selected') }}'
});
$('input').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
increaseArea: '20%' // optional
});
});
</script>
@endsection

View File

@@ -0,0 +1,79 @@
@extends('layouts.admin')
@section('title', trans('general.title.edit', ['type' => trans_choice('general.users', 1)]))
@section('content')
<!-- Default box -->
<div class="box box-success">
{!! Form::model($user, [
'method' => 'PATCH',
'files' => true,
'url' => ['auth/users', $user->id],
'role' => 'form'
]) !!}
<div class="box-body">
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
{{ Form::emailGroup('email', trans('general.email'), 'envelope') }}
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key', []) }}
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', []) }}
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed()) }}
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
@permission('read-companies-companies')
{{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'company_name') }}
@endpermission
@permission('read-auth-roles')
{{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }}
@endpermission
</div>
<!-- /.box-body -->
@permission('update-auth-users')
<div class="box-footer">
{{ Form::saveButtons('auth/users') }}
</div>
<!-- /.box-footer -->
@endpermission
{!! Form::close() !!}
</div>
@endsection
@section('js')
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
@endsection
@section('css')
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
@endsection
@section('scripts')
<script type="text/javascript">
$(document).ready(function(){
$("#locale").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.languages', 1)]) }}"
});
$('#picture').fancyfile({
text : '{{ trans('general.form.select.file') }}',
style : 'btn-default',
placeholder : '<?php echo $user->picture; ?>'
});
$('input').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
increaseArea: '20%' // optional
});
});
</script>
@endsection

View File

@@ -0,0 +1,70 @@
@extends('layouts.admin')
@section('title', trans_choice('general.users', 2))
@permission('create-auth-users')
@section('new_button')
<span class="new-button"><a href="{{ url('auth/users/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> &nbsp;{{ trans('general.add_new') }}</a></span>
@endsection
@endpermission
@section('content')
<!-- Default box -->
<div class="box box-success">
<div class="box-header">
{!! Form::open(['url' => 'auth/users', 'role' => 'form', 'method' => 'GET']) !!}
<div class="pull-left">
<span class="title-filter">{{ trans('general.search') }}:</span>
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
{!! Form::select('role', $roles, request('role'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('roles.all')]) !!}
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
</div>
<div class="pull-right">
<span class="title-filter">{{ trans('general.show') }}:</span>
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
</div>
{!! Form::close() !!}
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="table table-responsive">
<table class="table table-bordered table-striped table-hover" id="tbl-users">
<thead>
<tr>
<th>@sortablelink('name', trans('general.name'))</th>
<th>@sortablelink('email', trans('general.email'))</th>
<th>@sortablelink('roles', trans_choice('general.roles', 2))</th>
<th style="width: 15%;">{{ trans('general.actions') }}</th>
</tr>
</thead>
<tbody>
@foreach($users as $item)
<tr>
<td><a href="{{ url('auth/users/' . $item->id . '/edit') }}"><img src="{{ asset($item->picture) }}" class="users-image" alt="{{ $item->name }}" title="{{ $item->name }}"> {{ $item->name }}</a></td>
<td>{{ $item->email }}</td>
<td style="vertical-align: middle;">
@foreach($item->roles as $role)
<label class="label label-default">{{ $role->display_name }}</label>
@endforeach
</td>
<td>
<a href="{{ url('auth/users/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
@permission('delete-auth-users')
{!! Form::deleteButton($item, 'auth/users') !!}
@endpermission
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer">
@include('partials.admin.pagination', ['items' => $users, 'type' => 'users'])
</div>
<!-- /.box-footer -->
</div>
<!-- /.box -->
@endsection