From 6098f31f9a91434f652e4aea32c91b7b98ce3877 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 1 Oct 2016 15:40:38 -0400 Subject: [PATCH] Better dropdown menu setup, more options Still rough --- app/Repositories/Daemon/FileRepository.php | 6 ++- resources/views/server/files/index.blade.php | 8 ---- resources/views/server/files/list.blade.php | 20 +++++---- .../server/js/filemanager/actions.blade.php | 41 +++++++++++++++---- .../server/js/filemanager/index.blade.php | 4 +- 5 files changed, 50 insertions(+), 29 deletions(-) diff --git a/app/Repositories/Daemon/FileRepository.php b/app/Repositories/Daemon/FileRepository.php index b4fb2e3d..e57a543c 100644 --- a/app/Repositories/Daemon/FileRepository.php +++ b/app/Repositories/Daemon/FileRepository.php @@ -185,7 +185,8 @@ class FileRepository 'entry' => $value->name, 'directory' => trim($directory, '/'), 'size' => null, - 'date' => strtotime($value->modified) + 'date' => strtotime($value->modified), + 'mime' => $value->mime ]]); } else if ($value->file === true) { @@ -195,7 +196,8 @@ class FileRepository 'directory' => trim($directory, '/'), 'extension' => pathinfo($value->name, PATHINFO_EXTENSION), 'size' => HelperRepository::bytesToHuman($value->size), - 'date' => strtotime($value->modified) + 'date' => strtotime($value->modified), + 'mime' => $value->mime ]]); } diff --git a/resources/views/server/files/index.blade.php b/resources/views/server/files/index.blade.php index 482b062d..d02aad96 100644 --- a/resources/views/server/files/index.blade.php +++ b/resources/views/server/files/index.blade.php @@ -56,14 +56,6 @@ - diff --git a/resources/views/server/files/list.blade.php b/resources/views/server/files/list.blade.php index 7034ac5c..df850f9c 100644 --- a/resources/views/server/files/list.blade.php +++ b/resources/views/server/files/list.blade.php @@ -30,7 +30,7 @@ @if (isset($directory['first']) && $directory['first'] === true) - + @@ -39,7 +39,7 @@ @endif @if (isset($directory['show']) && $directory['show'] === true) - + ← {{ $directory['link_show'] }} @@ -48,9 +48,11 @@ @endif @foreach ($folders as $folder) - + - {{ $folder['entry'] }} + + {{ $folder['entry'] }} + {{ $folder['size'] }} {{ date('m/d/y H:i:s', $folder['date']) }} {{-- @@ -68,9 +70,9 @@ @endforeach @foreach ($files as $file) - - - + + + @if(in_array($file['extension'], $extensions)) @can('edit-files', $server) {{ $file['entry'] }} @@ -81,8 +83,8 @@ {{ $file['entry'] }} @endif - {{ $file['size'] }} - {{ date('m/d/y H:i:s', $file['date']) }} + {{ $file['size'] }} + {{ date('m/d/y H:i:s', $file['date']) }} {{--