Add message for empty folders
This commit is contained in:
parent
dbe21d80e6
commit
7758c1db28
@ -115,4 +115,5 @@ define("STRINGS", [
|
||||
"file not deleted" => "The file could not be deleted.",
|
||||
"file deleted" => "File deleted.",
|
||||
"folder deleted" => "Folder deleted.",
|
||||
"nothing here" => "There doesn't seem to be anything here..."
|
||||
]);
|
@ -71,8 +71,10 @@ $fullpath = $base . $folder;
|
||||
<div class="list-group">
|
||||
<?php
|
||||
$files = scandir($fullpath);
|
||||
$count = 0;
|
||||
foreach ($files as $f) {
|
||||
if (strpos($f, '.') !== 0) {
|
||||
$count++;
|
||||
$link = "$folder/$f";
|
||||
$target = "_BLANK";
|
||||
$isdir = false;
|
||||
@ -119,6 +121,18 @@ $fullpath = $base . $folder;
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if ($count == 0) {
|
||||
?>
|
||||
<div class="list-group-item text-center">
|
||||
<p class="text-muted">
|
||||
<i class="far fa-folder-open fa-10x fa-fw"></i>
|
||||
</p>
|
||||
<p class="h4 text-muted">
|
||||
<?php lang("nothing here"); ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user