59 lines
2.5 KiB
PHP
59 lines
2.5 KiB
PHP
@extends('layouts.backend')
|
|
|
|
@section('title', sprintf('%s - Voir', Str::plural(class_basename($modelClass))))
|
|
@section('description', sprintf('Voir un %s', class_basename($modelClass)))
|
|
@section('metaIndex', 'noindex,nofollow')
|
|
|
|
@section('content')
|
|
<div class="card">
|
|
@include('modules.flashMessage')
|
|
<div class="card-header">
|
|
<a href="{{route("bo.$modelTable.index")}}">{{ Str::plural(class_basename($modelClass)) }}</a> - {{ __('Voir') }}</a>
|
|
<div class="btn-group float-end" role="group" aria-label="{{ __('Actions') }}">
|
|
<a href="{{route("bo.$modelTable.export", $model)}}" class="btn btn-success ">{{ __('Exporter') }}</a>
|
|
<a href="{{route("bo.$modelTable.edit", $model)}}" class="btn btn-info ">{{ __('Modifier') }}</a>
|
|
<a href="{{route("bo.$modelTable.destroy", $model)}}" class="btn btn-danger">{{ __('Supprimer') }}</a>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<table class="table table-sm table-bordered border-primary align-top table-striped text-center">
|
|
<thead class="thead-dark">
|
|
<tr>
|
|
<th scope="col" class="w-25">{{ __('Propriété') }}</th>
|
|
<th scope="col" class="w-75">{{ __('Valeur') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($modelClass::getEditableProperties() as $fieldName => $prop)
|
|
@if(in_array(CrudAction::view(), $prop['actions']))
|
|
@switch($prop['type'])
|
|
@case(CrudType::password())
|
|
{{-- Ignore --}}
|
|
@break
|
|
@default
|
|
<tr>
|
|
<td>{{ $prop['label'] }}</td>
|
|
<td>@include('crud.printfield', [
|
|
'action' => CrudAction::view(),
|
|
'field' => $model->{$fieldName},
|
|
'props' => $prop
|
|
])</td>
|
|
</tr>
|
|
@endswitch
|
|
@endif
|
|
@endforeach
|
|
<tr>
|
|
<td>{{__('Réponses') }}</td>
|
|
<td>
|
|
<ul class="list-unstyled">
|
|
@foreach($model->reponseSondages as $reponse)
|
|
<li>{{ $reponse->value }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endsection
|