From 838348b0dd8e0d45600aa7527a4ba9e49fa2177c Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 17 Jul 2023 15:28:40 +0200 Subject: [PATCH] done #6066 @3 --- .../DownloadOperation.php | 2 +- .../delivery/contact_manager.blade.php | 7 + .../index.blade.php} | 169 +++++++++--------- .../delivery/mainsettings.blade.php | 25 +++ .../delivery_params.blade.php | 26 --- .../link_contact_manager.blade.php | 7 - 6 files changed, 117 insertions(+), 119 deletions(-) create mode 100644 resources/views/fluidbook_publication/delivery/contact_manager.blade.php rename resources/views/fluidbook_publication/{delivery.blade.php => delivery/index.blade.php} (83%) create mode 100644 resources/views/fluidbook_publication/delivery/mainsettings.blade.php delete mode 100644 resources/views/fluidbook_publication/delivery_params.blade.php delete mode 100644 resources/views/fluidbook_publication/link_contact_manager.blade.php diff --git a/app/Http/Controllers/Admin/Operations/FluidbookPublication/DownloadOperation.php b/app/Http/Controllers/Admin/Operations/FluidbookPublication/DownloadOperation.php index 572109b78..baf9f7786 100644 --- a/app/Http/Controllers/Admin/Operations/FluidbookPublication/DownloadOperation.php +++ b/app/Http/Controllers/Admin/Operations/FluidbookPublication/DownloadOperation.php @@ -32,7 +32,7 @@ trait DownloadOperation if (!FluidbookPublication::hasPermission($id, 'read')) { abort(401); } - return view('fluidbook_publication.delivery', ['fluidbook' => FluidbookPublication::where('id', $id)->first()]); + return view('fluidbook_publication.delivery.index', ['fluidbook' => FluidbookPublication::where('id', $id)->first()]); } protected function deliveryThumb($id, $type) diff --git a/resources/views/fluidbook_publication/delivery/contact_manager.blade.php b/resources/views/fluidbook_publication/delivery/contact_manager.blade.php new file mode 100644 index 000000000..03eb9956d --- /dev/null +++ b/resources/views/fluidbook_publication/delivery/contact_manager.blade.php @@ -0,0 +1,7 @@ +@if($mail) + + @endif + {{ $text??__('Contactez votre chef de projet') }} + @if($mail) + +@endif diff --git a/resources/views/fluidbook_publication/delivery.blade.php b/resources/views/fluidbook_publication/delivery/index.blade.php similarity index 83% rename from resources/views/fluidbook_publication/delivery.blade.php rename to resources/views/fluidbook_publication/delivery/index.blade.php index 232ff1b83..22cb1ddb9 100644 --- a/resources/views/fluidbook_publication/delivery.blade.php +++ b/resources/views/fluidbook_publication/delivery/index.blade.php @@ -20,32 +20,51 @@ $totalPages = $fluidbook->getPagesNumber(); $settings = [ - ['Titre' => $fluidbook->title], - ['Nombre de pages' => $totalPages. ' pages'], - ['Langue principale' => renameSettings($fluidbook->locale)], - [__('Date de création') => ( new \Carbon\Carbon($fluidbook->created_at))->isoFormat('DD/MM/Y') ], - [__('Dernière modification') => ( new \Carbon\Carbon($fluidbook->updated_at))->isoFormat('DD/MM/Y') ], - ['Mode de navigation' => renameSettings($fluidbook->mobileTransitions)], - ['SEO' => renameSettings($fluidbook->seoVersion)], - ['SCORM (e-learning)' => $fluidbook->scorm_enabled ? 'SCORM '.$fluidbook->getSCORMVersion() : __('Désactivé')], - ['Statistiques Fluidbook' => renameSettings($fluidbook->stats, true, true)], - ['Google Analytics' => $fluidbook->googleAnalytics ? $fluidbook->googleTagManager : __('Désactivé')] + __('Titre') => $fluidbook->title, + __('Nombre de pages') => $totalPages. ' pages', + __('Langue principale') => renameSettings($fluidbook->locale), + __('Date de création') => ( new \Carbon\Carbon($fluidbook->created_at))->isoFormat('DD/MM/Y'), + __('Dernière modification') => ( new \Carbon\Carbon($fluidbook->updated_at))->isoFormat('DD/MM/Y'), + __('Mode de navigation') => renameSettings($fluidbook->mobileTransitions), + __('SEO') => renameSettings($fluidbook->seoVersion), + 'SCORM ('.__('e-learning').')' => $fluidbook->scorm_enabled ? 'SCORM '.$fluidbook->getSCORMVersion() : __('Désactivé'), + __('Statistiques Fluidbook') => renameSettings($fluidbook->stats, true, true), + 'Google Analytics' => $fluidbook->googleAnalytics ? $fluidbook->googleTagManager : __('Désactivé') ]; - function renameSettings($v, $fem = false, $plurial = false) { - $e = $fem ? 'e' : ''; - $s = $plurial ? 's' : ''; + function renameSettings($v, $fem = false, $plural = false) { + if($fem){ + if($plural){ + $enabled=__('Activées'); + $disabled=__('Désactivées'); + }else{ + $enabled=__('Activée'); + $disabled=__('Désactivée'); + } + }else{ + if($plural){ + $enabled=__('Activés'); + $disabled=__('Désactivés'); + }else{ + $enabled=__('Activé'); + $disabled=__('Désactivé'); + } + } return match ($v) { 'flip3d','flip' => 'Flip', 'fade' => 'Air', - '1' => __('Activé'.($e).($s)), - '0','',null => __('Désactivé'.($e).($s)), + '1' => $enabled, + '0','',null => $disabled, 'fr' => __('Français'), 'en' => __('Anglais'), default => ucfirst($v) }; } + function getGoogleDocsURL($id){ + return 'https://docs.google.com/document/d/'.$id.'/export?format=pdf'; + } + $features = [ 'index' => ["value" => $fluidbook->index,"text" => __('Index'),"svg" => "nav-index"], 'print' => ["value" => $fluidbook->print,"text" => __('Imprimer'),"svg" => "nav-print"], @@ -99,28 +118,28 @@ foreach ($downloadVersions as $key => $version) { if($key === "online") { $downloadVersions[$key]['text'] = __("Standard"); - $downloadVersions[$key]['type'] = __("(serveur web)"); + $downloadVersions[$key]['type'] = __("(Serveur Web)"); $downloadVersions[$key]['icon'] = file_get_contents(url('images/icons/icon-standard-server.svg')); - $downloadVersions[$key]['notice_fr'] = "https://docs.google.com/document/d/1MK9aswqXXYleJwmbexKiAHNeNei-zTUb7CnbjkmNur4/edit"; - $downloadVersions[$key]['notice_en'] = "https://docs.google.com/document/d/18GlmLzUqJq_1UgAasSZKN9xDHmKQr4Mt8dY9Pex-Llw/edit?usp=drive_link"; + $downloadVersions[$key]['notice_fr'] = "1j4lEk2vqUnenXZQs2ucNZg51aFTLmTOoHPgYolj46m0"; + $downloadVersions[$key]['notice_en'] = "1CeLq8R8LMhWjZ0caXrO0HcfxRtzqGQkpaKJvDcYt_ZY"; }elseif ($key === "scorm") { $downloadVersions[$key]['text'] = __("LMS Scorm"); $downloadVersions[$key]['type'] = __("(LMS / SCORM)"); $downloadVersions[$key]['icon'] = file_get_contents(url('images/icons/icon-lms-scorm.svg')); - $downloadVersions[$key]['notice_fr'] = "https://docs.google.com/document/d/1wDrOihLieSRWLiXVHE4n7Ka_qHcDde_DeU6R--mzAZM/edit?usp=drive_link"; - $downloadVersions[$key]['notice_en'] = "https://docs.google.com/document/d/1g3jXC20krSiOSFG0TqzoJ7FsB8OUnvvjoI4yOMO8xUM/edit?usp=drive_link"; + $downloadVersions[$key]['notice_fr'] = "1cZ_dTdehk2av0ZUGryY1xLF5IQoqSyCmgBXPH1OYPu4"; // Pas de notice en Français + $downloadVersions[$key]['notice_en'] = "1cZ_dTdehk2av0ZUGryY1xLF5IQoqSyCmgBXPH1OYPu4"; }elseif ($key === "sharepoint") { $downloadVersions[$key]['text'] = __("SharePoint"); $downloadVersions[$key]['icon'] = file_get_contents(url('images/icons/icon-sharepoint.svg')); - $downloadVersions[$key]['notice_fr'] = "https://docs.google.com/document/d/15r6ajKDjLTlELhYVyIWJNzLkrsp8aqy4aRkP5vwNVQU/edit?usp=drive_link"; - $downloadVersions[$key]['notice_en'] = "https://docs.google.com/document/d/1FMh-fgMoFKPztGmexNA2h6VAbFa-OclPeYpLsv2eRtw/edit?usp=drive_link"; + $downloadVersions[$key]['notice_fr'] = "1O5EInYbNmNmcqi0VXq0FU7CqeYV6VJeJ0aI-bbgSlBc"; + $downloadVersions[$key]['notice_en'] = "1YeBLektflXZZz6yU-EKpYxe7i0fL0Oy13pB1vMdwMgw"; }elseif ($key === "mac_exe_html") { $downloadVersions[$key]['text'] = __("Version Offline"); - $downloadVersions[$key]['type'] = __("(Mac App)"); + $downloadVersions[$key]['type'] = __("(Application MacOS)"); $downloadVersions[$key]['icon'] = file_get_contents(url('images/icons/icon-mac-app.svg'), true); }elseif ($key === "win_ins_html") { $downloadVersions[$key]['text'] = __("Version Offline"); - $downloadVersions[$key]['type'] = __("(Windows App)"); + $downloadVersions[$key]['type'] = __("(Application Windows)"); $downloadVersions[$key]['icon'] = file_get_contents(url('images/icons/icon-windows-app.svg')); }elseif ($key === "win_cd_html") { $downloadVersions[$key]['text'] = __("Version Offline"); @@ -135,12 +154,12 @@ $noticesUrls = [ 'fr' => [ - 'widget' => "https://docs.google.com/document/d/1ezbBxEWqmTbWgBwGXmJUefCpRsRFuF6VAFRh5rDIJUQ/edit?usp=drive_link", - 'ga' => "https://docs.google.com/document/d/1ycKxPWOtXUFyaPB2Eltfnq-Y5yn_XwwVue1TKwh4Kbk/edit?usp=drive_link" + 'widget' => "15F40AfCYpAvT_w2Y1cC-Y88rV1bCOXUuiRh7C__RugM", + 'ga' => "1gDnVgCx7MMcKlqJbPFCpRN27hBGpXEC1-s7f1Lsev5E" ], 'en' => [ - 'widget' => "https://docs.google.com/document/d/1J8xEY727rhdoAgD5mk96BZOuBES4sFvctuwomyIXWKI/edit?usp=drive_link", - 'ga' => "https://docs.google.com/document/d/1dus2uWddT8VY8MIoEnx6KOfJWRQq_AYRGhYLtd2dYgI/edit?usp=drive_link" + 'widget' => "1rn-fW8cRJsBiBrNonZgZNcZ-4sSmvglvJsSsmhdfXA8", + 'ga' => "1wg2dr7zs68k_Pq33idwbROSmamGHsAU0kdNYswSyklc" ], ]; @@ -167,9 +186,10 @@ {{ $fluidbook->title }} @else -

