File tree Expand file tree Collapse file tree 3 files changed +10
-12
lines changed
Expand file tree Collapse file tree 3 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ private function getFilesWithInfo($path)
3030
3131 foreach (File::files ($ path ) as $ key => $ file ) {
3232 $ file_name = parent ::getName ($ file );
33+ $ file_url = parent ::getFileUrl ($ file_name );
3334 $ file_created = filemtime ($ file );
3435 $ file_size = $ this ->humanFilesize (File::size ($ file ));
3536
@@ -60,6 +61,7 @@ private function getFilesWithInfo($path)
6061
6162 $ arr_files [$ key ] = [
6263 'name ' => $ file_name ,
64+ 'url ' => $ file_url ,
6365 'size ' => $ file_size ,
6466 'created ' => $ file_created ,
6567 'type ' => $ file_type ,
Original file line number Diff line number Diff line change 22<?php $thumb_src = $file [' thumb' ]; ? >
33
44<div class =" thumbnail clickable" onclick =" useFile('{{ $file_name } } ')" >
5- <div class =" square" >
5+ <div class =" square" id = " {{ $file_name } } " data-url = " {{ $file [ ' url ' ] } } " >
66 @if ($thumb_src )
7- <img id = " {{ $file_name } } " src =" {{ $thumb_src } }" >
7+ <img src =" {{ $thumb_src } }" >
88 @else
99 <div class =" icon-container" >
1010 <i class =" fa {{ $file [' icon' ] } } fa-5x" ></i >
2626 <li ><a href =" javascript:rename('{{ $file_name } } ')" ><i class =" fa fa-edit fa-fw" ></i > {{ Lang:: get (' laravel-filemanager::lfm.menu-rename' ) } } </a ></li >
2727 <li ><a href =" javascript:download('{{ $file_name } } ')" ><i class =" fa fa-download fa-fw" ></i > {{ Lang:: get (' laravel-filemanager::lfm.menu-download' ) } } </a ></li >
2828 <li class =" divider" ></li >
29- @if ($type == ' Images ' )
29+ @if ($thumb_src )
3030 <li ><a href =" javascript:fileView('{{ $file_name } } ')" ><i class =" fa fa-image fa-fw" ></i > {{ Lang:: get (' laravel-filemanager::lfm.menu-view' ) } } </a ></li >
3131 <li ><a href =" javascript:resizeImage('{{ $file_name } } ')" ><i class =" fa fa-arrows fa-fw" ></i > {{ Lang:: get (' laravel-filemanager::lfm.menu-resize' ) } } </a ></li >
3232 <li ><a href =" javascript:cropImage('{{ $file_name } } ')" ><i class =" fa fa-crop fa-fw" ></i > {{ Lang:: get (' laravel-filemanager::lfm.menu-crop' ) } } </a ></li >
Original file line number Diff line number Diff line change 88 <th >{{ Lang:: get (' laravel-filemanager::lfm.title-action' ) } } </th >
99 </thead >
1010 <tbody >
11- @foreach ($directories as $key => $dir_name )
11+ @foreach ($directories as $key => $directory )
1212 <tr >
1313 <td >
1414 <i class =" fa fa-folder-o" ></i >
15- <a class =" folder-item clickable" data-id =" {{ $dir_name [ ' long ' ] } }" >
16- {{ $dir_name [ ' short ' ] } }
15+ <a class =" folder-item clickable" data-id =" {{ $directory -> path } }" >
16+ {{ $directory -> name } }
1717 </a >
1818 </td >
1919 <td ></td >
2626 @foreach ($files as $file )
2727 <tr >
2828 <td >
29- @if ($type == ' Images' )
30- <i class =" fa fa-image" ></i >
31- @else
3229 <i class =" fa {{ $file [' icon' ] } }" ></i >
33- @endif
3430 <?php $file_name = $file [' name' ]; ? >
35- <a href =" javascript:useFile('{{ $file_name } } ')" >
31+ <a href =" javascript:useFile('{{ $file_name } } ')" id = " {{ $file_name } } " data-url = " {{ $file [ ' url ' ] } } " >
3632 {{ $file_name } }
3733 </a >
3834   ;  ;
5349 <a href =" javascript:trash('{{ $file_name } } ')" >
5450 <i class =" fa fa-trash fa-fw" ></i >
5551 </a >
56- @if ($type == ' Images ' )
52+ @if ($file [ ' thumb ' ] )
5753 <a href =" javascript:cropImage('{{ $file_name } } ')" >
5854 <i class =" fa fa-crop fa-fw" ></i >
5955 </a >
You can’t perform that action at this time.
0 commit comments