applicant-site/resources/views/admin-reception-screen/index.blade.php

145 lines
5.3 KiB
PHP
Raw Normal View History

2024-01-19 19:15:45 +03:00
@extends('layouts.admin-layout')
@section('content')
2024-02-01 14:22:47 +03:00
<style>
.accordion-button:not(.collapsed)
{
color:#006147;
background-color: rgb(255, 255, 255);
box-shadow:inset 0 -1px 0 rgba(0,0,0,.125)
}
.accordion-button:focus {
z-index: 3;
border-color: #006147;
outline: 0;
box-shadow: 0 0 0 0.25rem #006147;
}
</style>
2024-01-24 15:41:20 +03:00
<div class="container">
<h2>Экран Приема</h2>
<br>
<a href="{{ route('admin-reception-screen.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>
2024-01-24 15:41:20 +03:00
<th scope="col">Позиция</th>
<th scope="col">Название</th>
<th scope="col">действия</th>
<th scope="col"></th>
2024-01-24 15:41:20 +03:00
</tr>
</thead>
<tbody class="accordion" id="accordionExample">
@foreach($receptionScreens as $receptionScreen)
<?php $accordion_tmp = str_replace(' ','', $receptionScreen->name) ?>
2024-02-01 14:22:47 +03:00
<tr class="accordion-item ">
<th scope="row">{{ $receptionScreen->position }}</th>
<td>{{ $receptionScreen->name }}</td>
<td><a href="{{ route("admin-reception-screen.edit", $receptionScreen) }}" class="btn btn-secondary">редактировать</a>
2024-01-24 15:41:20 +03:00
<a rel="nofollow" data-method="delete" data-confirm="Вы действительно хотите удалить?"
href="{{ route('admin-reception-screen.destroy', $receptionScreen) }}" class="btn btn-danger">
2024-01-24 15:41:20 +03:00
удалить
</a>
</td>
<th class="accordion-header" id="heading<?php echo $accordion_tmp ?>">
2024-02-01 14:22:47 +03:00
<button class="accordion-button collapsed btn btn-secondary" type="button" data-bs-toggle="collapse" data-bs-target="#collapse<?php echo $accordion_tmp ?> " aria-expanded="false" aria-controls="collapse<?php echo $accordion_tmp ?>">
Показать
</button>
</th>
@if(count($receptionScreen->files) !== 0)
2024-01-24 15:41:20 +03:00
</tr>
<tr>
<td colspan="3">
<table class="table table-bordered accordion-collapse collapse" id="collapse<?php echo $accordion_tmp ?>" aria-labelledby="heading<?php echo $accordion_tmp ?>" data-bs-parent="#accordionExample">
<thead class="accordion-body">
2024-01-24 15:41:20 +03:00
<tr>
<th scope="col">Позиция</th>
<th scope="col">Имя Файла</th>
<th scope="col">действия</th>
2024-02-01 14:22:47 +03:00
2024-01-24 15:41:20 +03:00
</tr>
</thead>
<tbody>
2024-01-23 17:58:48 +03:00
@foreach($receptionScreen->files->sortBy('position') as $file)
2024-01-24 15:41:20 +03:00
<tr>
<th scope="row">{{ $file->position }}</th>
<td>{{ $file->name }}</td>
2024-01-26 11:15:11 +03:00
<td><a href="{{ route("files.edit", $file) }}"
2024-01-24 15:41:20 +03:00
class="btn btn-secondary">редактировать</a>
<a rel="nofollow" data-method="delete"
data-confirm="Вы действительно хотите удалить?"
2024-01-26 11:15:11 +03:00
href="{{ route('files.destroy', $file) }}"
2024-01-24 15:41:20 +03:00
class="btn btn-danger">
удалить
</a>
</td>
</tr>
2024-02-01 14:22:47 +03:00
2024-01-24 15:41:20 +03:00
@endforeach
2024-02-01 14:22:47 +03:00
<tr class=" border border-white border-bottom-0 border-start-0 border-end-0">
<td colspan="3"><div class="mb-2">
2024-02-08 15:59:44 +03:00
<a href="{{ route('files_create', $receptionScreen->id) }}"
2024-02-01 14:22:47 +03:00
class="btn btn-primary">
Добавить файл
</a>
</div></td>
</tr>
2024-01-24 15:41:20 +03:00
</tbody>
2024-01-24 15:41:20 +03:00
</table>
2024-02-01 14:22:47 +03:00
2024-01-24 15:41:20 +03:00
</td>
</tr>
@else
<tr>
<td colspan="3">
2024-01-26 11:15:11 +03:00
@php($idReceptionScreen = $receptionScreen->id)
2024-02-08 15:59:44 +03:00
<a href="{{ route('files_create', $idReceptionScreen) }}" class="btn btn-primary">Добавить
2024-01-24 15:41:20 +03:00
файл</a>
</td>
</tr>
@endif
@endforeach
</tbody>
</table>
<br>
<br>
</div>
2024-01-19 19:15:45 +03:00
@endsection