{{ __('Vous pouvez voir ci-dessous les différentes versions de votre Fluidbook et vérifier ses - caractéristiques') }}.
{{ __('Si tout vous convient, faites le savoir à votre chef de projet, il vous - préparera les livrables') }}.

+

+ {{ __('Vous pouvez voir ci-dessous les différentes versions de votre Fluidbook et vérifier ses caractéristiques.') }} +
{{ __('Si tout vous convient, faites le savoir à votre chef de projet, il vous préparera les livrables.') }} +

@endif
-

{{__('Attention, ces liens temporaires de démo ne doivent être utilisés que pour - la validation du Fluidbook') }}. {{__('Merci de ne pas les partager !') }}

+

{{__('Attention, ces liens temporaires de démo ne doivent être utilisés que pour la validation du Fluidbook.') }} {{__('Merci de ne pas les partager !') }}

@@ -254,12 +273,7 @@
@if($settings) -
- @include('fluidbook_publication.delivery_params', ['init' => 0, 'settings', $settings]) -
-
- @include('fluidbook_publication.delivery_params', ['init' => 5, 'settings', $settings]) -
+ @include('fluidbook_publication.delivery.mainsettings', ['settings'=> $settings]) @endif
@if($enabledFeatures || $disabledFeatures) @@ -300,7 +314,7 @@ @endif

