From e4972eaae3c75e5a57d543db0b85c5ae411444e3 Mon Sep 17 00:00:00 2001 From: "B.Fatih KOZ" <74361521+FatihKoz@users.noreply.github.com> Date: Fri, 18 Dec 2020 22:34:05 +0300 Subject: [PATCH] Download screen enhancements Changed the group name according to its category , aircrafts will show icao type and registration , airports will be displayed with their icao codes names and countries. Rest will be showed with their names (exp airlines) This will result a much better look on the downloads page for end users while looking for a specific type's files (like a repaint for a B738). --- app/Http/Controllers/Frontend/DownloadController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Frontend/DownloadController.php b/app/Http/Controllers/Frontend/DownloadController.php index 8208a19f..dee02731 100644 --- a/app/Http/Controllers/Frontend/DownloadController.php +++ b/app/Http/Controllers/Frontend/DownloadController.php @@ -42,7 +42,14 @@ class DownloadController extends Controller $category = explode('\\', $class); $category = end($category); - $group_name = $category.' - '.$obj->name; + if ($category == 'Aircraft') { + $group_name = $category.' > '.$obj->icao.' '.$obj->registration; + } elseif ($category == 'Airport') { + $group_name = $category.' > '.$obj->icao.' : '.$obj->name.' ('.$obj->country.')'; + } else { + $group_name = $category.' > '.$obj->name; + } + $regrouped_files[$group_name] = $files; }