From 70c749fb9955310a6ba09bac11a9b8d2bca85b3b Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 23 Feb 2023 14:50:09 +0100 Subject: [PATCH] wait #5750 @1 --- .../Operations/Files/UploadOperation.php | 1 + .../views/fluidbook_stats/loader.blade.php | 2 +- .../views/fluidbook_stats/summary.blade.php | 156 +++++++++--------- 3 files changed, 82 insertions(+), 77 deletions(-) diff --git a/app/Http/Controllers/Admin/Operations/Files/UploadOperation.php b/app/Http/Controllers/Admin/Operations/Files/UploadOperation.php index 7e63cf664..dff622e2c 100644 --- a/app/Http/Controllers/Admin/Operations/Files/UploadOperation.php +++ b/app/Http/Controllers/Admin/Operations/Files/UploadOperation.php @@ -13,6 +13,7 @@ use Illuminate\Support\Facades\Route; use Prologue\Alerts\Facades\Alert; // __('!! Partage de fichiers') + trait UploadOperation { protected function setupImportRoutes($segment, $routeName, $controller) diff --git a/resources/views/fluidbook_stats/loader.blade.php b/resources/views/fluidbook_stats/loader.blade.php index 55e1c3aa7..408756b5b 100644 --- a/resources/views/fluidbook_stats/loader.blade.php +++ b/resources/views/fluidbook_stats/loader.blade.php @@ -239,7 +239,7 @@
Loading...
@endsection diff --git a/resources/views/fluidbook_stats/summary.blade.php b/resources/views/fluidbook_stats/summary.blade.php index eb9060a34..24486aa0e 100644 --- a/resources/views/fluidbook_stats/summary.blade.php +++ b/resources/views/fluidbook_stats/summary.blade.php @@ -3,11 +3,12 @@ {{-- This doesn't extend any templates because it is fetched from loader.blade.php and injected via JS --}}

- {{ __('Statistics') }} + {{ __('Statistiques') }} {{ $fluidbook_settings->title }}

-
+
{!! $formatted_date_range !!} @@ -19,10 +20,10 @@
-
{{ __('Fluidbook Name') }}
+
{{ __('Titre de la publication') }}
{{ $fluidbook_settings->title }}
-
{{ __('Creation Date') }}
+
{{ __('Crée le') }}
{{ $fluidbook->created_at->isoFormat('dddd, Do MMMM YYYY') }} @@ -34,7 +35,7 @@
-
{{ __('Page Count') }}
+
{{ __('Nombre de pages') }}
{{ $page_count }}
{{-- Summary of totals --}} @@ -43,11 +44,11 @@ @php if ($summary_key === 'formatted_date') continue; @endphp -
{{ sprintf(__('Total %s'), $summary_heading) }}
+
{{ $summary_heading }}
{{ $formatter->format($period_details->sum($summary_key)) }}
@endforeach -
{{ __('Total Searches') }}
+
{{ __('Recherches') }}
{{ $formatter->format($searches->sum()) }}
@endif
@@ -66,7 +67,8 @@ @if($period_key === $period || $period_not_available) {{ $period_title['singular'] }} @else - + {{ $period_title['singular'] }} @endif @@ -80,53 +82,54 @@ {{-- Stats for each period entry (year, month, week or day) --}} + + @foreach ($table_map['summary'] as $summary_heading_key => $summary_heading) + + @endforeach + + + + @foreach($period_details as $date_key => $period_data) - @foreach ($table_map['summary'] as $summary_heading_key => $summary_heading) - + @foreach (array_keys($table_map['summary']) as $summary_key) + @endforeach - - - @foreach($period_details as $date_key => $period_data) - - @foreach (array_keys($table_map['summary']) as $summary_key) - - @endforeach - - @endforeach + @endforeach
+ {{ $summary_heading }} +
- {{ $summary_heading }} - + {!! is_int($period_data[$summary_key]) ? $formatter->format($period_data[$summary_key]) : $period_data[$summary_key] !!} +
- {!! is_int($period_data[$summary_key]) ? $formatter->format($period_data[$summary_key]) : $period_data[$summary_key] !!} -
{{-- Stats segregated by page number --}} -

{{ __('Details by page') }} ({!! $formatted_date_range !!})

+

{{ __('Détails par page') }} ({!! $formatted_date_range !!})

+ + @foreach ($table_map['per-page'] as $page_data_heading_key => $page_data_heading) + {{-- In the case of the "page_group" data, we want it to be sorted in ascending order by default, even though it's a numeric column --}} + + @endforeach + + + + @foreach($pages as $page_group => $page_data) - @foreach ($table_map['per-page'] as $page_data_heading_key => $page_data_heading) - {{-- In the case of the "page_group" data, we want it to be sorted in ascending order by default, even though it's a numeric column --}} - + @foreach (array_keys($table_map['per-page']) as $summary_key) + @endforeach - - - @foreach($pages as $page_group => $page_data) - - @foreach (array_keys($table_map['per-page']) as $summary_key) - - @endforeach - - @endforeach + @endforeach
+ {{ $page_data_heading }} +
- {{ $page_data_heading }} - + {!! is_int($page_data[$summary_key]) ? $formatter->format($page_data[$summary_key]) : $page_data[$summary_key] !!} +
- {!! is_int($page_data[$summary_key]) ? $formatter->format($page_data[$summary_key]) : $page_data[$summary_key] !!} -
@@ -137,13 +140,13 @@ {{-- Outgoing Links --}} @if($outlinks->isNotEmpty())
-

{{ __('Outgoing Links') }}

+

{{ __('Liens sortants') }}

- + @@ -163,13 +166,13 @@ {{-- Search Keywords --}} @if($searches->isNotEmpty())
-

{{ __('Search Keywords') }}

+

{{ __('Mots recherchés') }}

{{ __('URL') }}{{ __('Clicks') }}{{ __('Clics') }}
- - + + @@ -187,20 +190,21 @@ {{-- Visitor Countries --}} @if($countries->isNotEmpty())
-

{{ __('Origin of Visitors') }}

+

{{ __('Origine des visiteurs') }}

{{ __('Query') }}{{ __('Searches') }}{{ __('Requêtes') }}{{ __('Nombre') }}
- - + + @foreach($countries as $country) @@ -214,11 +218,11 @@ -{{-- It's possible for there to be no statistics returned by the API --}} + {{-- It's possible for there to be no statistics returned by the API --}} @else
⚠️ - {{ __('Sorry, no statistics were found for this period.') }} + {{ __('Aucune visite ne correspond à cette période') }}
@endif @@ -228,17 +232,17 @@ {{-- Date Range picker setup: https://sensortower.github.io/daterangepicker/docs --}}
{{ __('Country') }}{{ __('Visits') }}{{ __('Pays') }}{{ __('Nombre de visites') }}
- {{ $country['label'] }} + {{ $country['label'] }} {{ $country['label'] }} {{ $formatter->format($country['nb_visits']) }}