{{ __('Vous souhaitez modifier un paramètre ou une fonctionnalité ?') }} - @include('fluidbook_publication.link_contact_manager', ['mail' => $CDPMail, 'object' => $objectMail]) + @include('fluidbook_publication.delivery.contact_manager', ['mail' => $CDPMail, 'object' => $objectMail])

@@ -310,8 +324,8 @@

{{ __('Faites connaitre votre Fluidbook') }}

-

{{ __('Pour gagner en visibilité, vous devez donner de la visibilité à votre Fluidbook sur votre site web, votre blog, vos réseaux sociaux, etc. - verez ci-dessous quelques images pour vous aider à le diffuser') }}.

+

{{ __('Pour gagner en visibilité, vous devez donner de la visibilité à votre Fluidbook sur votre site web, votre blog, vos réseaux sociaux, etc.') }}

+

{{__('Vous trouverez ci-dessous des images, outils et informations pour vous aider à le diffuser.')}}

{{ __('Image pour réseaux sociaux') }}

@@ -330,16 +344,19 @@
@@ -364,7 +381,7 @@ src="{{$fluidbook->getPreviewUrl()}}/?widget=1&action=fullscreen&nav=auto">
- {{ __('Voir la notice') }}
@@ -375,22 +392,16 @@

{{ __('Mesurez votre audience') }}

