*/
protected $fakeColumns = [];
+ protected $additionalEditViews=[];
+
/**
* @var array
}
+ /**
+ * @return array
+ */
+ public function getAdditionalEditViews(): array
+ {
+ return $this->additionalEditViews;
+ }
+
+ public function addAdditionalEditView($view){
+ $this->additionalEditViews[]=$view;
+ }
+
public function preCache()
{
foreach ($this->getFields() as $field) {
@extends(backpack_view('blank'))
+@include('cubist_back::form.additional_edit_views')
@push('crud_fields_scripts')
<script>
// When clicking on a locale link in the dropdown menu, it doesn't preserve
// the current tab because this is stored in the hash and managed by JS.
// To overcome this, we catch the locale links and append the hash to them...
- $(document).on('click', '.dropdown-menu a[href*="?locale="]', function(event) {
+ $(document).on('click', '.dropdown-menu a[href*="?locale="]', function (event) {
event.preventDefault();
window.location.href = $(this).attr('href') + document.location.hash;
});
</script>
@endpush
+
@include('cubist_back::when')
<small>{!! $crud->getSubheading() ?? trans('backpack::crud.edit').' '.$crud->entity_name !!}.</small>
@if ($crud->hasAccess('list'))
- <small><a href="{{ url($crud->route) }}" class="hidden-print font-sm"><i class="la la-angle-double-{{ config('backpack.base.html_direction') == 'rtl' ? 'right' : 'left' }}"></i> {{ trans('backpack::crud.back_to_all') }} <span>{{ $crud->entity_name_plural }}</span></a></small>
+ <small><a href="{{ url($crud->route) }}" class="hidden-print font-sm"><i
+ class="la la-angle-double-{{ config('backpack.base.html_direction') == 'rtl' ? 'right' : 'left' }}"></i> {{ trans('backpack::crud.back_to_all') }}
+ <span>{{ $crud->entity_name_plural }}</span></a></small>
@endif
</h2>
</section>
<div class="mb-2 text-right">
<!-- Single button -->
<div class="btn-group">
- <button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- {{trans('backpack::crud.language')}}: {{ $crud->model->getAvailableLocales()[request()->input('locale')?request()->input('locale'):App::getLocale()] }} <span class="caret"></span>
+ <button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-toggle="dropdown"
+ aria-haspopup="true" aria-expanded="false">
+ {{trans('backpack::crud.language')}}
+ : {{ $crud->model->getAvailableLocales()[request()->input('locale')?request()->input('locale'):App::getLocale()] }}
+ <span class="caret"></span>
</button>
<ul class="dropdown-menu">
@foreach ($crud->model->getAvailableLocales() as $key => $locale)
- <a class="dropdown-item" href="{{ url($crud->route.'/'.$entry->getKey().'/edit') }}?locale={{ $key }}">{{ $locale }}</a>
+ <a class="dropdown-item"
+ href="{{ url($crud->route.'/'.$entry->getKey().'/edit') }}?locale={{ $key }}">{{ $locale }}</a>
@endforeach
</ul>
</div>
@section('form_shortcut_m')
@stack('form_shortcuts')
@endsection
+<div class="col-md-4">
+ <div id="form_sidebar">
+ @hasSection('form_shortcut_m')
+ <style type="text/css">
+ #form_sidebar {
+ position: sticky;
+ top: 30px;
+ }
-@hasSection('form_shortcut_m')
- <style type="text/css">
- #form_shortcuts {
- position: sticky;
- top: 30px;
- }
+ #form_shortcuts .card {
+ padding: 30px;
+ }
- #form_shortcuts .card {
- padding: 30px;
- }
+ #form_shortcuts a {
+ display: block;
+ font-size: 120%;
+ font-weight: 500;
+ }
+ </style>
- #form_shortcuts a {
- display: block;
- font-size: 120%;
- font-weight: 500;
- }
- </style>
- <div class="col-md-4">
<aside id="form_shortcuts">
<div class="card">
<nav>
</nav>
</div>
</aside>
+
+ @endif
+
+ @hasSection('form_below_shortcuts')
+ @yield('form_below_shortcuts')
+ @endif
</div>
-@endif
+</div>