From de8b5d8a5f371051523b659b2fb6b0b3c5d48cad Mon Sep 17 00:00:00 2001 From: soufiane Date: Mon, 6 Nov 2023 15:55:44 +0100 Subject: [PATCH] wip #5475 --- .../Operations/FluidbookPublication/StatsOperation.php | 9 ++++++++- resources/views/fluidbook_stats/stats.blade.php | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Admin/Operations/FluidbookPublication/StatsOperation.php b/app/Http/Controllers/Admin/Operations/FluidbookPublication/StatsOperation.php index e2ee7fa76..9e02f520e 100644 --- a/app/Http/Controllers/Admin/Operations/FluidbookPublication/StatsOperation.php +++ b/app/Http/Controllers/Admin/Operations/FluidbookPublication/StatsOperation.php @@ -152,7 +152,14 @@ trait StatsOperation foreach ($tr as $k => $lines) { foreach ($lines->find('td') as $td) { - $datas[$k][] = trim(preg_replace('/\s\s+/', ' ', $td->text)); + $text = $td->text; + if($td->getAttribute('data-flag')) { + $text = $td->getAttribute('data-flag'); + } elseif($td->getAttribute('sorttable_customkey')) { + $text = $td->getAttribute('sorttable_customkey'); + } + + $datas[$k][] = trim(preg_replace('/\s\s+/', ' ', $text)); } } diff --git a/resources/views/fluidbook_stats/stats.blade.php b/resources/views/fluidbook_stats/stats.blade.php index b23b4c511..58f14964c 100644 --- a/resources/views/fluidbook_stats/stats.blade.php +++ b/resources/views/fluidbook_stats/stats.blade.php @@ -263,7 +263,7 @@ {{-- Search Keywords --}} @if($searches->isNotEmpty())
-

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

+

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

@@ -297,9 +297,9 @@ - @foreach($countries as $country) + @foreach($countries as $key => $country) -
+ {{ $country['label'] }} {{ $country['label'] }} -- 2.39.5