first upload all files
This commit is contained in:
18
Modules/User/Resources/views/admin/users/create.blade.php
Normal file
18
Modules/User/Resources/views/admin/users/create.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
@extends('admin::layout')
|
||||
|
||||
@component('admin::components.page.header')
|
||||
@slot('title', trans('admin::resource.create', ['resource' => trans('user::users.user')]))
|
||||
|
||||
<li><a href="{{ route('admin.users.index') }}">{{ trans('user::users.users') }}</a></li>
|
||||
<li class="active">{{ trans('admin::resource.create', ['resource' => trans('user::users.user')]) }}</li>
|
||||
@endcomponent
|
||||
|
||||
@section('content')
|
||||
<form method="POST" action="{{ route('admin.users.store') }}" class="form-horizontal" id="user-create-form" novalidate>
|
||||
{{ csrf_field() }}
|
||||
|
||||
{!! $tabs->render(compact('user')) !!}
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@include('user::admin.users.partials.shortcuts')
|
||||
20
Modules/User/Resources/views/admin/users/edit.blade.php
Normal file
20
Modules/User/Resources/views/admin/users/edit.blade.php
Normal file
@@ -0,0 +1,20 @@
|
||||
@extends('admin::layout')
|
||||
|
||||
@component('admin::components.page.header')
|
||||
@slot('title', trans('admin::resource.edit', ['resource' => trans('user::users.user')]))
|
||||
@slot('subtitle', $user->full_name)
|
||||
|
||||
<li><a href="{{ route('admin.users.index') }}">{{ trans('user::users.users') }}</a></li>
|
||||
<li class="active">{{ trans('admin::resource.edit', ['resource' => trans('user::users.user')]) }}</li>
|
||||
@endcomponent
|
||||
|
||||
@section('content')
|
||||
<form method="POST" action="{{ route('admin.users.update', $user) }}" class="form-horizontal" id="user-edit-form" novalidate>
|
||||
{{ csrf_field() }}
|
||||
{{ method_field('put') }}
|
||||
|
||||
{!! $tabs->render(compact('user')) !!}
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@include('user::admin.users.partials.shortcuts')
|
||||
42
Modules/User/Resources/views/admin/users/index.blade.php
Normal file
42
Modules/User/Resources/views/admin/users/index.blade.php
Normal file
@@ -0,0 +1,42 @@
|
||||
@extends('admin::layout')
|
||||
|
||||
@component('admin::components.page.header')
|
||||
@slot('title', trans('user::users.users'))
|
||||
|
||||
<li class="active">{{ trans('user::users.users') }}</li>
|
||||
@endcomponent
|
||||
|
||||
@component('admin::components.page.index_table')
|
||||
@slot('buttons', ['create'])
|
||||
@slot('resource', 'users')
|
||||
@slot('name', trans('user::users.user'))
|
||||
|
||||
@slot('thead')
|
||||
<tr>
|
||||
@include('admin::partials.table.select_all')
|
||||
|
||||
<th>{{ trans('admin::admin.table.id') }}</th>
|
||||
<th>{{ trans('user::users.table.first_name') }}</th>
|
||||
<th>{{ trans('user::users.table.last_name') }}</th>
|
||||
<th>{{ trans('user::users.table.email') }}</th>
|
||||
<th>{{ trans('user::users.table.last_login') }}</th>
|
||||
<th data-sort>{{ trans('admin::admin.table.created') }}</th>
|
||||
</tr>
|
||||
@endslot
|
||||
@endcomponent
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
new DataTable('#users-table .table', {
|
||||
columns: [
|
||||
{ data: 'checkbox', orderable: false, searchable: false, width: '3%' },
|
||||
{ data: 'id', width: '5%' },
|
||||
{ data: 'first_name', name: 'first_name' },
|
||||
{ data: 'last_name', name: 'last_name' },
|
||||
{ data: 'email', name: 'email' },
|
||||
{ data: 'last_login', name: 'last_login', searchable: false },
|
||||
{ data: 'created', name: 'created_at' },
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,14 @@
|
||||
@push('shortcuts')
|
||||
<dl class="dl-horizontal">
|
||||
<dt><code>b</code></dt>
|
||||
<dd>{{ trans('user::users.navigation.back to index') }}</dd>
|
||||
</dl>
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
keypressAction([
|
||||
{ key: 'b', route: "{{ route('admin.users.index') }}" },
|
||||
]);
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,18 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('first_name', trans('user::attributes.users.first_name'), $errors, $user, ['required' => true]) }}
|
||||
{{ Form::text('last_name', trans('user::attributes.users.last_name'), $errors, $user, ['required' => true]) }}
|
||||
{{ Form::email('email', trans('user::attributes.users.email'), $errors, $user, ['required' => true]) }}
|
||||
{{ Form::text('phone', trans('user::attributes.users.phone'), $errors, $user, ['required' => true]) }}
|
||||
{{ Form::select('roles', trans('user::attributes.users.roles'), $errors, $roles, $user, ['multiple' => true, 'required' => true, 'class' => 'selectize prevent-creation']) }}
|
||||
|
||||
@if (request()->routeIs('admin.users.create'))
|
||||
{{ Form::password('password', trans('user::attributes.users.password'), $errors, null, ['required' => true]) }}
|
||||
{{ Form::password('password_confirmation', trans('user::attributes.users.password_confirmation'), $errors, null, ['required' => true]) }}
|
||||
@endif
|
||||
|
||||
@if (request()->routeIs('admin.users.edit'))
|
||||
{{ Form::checkbox('activated', trans('user::attributes.users.activated'), trans('user::users.form.activated'), $errors, $user, ['disabled' => $user->id === $currentUser->id, 'checked' => old('activated', $user->isActivated())]) }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{{ Form::password('password', trans('user::attributes.users.new_password'), $errors) }}
|
||||
{{ Form::password('password_confirmation', trans('user::attributes.users.confirm_new_password'), $errors) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<h4>{{ trans('user::users.or_reset_password') }}</h4>
|
||||
|
||||
<a href="{{ route('admin.users.reset_password', $user) }}" class="btn btn-primary btn-reset-password" data-loading>
|
||||
{{ trans('user::users.send_reset_password_email') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user