@php $edit = !is_null($dataTypeContent->getKey()); $add = is_null($dataTypeContent->getKey()); // Init Tabs Subsystem $dataTypeRows = $dataType->{(isset($dataTypeContent->id) ? 'editRows' : 'addRows' )}; $tabs[] = __('voyager-extension::bread.tab_main_title'); foreach($dataTypeRows as $row) { if(isset($row->details->tab_title) && !in_array($row->details->tab_title, $tabs)) { $tabs[] = $row->details->tab_title; } } @endphp @extends('voyager::master') @section('css') @stop @section('page_title', __('voyager::generic.'.($edit ? 'edit' : 'add')).' '.$dataType->getTranslatedAttribute('display_name_singular')) @section('page_header')

{{ __('voyager::generic.'.($edit ? 'edit' : 'add')).' '.$dataType->getTranslatedAttribute('display_name_singular') }}

@include('voyager::multilingual.language-selector') @stop @section('content')
@if($edit) {{ method_field("PUT") }} @endif {{ csrf_field() }}
@if (count($errors) > 0)
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @php $dataTypeRows = $dataType->{($edit ? 'editRows' : 'addRows' )}; @endphp @if(count($tabs) > 1) @endif @if(count($tabs) > 1)
@endif @foreach($dataTypeRows as $row) @if(count($tabs) > 1 && $loop->first)
@php $cur_tab = $tabs[0] @endphp @elseif(count($tabs) > 1 && isset($row->details->tab_title) && $row->details->tab_title !== $cur_tab)
@php $cur_tab = $row->details->tab_title @endphp @endif @php $display_options = $row->details->display ?? NULL; if ($dataTypeContent->{$row->field.'_'.($edit ? 'edit' : 'add')}) { $dataTypeContent->{$row->field} = $dataTypeContent->{$row->field.'_'.($edit ? 'edit' : 'add')}; } @endphp @if (isset($row->details->section))

{{ $row->details->section }}

@endif @if (isset($row->details->legend) && isset($row->details->legend->text)) {{ $row->details->legend->text }} @endif @if(count($tabs) > 1 && $loop->last)
@endif @endforeach @if(count($tabs) > 1)
@endif
@if(!config('voyager-extension.sticky_action_panel.enabled')) @else
@section('submit-buttons') @stop @yield('submit-buttons') @if ($edit) @endif
@endif
{{ csrf_field() }}
@stop @section('javascript') @stop