-

{{ __('Les statistiques vous aident à mesurer l\'efficacité de votre Fluidbook et vous - fournissent des informations précieuses sur votre public.')}} {{ __('Connaître les préférences - et - les besoins de vos lecteurs constitue également une base solide pour améliorer votre - document')}}.

+

{{ __('Les statistiques vous aident à mesurer l\'efficacité de votre Fluidbook et vous fournissent des informations précieuses sur votre public.')}} + {{ __('Connaître les préférences et les besoins de vos lecteurs constitue également une base solide pour améliorer votre document')}} + .

{{ __('Statistiques Fluidbook') }}

-

{{ __('Avec notre module de statistiques intégré, vous savez combien de personnes - ont vu - votre Fluidbook, quelles pages les ont le plus intéressé, quels - mots-clés ils ont - cherché, etc...') }}

+

{{ __('Avec notre module de statistiques intégré, vous savez combien de personnes ont vu votre Fluidbook, quelles pages les ont le plus intéressé, quels mots-clés ils ont cherché, etc...') }}

@if($fluidbook->stats) @@ -407,11 +418,8 @@ @@ -442,15 +448,8 @@

{{ __('Une question sur votre Fluidbook ?') }}

{{ __('Vous avez remarqué une erreur ou vous souhaitez changer un paramètre ?') }} - @if(!$CDPMail) - {{ __('Contacter votre chef de projet') }} - @endif

- @if($CDPMail) - - {{ __('Contacter votre chef de projet') }} - - @endif + @include('fluidbook_publication.delivery.contact_manager', ['mail' => $CDPMail, 'object' => $objectMail,'class'=>'btn btn-primary'])
@@ -464,7 +463,7 @@ directement en ligne en cliquant ci-dessous :')}}

diff --git a/resources/views/fluidbook_publication/delivery/mainsettings.blade.php b/resources/views/fluidbook_publication/delivery/mainsettings.blade.php new file mode 100644 index 000000000..e4b1e83a4 --- /dev/null +++ b/resources/views/fluidbook_publication/delivery/mainsettings.blade.php @@ -0,0 +1,25 @@ +@php + $indexLeft=ceil(count($settings)/2); + $sides=['left'=>array_slice($settings,0,$indexLeft),'right'=>array_slice($settings,$indexLeft)]; + +@endphp + +@foreach($sides as $side=>$settingsSide) +
+ + + @foreach($settingsSide as $key=>$value) + + + + @endforeach + +
+

{{$key }}

+

{{ $value }}

+
+
+@endforeach diff --git a/resources/views/fluidbook_publication/delivery_params.blade.php b/resources/views/fluidbook_publication/delivery_params.blade.php deleted file mode 100644 index ff95fc504..000000000 --- a/resources/views/fluidbook_publication/delivery_params.blade.php +++ /dev/null @@ -1,26 +0,0 @@ - - - @foreach($settings as $value) - @php - $index = $loop->index; - $key = key($settings[$index]); - $value_ = $settings[$index][$key] - @endphp - @if($init === 0 && $loop->iteration < 6) - - - - @elseif($init === 5 && $loop->iteration > 5) - - - - @endif - @endforeach - -
-

{{ __($key) }}

-

{{ $value_ }}

-
-

{{ __($key) }}

-

{{ $value_ }}

-
diff --git a/resources/views/fluidbook_publication/link_contact_manager.blade.php b/resources/views/fluidbook_publication/link_contact_manager.blade.php deleted file mode 100644 index fa0e42c63..000000000 --- a/resources/views/fluidbook_publication/link_contact_manager.blade.php +++ /dev/null @@ -1,7 +0,0 @@ -@if($mail) -
-@endif - {{ __('Contactez votre chef de projet') }} -@if($mail) - -@endif -- 2.39.5