diff --git a/resources/views/admin/documents/create.blade.php b/resources/views/admin/documents/create.blade.php index 653f31e..3728c7f 100644 --- a/resources/views/admin/documents/create.blade.php +++ b/resources/views/admin/documents/create.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.admin-layout') +@extends('layouts.admin_layout') @section('content') @auth()
@@ -27,6 +27,17 @@ {{ $errors->first('name') }} @endif
+
+ {{ Form::label('description', 'Описание') }} +
+
+ {{ Form::text('description', '', ['class' => 'form-control']) }} +
+
+ @if ($errors->any()) + {{ $errors->first('description') }} + @endif +
{{ Form::label('position', 'Позиция') }}
@@ -39,14 +50,14 @@ @endif
- {{ Form::label('idReceptionScreen', 'Пункт экрана приема') }} + {{ Form::label('admission_id', 'Пункт экрана приема') }}
- {{ Form::select('idReceptionScreen', $receptionScreens, null, ['class' => 'form-select']) }} + {{ Form::select('admission_id', $admissions, null, ['class' => 'form-select']) }}
@if ($errors->any()) - {{ $errors->first('idReceptionScreen') }} + {{ $errors->first('admission_id') }} @endif
@@ -54,26 +65,6 @@
{{Form::close()}} -{{-- @if($idReceptionScreen !== null)--}} -{{--
--}} -{{--

Файлы пункта Экрана Приема: {{ $receptionScreens[$idReceptionScreen] }}

--}} -{{-- --}} -{{-- --}} -{{-- --}} -{{-- --}} -{{-- --}} -{{-- --}} -{{-- --}} -{{-- --}} -{{-- @foreach($files as $file)--}} -{{-- --}} -{{-- --}} -{{-- --}} -{{-- @endforeach--}} -{{-- --}} -{{--
ПозицияНазвание
{{ $file->position }}{{ $file->name }}
--}} -{{--
--}} -{{-- @endif--}} @endauth @endsection diff --git a/resources/views/admin/users/create.blade.php b/resources/views/admin/users/create.blade.php new file mode 100644 index 0000000..8273079 --- /dev/null +++ b/resources/views/admin/users/create.blade.php @@ -0,0 +1,54 @@ +@extends('layouts.admin_layout') +@section('content') + @auth() + @can('create', Auth::user()) +
+

Создать администратора

+ + {{ Form::open(['url' => route('users.store'), 'method' => 'POST', 'class' => '']) }} +
+
+ {{ Form::label('name', 'Логин') }} +
+
+ {{ Form::text('name', '', ['class' => 'form-control']) }} +
+
+ @if ($errors->any()) + {{ $errors->first('name') }} + @endif +
+ +
+ {{ Form::label('email', 'электронная почта') }} +
+
+ {{ Form::text('email', '', ['class' => 'form-control']) }} +
+
+ @if ($errors->any()) + {{ $errors->first('email') }} + @endif +
+ +
+ {{ Form::label('password', 'Пароль') }} +
+
+ {{ Form::text('password', '', ['class' => 'form-control']) }} +
+
+ @if ($errors->any()) + {{ $errors->first('password') }} + @endif +
+ +
+ {{ Form::submit('создать', ['class' => 'btn btn-primary']) }} +
+
+ {{ Form::close() }} +
+ @endcan + @endauth +@endsection diff --git a/resources/views/admin/users/edit.blade.php b/resources/views/admin/users/edit.blade.php new file mode 100644 index 0000000..c62db92 --- /dev/null +++ b/resources/views/admin/users/edit.blade.php @@ -0,0 +1,55 @@ +@extends('layouts.admin_layout') +@section('content') + @auth() + @can('update', Auth::user()) +
+

Изменить Администратора

+
+
+ {{ Form::open(['url' => route('users.update', $user), 'method' => 'PATCH', 'class' => '']) }} +
+
+ {{ Form::label('name', 'Логин') }} +
+
+ {{ Form::text('name', $user->name, ['class' => 'form-control']) }} +
+
+ @if ($errors->any()) + {{ $errors->first('name') }} + @endif +
+ +
+ {{ Form::label('email', 'электронная почта') }} +
+
+ {{ Form::text('email', $user->email, ['class' => 'form-control']) }} +
+
+ @if ($errors->any()) + {{ $errors->first('email') }} + @endif +
+ +
+ {{ Form::label('password', 'Пароль') }} +
+
+ {{ Form::text('password', '', ['class' => 'form-control']) }} +
+
+ @if ($errors->any()) + {{ $errors->first('password') }} + @endif +
+ +
+ {{ Form::submit('изменить', ['class' => 'btn btn-primary']) }} +
+
+ {{ Form::close() }} +
+ @endcan + @endauth +@endsection diff --git a/resources/views/admin/users/index.blade.php b/resources/views/admin/users/index.blade.php new file mode 100644 index 0000000..dd1e8df --- /dev/null +++ b/resources/views/admin/users/index.blade.php @@ -0,0 +1,41 @@ +@extends('layouts.admin_layout') +@section('content') + @auth() + @can('viewAny', Auth::user()) +
+

список Администраторов

+
+ Создать администратора +
+
+ + + + + + + + + + + @foreach($users as $user) + + + + + + + @endforeach + +
idnameemailдействия
{{ $user->id }}{{ $user->name }}{{ $user->email }}редактировать + + удалить + +
+
+
+
+ @endcan + @endauth +@endsection diff --git a/resources/views/layouts/admin_layout.blade.php b/resources/views/layouts/admin_layout.blade.php index d784213..767677f 100644 --- a/resources/views/layouts/admin_layout.blade.php +++ b/resources/views/layouts/admin_layout.blade.php @@ -45,10 +45,10 @@