File tree Expand file tree Collapse file tree 4 files changed +33
-29
lines changed
Expand file tree Collapse file tree 4 files changed +33
-29
lines changed Original file line number Diff line number Diff line change 11# wrapper {
2- height : 100vh ;
2+ min- height: 100vh ;
33 margin-bottom : 0px ;
44}
55
6- # tree {
7- height : calc (100vh - 70px );
8- }
9-
106# main {
117 border-left : 1px solid silver;
12- }
13-
14- # content {
15- height : calc (100vh - 140px );
16- overflow : scroll;
8+ min-height : calc (100vh - 70px );
179}
1810
1911.img-row {
20- margin-bottom : 10 px ;
12+ margin-bottom : 20 px ;
2113}
2214
2315.clickable {
3931.thumbnail {
4032 max-width : 210px ;
4133 max-height : 210px ;
34+ margin-bottom : 10px ;
4235}
4336
4437.square {
Original file line number Diff line number Diff line change @@ -29,11 +29,20 @@ public function show()
2929 $ default_folder_type = 'user ' ;
3030 }
3131
32+ $ type_key = $ this ->currentLfmType ();
33+ $ mine_config = 'lfm.valid_ ' . $ type_key . '_mimetypes ' ;
34+ $ config_error = null ;
35+
36+ if (!is_array (config ($ mine_config ))) {
37+ $ config_error = 'Config : ' . $ mine_config . ' is not set correctly ' ;
38+ }
39+
3240 return view ('laravel-filemanager::index ' )->with ([
3341 'working_dir ' => $ this ->rootFolder ($ default_folder_type ),
3442 'file_type ' => $ this ->currentLfmType (true ),
3543 'startup_view ' => config ('lfm. ' . $ this ->currentLfmType () . '_startup_view ' ),
36- 'no_extension ' => ! extension_loaded ('gd ' ) && ! extension_loaded ('imagick ' )
44+ 'no_extension ' => ! extension_loaded ('gd ' ) && ! extension_loaded ('imagick ' ),
45+ 'config_error ' => $ config_error
3746 ]);
3847 }
3948}
Original file line number Diff line number Diff line change @@ -104,10 +104,6 @@ private function uploadValidator($file)
104104 $ valid_mimetypes = config ($ mine_config , $ this ->{"default_ {$ type_key }_types " });
105105 $ max_size = config ('lfm.max_ ' . $ type_key . '_size ' , $ this ->{"default_max_ {$ type_key }_size " });
106106
107- if (!is_array ($ valid_mimetypes )) {
108- return 'Config : ' . $ mine_config . ' is not set correctly ' ;
109- }
110-
111107 if (false === in_array ($ mimetype , $ valid_mimetypes )) {
112108 return $ this ->error ('mime ' ) . $ mimetype ;
113109 }
Original file line number Diff line number Diff line change 2222 </div >
2323
2424 <div class =" col-xs-10" id =" main" >
25- @if ($no_extension )
26- <div class =" alert alert-warning" ><i class =" fa fa-exclamation-circle" ></i > {{ Lang:: get (' laravel-filemanager::lfm.message-extension_not_found' ) } } </div >
27- @endif
2825 <nav class =" navbar navbar-default" >
2926 <div class =" navbar-header" >
3027 <button type =" button" class =" navbar-toggle collapsed" data-toggle =" collapse" data-target =" #bs-example-navbar-collapse-1" >
6764 </div >
6865 </nav >
6966
70- @if (isset ($errors ) && $errors -> any () )
71- <div class =" alert alert-danger" role =" alert" >
72- <button type =" button" class =" close" data-dismiss =" alert" aria-label =" Close" ><span aria-hidden =" true" >× ; </span ></button >
73- <ul >
74- @foreach ($errors -> all () as $error )
75- <li >{{ $error } } </li >
76- @endforeach
77- </ul >
78- </div >
79- @endif
67+ <div id =" alerts" >
68+ @if ($no_extension )
69+ <div class =" alert alert-warning" ><i class =" fa fa-exclamation-circle" ></i > {{ Lang:: get (' laravel-filemanager::lfm.message-extension_not_found' ) } } </div >
70+ @endif
71+ @if (! is_null ($config_error ) )
72+ <div class =" alert alert-danger" ><i class =" fa fa-times-circle" ></i > {{ $config_error } } </div >
73+ @endif
74+
75+ @if (isset ($errors ) && $errors -> any () )
76+ <div class =" alert alert-danger" role =" alert" >
77+ <button type =" button" class =" close" data-dismiss =" alert" aria-label =" Close" ><span aria-hidden =" true" >× ; </span ></button >
78+ <ul >
79+ @foreach ($errors -> all () as $error )
80+ <li >{{ $error } } </li >
81+ @endforeach
82+ </ul >
83+ </div >
84+ @endif
85+ </div >
8086
8187 <div id =" content" ></div >
8288 </div >
You can’t perform that action at this time.
0 commit comments