]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6066 @0:10
authorsoufiane <soufiane@cubedesigners.com>
Thu, 6 Jul 2023 09:39:47 +0000 (11:39 +0200)
committersoufiane <soufiane@cubedesigners.com>
Thu, 6 Jul 2023 09:39:47 +0000 (11:39 +0200)
resources/views/fluidbook_publication/delivery.blade.php

index e1df60003f645a276da2eeeefa0139cda514c50f..3789687b222c7da2122b20da7ba8619901d1c8ed 100644 (file)
 
     $installServerUrl = null;
     if($fluidbook->install_online) {
-        $serverId = intval($fluidbook->install_online['server']);
-        $serverPath = $fluidbook->install_online['path'];
-        $servers=\App\Models\FluidbookExternalInstallServer::getAllServers();
-        $serverInfos = $servers[$serverId];
-        $baseUrl = $serverInfos['base_url'];
-        $serverName = $serverInfos['name'];
-        $installServerUrl = $baseUrl.$serverPath;
+        if($fluidbook->install_online['server']) {
+            $serverId = intval($fluidbook->install_online['server']);
+            $serverPath = $fluidbook->install_online['path'];
+            $servers=\App\Models\FluidbookExternalInstallServer::getAllServers();
+            $serverInfos = $servers[$serverId];
+            $baseUrl = $serverInfos['base_url'];
+            $serverName = $serverInfos['name'];
+            $installServerUrl = $baseUrl.$serverPath;
+        }
     }
 
     $downloadVersions = $fluidbook->getDownloadVersions();
                             </div>
                         </div>-->
                         <div class="delivery-preview-mini">
-                            <div class="col-sm-12">
-                                <p class="fw-semibold">{{ __('Mini Fluidbook animé') }}</p>
-                            </div>
+                            <p class="fw-semibold">{{ __('Mini Fluidbook animé') }}</p>
                             <div class="container-iframe">
-                                <iframe width="677" height="401" frameborder="0" marginheight="0" marginwidth="0" allowfullscreen="true" src="{{$installServerUrl}}/index.html?widget=1&action=fullscreen&background=ffffff&nav=auto"></iframe>
+                                <iframe width="677" height="401" frameborder="0" marginheight="0" marginwidth="0" allowfullscreen="true" src="{{$fluidbook->getPreviewUrl()}}/?widget=1&action=fullscreen&nav=auto"></iframe>
                             </div>
                             <div class="mt-2">
                                 <a href="{{ $noticesUrls[$lang]['widget'] }}" target="_blank" rel="noopener">{{ __('Voir la notice') }}</a>
                         </div>
                     </div>
                 </div>
+                @endif
                 <div id="s_stats" class="card">
                     <div class="card-body">
                         <div class="">
                         </div>
                     </div>
                 </div>
-                @endif
+
 
                 <div class="card bg-dark">
                     <div class="card-body">