namespace App\Http\Controllers\Admin\Operations\FluidbookPublication;
+use App\Models\FluidbookPublication;
use Illuminate\Support\Facades\Route;
trait EditOperation
public function links($id)
{
- return 'Link editor of ' . $id;
+ return view('fluidbook_publication.link_editor', ['id' => $id, 'fluidbook' => FluidbookPublication::find($id)]);
}
}
--- /dev/null
+body, #linkeditor, html {
+ height: 100%;
+ width: 100%;
+ overflow: hidden;
+}
+
+#linkeditor {
+ white-space: nowrap;
+ font-size: 0;
+
+ aside, #linkeditor-main {
+ display: inline-block;
+ height: 100%;
+ vertical-align: top;
+ text-align: left;
+ }
+
+ aside {
+ width: 51px;
+ background-color: #EBECEE;
+ }
+
+ #linkeditor-main {
+ width: ~"calc(100% - 102px)";
+
+ #linkeditor-toolbar {
+ background-color: #dbdddf;
+ color: #5d5d5d;
+ height: 51px;
+ }
+
+ #linkeditor-editor {
+ height: ~"calc( 100% - 51px)";
+ width: 100%;
+
+ #linkeditor-fluidbook {
+ background-color: #505050;
+ position: relative;
+ top: 16px;
+ left: 16px;
+ height: ~"calc( 100% - 16px)";
+ width: ~"calc( 100% - 16px)";
+ }
+ }
+ }
+}
--- /dev/null
+@php
+ $title='#'.$id.' - '.__('Editeur de liens');
+@endphp
+@extends('layouts.empty')
+
+@section('content')
+ <div id="linkeditor">
+ <aside id="linkeditor-left"></aside>
+ <div id="linkeditor-main">
+ <div id="linkeditor-toolbar"></div>
+ <div id="linkeditor-editor">
+ <div id="linkeditor-rulers"></div>
+ <div id="linkeditor-fluidbook"></div>
+ </div>
+ </div>
+ <aside id="linkeditor-right"></aside>
+ </div>
+@endsection
+@push('after_scripts')
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/5.2.4/fabric.min.js"
+ integrity="sha512-HkRNCiaZYxQAkHpLFYI90ObSzL0vaIXL8Xe3bM51vhdYI79RDFMLTAsmVH1xVPREmTlUWexgrQMk+c3RBTsLGw=="
+ crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+ <script
+ src="{{backpack_url("packages/fluidbook/toolbox/js/linkeditor.js").'?v='.filemtime(public_path('packages/fluidbook/toolbox/js/linkeditor.js'))}}"></script>
+@endpush
+@push('after_styles')
+ <link rel="stylesheet"
+ href="{{backpack_url("packages/fluidbook/toolbox/css/linkeditor.css").'?v='.filemtime(public_path('packages/fluidbook/toolbox/css/linkeditor.css'))}}"/>
+@endpush
--- /dev/null
+<!DOCTYPE html>
+<html lang="{{ app()->getLocale() }}" dir="{{ config('backpack.base.html_direction') }}">
+<head>
+ @include(backpack_view('inc.head'))
+</head>
+<body class="app flex-row align-items-center">
+
+@yield('header')
+
+@yield('content')
+
+
+@yield('before_scripts')
+@stack('before_scripts')
+
+@include(backpack_view('inc.scripts'))
+
+@yield('after_scripts')
+@stack('after_scripts')
+
+</body>
+</html>