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 not deleted" => "The file could not be deleted.",
|
||||||
"file deleted" => "File deleted.",
|
"file deleted" => "File deleted.",
|
||||||
"folder deleted" => "Folder 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">
|
<div class="list-group">
|
||||||
<?php
|
<?php
|
||||||
$files = scandir($fullpath);
|
$files = scandir($fullpath);
|
||||||
|
$count = 0;
|
||||||
foreach ($files as $f) {
|
foreach ($files as $f) {
|
||||||
if (strpos($f, '.') !== 0) {
|
if (strpos($f, '.') !== 0) {
|
||||||
|
$count++;
|
||||||
$link = "$folder/$f";
|
$link = "$folder/$f";
|
||||||
$target = "_BLANK";
|
$target = "_BLANK";
|
||||||
$isdir = false;
|
$isdir = false;
|
||||||
@ -119,6 +121,18 @@ $fullpath = $base . $folder;
|
|||||||
<?php
|
<?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>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user