window.location.href = $(this).attr('href') + document.location.hash;
});
- //$("#saveActions").prepend("<button id='verifyconnection' class='btn btn-primary mr-3'>Tester la connexion</button>")
- $("#saveActions").prepend("<a id='verifyconnection' class='btn btn-primary mr-3' href='verifyconnection'>Tester la connexion</a>")
-
function removeBtn() {
setTimeout(() => {
$("#message").remove()
@endpush
@include('cubist_back::when')
-@include('crud::edit')
+@php
+
+ start_measure('Render edit form');
+@endphp
+
+@extends(backpack_view('blank'))
+@include('cubist_back::form.additional_edit_views')
+
+@push('crud_fields_scripts')
+ <script>
+ jQuery(document).ready(function ($) {
+
+ // 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) {
+ event.preventDefault();
+ window.location.href = $(this).attr('href') + document.location.hash;
+ });
+
+ });
+ </script>
+@endpush
+
+@push('after_styles')
+ <link rel="stylesheet" href="{{ vendor_asset('vendor/cubist/cms-back/form.css') }}">
+@endpush
+
+@include('cubist_back::when')
+
+@php
+ $defaultBreadcrumbs = [
+ trans('backpack::crud.admin') => backpack_url('dashboard'),
+ $crud->entity_name_plural => url($crud->route),
+ trans('backpack::crud.edit') => false,
+ ];
+
+ // if breadcrumbs aren't defined in the CrudController, use the default breadcrumbs
+ $breadcrumbs = $breadcrumbs ?? $defaultBreadcrumbs;
+@endphp
+
+@section('header')
+ <section class="container-fluid">
+ <h2>
+ <span class="text-capitalize">{!! $crud->getHeading() ?? $crud->entity_name_plural !!}</span>
+ <small>{!! $crud->getSubheading() ?? trans('backpack::crud.edit').' '.$crud->entity_name !!}.</small>
+
+ @if ($crud->hasAccess('list'))
+ <small><a href="{{ url($crud->route) }}" class="d-print-none 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>
+@endsection
+
+@section('content')
+ <div class="row">
+ <div class="{{ $crud->getEditContentClass() }}">
+ {{-- Default box --}}
+
+ @include('crud::inc.grouped_errors')
+
+ <form method="post"
+ action="{{ url($crud->route.'/'.$entry->getKey()) }}"
+ @if ($crud->hasUploadFields('update', $entry->getKey()))
+ enctype="multipart/form-data"
+ @endif
+ >
+ {!! csrf_field() !!}
+ {!! method_field('PUT') !!}
+
+ @if ($crud->model->translationEnabled())
+ <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>
+ <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>
+ @endforeach
+ </ul>
+ </div>
+ </div>
+ @endif
+ {{-- load the view from the application if it exists, otherwise load the one in the package --}}
+ @if(view()->exists('vendor.backpack.crud.form_content'))
+ @include('vendor.backpack.crud.form_content', ['fields' => $crud->fields(), 'action' => 'edit'])
+ @else
+ @include('crud::form_content', ['fields' => $crud->fields(), 'action' => 'edit'])
+ @endif
+ {{-- This makes sure that all field assets are loaded. --}}
+ <div class="d-none" id="parentLoadedAssets">{{ json_encode(Assets::loaded()) }}</div>
+ @include('crud::inc.form_save_buttons')
+ </form>
+ @include('vendor.backpack.crud.list-fluidbook')
+ </div>
+ @include('cubist_back::form.shortcuts')
+ </div>
+
+ @stack('after_form')
+@endsection
+@php
+
+ stop_measure('Render edit form');
+@endphp
--- /dev/null
+@php
+ $tableClasses='stats-details sortable bg-white table table-striped table-hover nowrap rounded shadow-xs border-xs mt-2 dataTable dtr-inline';
+
+ $id = $crud->entry->id;
+
+ $fluidbooks= \App\Models\FluidbookExternalInstallServer::getListFluidbook($id);
+@endphp
+
+@if($fluidbooks)
+ <div class="mt-5">
+ <h3>Liste des fluidbooks installés sur ce serveur</h3>
+ <table class="{!! $tableClasses !!}" data-table="resume">
+ <thead>
+ <th>#</th>
+ <th>Titre</th>
+ <th>Chemin d'installation</th>
+ <th>URL finale du fluidbook</th>
+ </thead>
+ <tr>
+ @foreach($fluidbooks as $fluidbook)
+ <td>{{$fluidbook->id}}</td>
+ <td>{{$fluidbook->c_title}}</td>
+ <td>{{json_decode($fluidbook->settings, true)['install_online']['path']}}</td>
+ <td>{{$crud->entry->base_url.json_decode($fluidbook->settings, true)['install_online']['path']}}</td>
+ @endforeach
+ </tr>
+ </table>
+ </div>
+@endif