]> _ Git - fluidbook-toolbox.git/commitdiff
wip #5475
authorsoufiane <soufiane@cubedesigners.com>
Mon, 6 Nov 2023 14:55:44 +0000 (15:55 +0100)
committersoufiane <soufiane@cubedesigners.com>
Mon, 6 Nov 2023 16:43:52 +0000 (17:43 +0100)
app/Http/Controllers/Admin/Operations/FluidbookPublication/StatsOperation.php
resources/views/fluidbook_stats/stats.blade.php

index e2ee7fa76da2ec9fd51f40baac910670424b018b..9e02f520e84f36f01299bfada433855bba3b3fef 100644 (file)
@@ -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));
                 }
             }
 
index b23b4c511cd65b48cd5c7b7f4895bf19661083a5..58f14964ce0950f22f35c64e8e0183bb3ca751de 100644 (file)
                 {{-- Search Keywords --}}
                 @if($searches->isNotEmpty())
                     <div>
-                        <h3 data-title-excel="{{ __('Mots') }}">{{ __('Mots recherchés') }}</h3>
+                        <h3 data-title-excel="{{ __('Recherches') }}">{{ __('Mots recherchés') }}</h3>
 
                         <table class="{!! $tableClasses !!}">
                             <thead>
                             </tr>
                             </thead>
                             <tbody>
-                            @foreach($countries as $country)
+                            @foreach($countries as $key => $country)
                                 <tr>
-                                    <td class="whitespace-nowrap" data-sort-value="{{ $country['label'] }}">
+                                    <td data-flag="{{ $key }}" class="whitespace-nowrap" data-sort-value="{{ $country['label'] }}">
                                         <img src="{{ $country['flag'] }}" alt="{{ $country['label'] }}"
                                              style="width: 1.5em; margin-right: 0.75em;">
                                         {{ $country['label'] }}