prodV1 #2

Open
RomanGolienko wants to merge 309 commits from prodV1 into main
6 changed files with 110 additions and 9 deletions
Showing only changes of commit 84061c6c95 - Show all commits

View File

@ -0,0 +1,66 @@
@extends('layouts.admin_layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class="">Изменить тип экзамена</h1>
{{ Form::open(['url' => route('examination_types.update', $examinationType), 'method' => 'PATCH', 'class' => '']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
</div>
<div class="mt-1">
{{ Form::text('name', $examinationType->name, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
</div>
<div class="mt-1">
{{ Form::text('description', $examinationType->description, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
</div>
<div class="mt-1">
{{ Form::text('slug', $examinationType->slug, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', $examinationType->position, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::submit('Изменить', ['class' => 'btn btn-primary']) }}
</div>
</div>
{{ Form::close() }}
</div>
</div>
@endauth
@endsection

View File

@ -0,0 +1,41 @@
@extends('layouts.admin_layout')
@section('content')
<div class="container">
<h2>Тип Экзамена</h2>
<br>
<a href="{{ route('examination_types.create') }}" class="btn btn-primary">Создать тип экзамена</a>
<br>
<br>
<table class="table">
<thead class="border-b-2 border-solid border-black text-left" style="text-align: left">
<tr>
<th scope="col">Позиция</th>
<th scope="col">Название</th>
<th scope="col">Описание</th>
<th scope="col">URL</th>
<th scope="col">действия</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@foreach($types as $type)
<tr class="">
<td>{{ $type->position }}</td>
<td><a href="{{ route('examination_types.show', $type) }}">{{ $type->name }}</a></td>
<td>{{ Str::words($type->description, 10, '...') }}</td>
<td>{{ $type->slug }}</td>
<td>
<a href="{{ route("examination_types.edit", $type) }}"
class="btn btn-secondary">редактировать</a>
<a rel="nofollow" data-method="delete" data-confirm="Вы действительно хотите удалить?"
href="{{ route('examination_types.destroy', $type) }}"
class="btn btn-danger">удалить</a>
</td>
</tr>
@endforeach
</tbody>
</table>
<br>
<br>
</div>
@endsection

View File

@ -10,7 +10,7 @@
<p>{{ $examinationType->slug }}</p>
<h2>Позиция</h2>
<p>{{ $examinationType->position }}</p>
<h2>Направления</h2>
<h2>Вступительные испытания</h2>
@foreach($examinationType->entranceExaminations as $entranceExamination)
<p><a href="{{ route('entrance_examinations.show', $entranceExamination) }}">{{ $entranceExamination->name }}</a></p>
@endforeach

View File

@ -1,6 +1,6 @@
<?php
namespace Tests\Feature\admin\catalog;
namespace Tests\Feature\admin\catalog\direction;
use App\Models\Department;
use App\Models\Direction;

View File

@ -1,6 +1,6 @@
<?php
namespace Tests\Feature\admin\catalog;
namespace Tests\Feature\admin\catalog\direction;
use App\Models\Department;
use App\Models\Direction;

View File

@ -2,13 +2,7 @@
namespace Tests\Feature\admin\catalog\direction;
use App\Models\Department;
use App\Models\Direction;
use App\Models\EducationalInstitution;
use App\Models\EducationForm;
use App\Models\EducationLevel;
use App\Models\ExaminationType;
use App\Models\Faculty;
use App\Models\User;
use Tests\TestCase;