pipicar/resources/views/components/show.blade.php

87 lines
3.8 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
/*
* Copyright (c) 2022.
* Aidyn Sapargaliyev
* Nur-Sultan (Astana), Kazakhstan
* ТОО Дизайн лаборатория А7
* https://a7.kz
*/
/**
* @var \A7kz\Platform\Modules\Platform\Core\Services\Application\CrudApplication $app
*/
?>
@if($app->withHeader())
<x-component name="Tabs" :module="$module"/>
@endif
{!! $app->show_message() !!}
<x-component name="Js.Before" :params="['app'=>$app, 'form'=>$form]" :module="$module"/>
<div class="@if($form->hasContainer()){{$form->container()}}@endif">
<form method="post"
action="{{$app->getPath()}}/{{$form->action()}}@if($app->data->hasPkValue())?pk={{$app->data->getPkValue()}}@endif"
onsubmit="return submit_prepare(event)">
<div class="global-actions">
<div class="left-content">
<h5 class="global-title">{{$form->title()}}</h5>
</div>
<div class="right-content">
@if(count($form->submits()))
<x-component name="Form.Submits" :params="['app'=>$app, 'form'=>$form]"
:module="$module"/>
@endif
</div>
</div>
<hr class="global-line">
<div class="card">
<div class="card-body">
@if(!isset($form->getConfig()->form->hide_prev_next_pk))
<div class="row">
<div class="col text-center">
<?php $next = $app->data->getNextPkValue(); $prev = $app->data->getPrevPkValue(); ?>
@if($prev) <a class="btn btn-outline" href="{{$app->getPath()}}/{{$form->action()}}?pk={{$prev}}"><i class="bi bi-caret-left-fill">123</i></a> @endif
@if($next) <a class="btn btn-primary" href="{{$app->getPath()}}/{{$form->action()}}?pk={{$next}}"><i class="bi bi-caret-right-fill"></i></a> @endif
</div>
</div>
@endif
<div class="row">
<div class="@if($app->isProcess()) col-md-8 col-xs-12 @else col @endif">
@if($app->data->isAutoincrement() && $app->data->getPkValue())
<input type="hidden" name="{{$app->data->getPk()}}" value="{{$app->data->getPkValue()}}">
@endif
<x-component name="Form.Row" :params="['rows'=>$form->rows(),'app'=>$app, 'form'=>$form]"
:module="$module"/>
@if(count($form->tabs()))
<x-component name="Form.Tab" :params="['app'=>$app, 'form'=>$form]"
:module="$module"/>
@endif
@if($app->hasComments())
{!! $app->comment->getComments() !!}
@endif
</div>
@if($app->isProcess())
<div class="col-md-4 col-xs-12">
{!! $app->documentState->form(); !!}
</div>
@endif
</div>
</div>
</div>
{{ csrf_field() }}
</form>
</div>
<x-component name="Additional.Modal" :module="$module"/>
<x-component name="Js.After" :params="['app'=>$app]" :module="$module" />
<x-component name="Additional.ImportAction" :params="['app'=>$app]" :module="$module"/>
@foreach($form->getInjectComponent() as $inject_component)
<x-component :name="$inject_component" :module="$module" :params="['app'=>$app]"/>
@endforeach
@if(!empty($form->getOnRenderEmitFunctions()))
<x-component name="Js.OnRenderEmitFunctions" :module="$module"
:params="['app' => $app, 'emitFunctions' => $form->getOnRenderEmitFunctions()]"
/>
@endif