CourseWork/resources/views/subject-teacher/show.blade.php
2024-06-16 00:41:31 +04:00

53 lines
2.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.application')
@section('content')
<div class="container col-md-6">
<div class="row justify-content-center">
<div class="card mt-4">
<div class="card-header">
{{ $subject->name }}
</div>
<div class="card-body">
@if(count($grades))
<table class="table table-striped">
<thead>
<th>Название</th>
<th>&nbsp;</th>
</thead>
<tbody>
@foreach ($grades as $grade)
<tr>
<td class="table-text">
<div>
{{ $grade->name }}
</div>
</td>
<td>
<div>
<a href="{{ route('teachers.subjects.grades.edit', [$teacher, $subject, $grade]) }}" class="btn btn-warning">Редактировать</a>
</div>
</td>
<td>
<form action="{{ route('teachers.subjects.grades.destroy', [$teacher, $subject, $grade]) }}" 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>
<div class="card-footer">
<a href="{{ route('teachers.subjects.grades.create', [$teacher, $subject]) }}" class="btn btn-success">Добавить</a>
</div>
</div>
</div>
</div>
@endsection