2024-04-23 14:52:49 +04:00
|
|
|
|
@extends('layouts.app')
|
|
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
<div class="container col-md-6">
|
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
|
<div class="card">
|
2024-05-06 17:47:25 +04:00
|
|
|
|
<div class="card-header">
|
|
|
|
|
{{ ('Учитель') }}
|
|
|
|
|
</div>
|
2024-04-23 14:52:49 +04:00
|
|
|
|
<div class="card-body">
|
|
|
|
|
<div class="mb-3">
|
2024-04-27 15:10:21 +04:00
|
|
|
|
<h5><strong>ФИО: </strong>{{ $teacher->fio }}</h5>
|
2024-04-23 14:52:49 +04:00
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-3">
|
2024-04-27 15:10:21 +04:00
|
|
|
|
<h5><strong>Дата рождения: </strong>{{ $teacher->birthday }}</h5>
|
2024-04-23 14:52:49 +04:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-footer">
|
2024-04-27 15:10:21 +04:00
|
|
|
|
<a href="{{ route('teachers.edit', $teacher) }}" class="btn btn-primary">Редактировать</a>
|
2024-04-23 14:52:49 +04:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-05-06 17:47:25 +04:00
|
|
|
|
<div class="card mt-4">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
{{__('Предметы учителя')}}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
@if(count($subjects))
|
|
|
|
|
<table class="table table-striped">
|
|
|
|
|
<thead>
|
|
|
|
|
<th>Название</th>
|
|
|
|
|
<th> </th>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@foreach ($subjects as $subject)
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="table-text">
|
|
|
|
|
<div>
|
2024-05-07 15:05:10 +04:00
|
|
|
|
<a href="{{ route('teachers.subjects.show', [$teacher, $subject]) }}" class="btn btn-block col-8">{{ $subject->name }}</a>
|
2024-05-06 17:47:25 +04:00
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<div>
|
|
|
|
|
<a href="{{ route('teachers.subjects.edit', [$teacher, $subject]) }}" class="btn btn-warning">Редактировать</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<form action="{{ route('teachers.subjects.destroy', [$teacher, $subject]) }}" method="POST" style="display: inline-block;">
|
|
|
|
|
@csrf
|
|
|
|
|
@method('DELETE')
|
|
|
|
|
<button type="submit" class="btn btn-danger">Удалить</button>
|
|
|
|
|
</form>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
@endforeach
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
@else
|
|
|
|
|
<p>У учителя отсутствуют предметы</p>
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
2024-05-07 12:14:18 +04:00
|
|
|
|
<div class="card-footer">
|
2024-05-06 17:47:25 +04:00
|
|
|
|
<a href="{{ route('teachers.subjects.create', $teacher) }}" class="btn btn-success">Добавить</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-04-23 14:52:49 +04:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@endsection
|
|
|
|
|
|