Alignement des dates

This commit is contained in:
Fred Tempez 2024-03-17 09:08:08 +01:00
parent 5e7c9597cd
commit d89455d86a
2 changed files with 24 additions and 19 deletions

View File

@ -95,10 +95,10 @@ class folder extends common
private function getFolderContent($chemin, $config = [])
{
$showSubFolder = isset ($config['showsubfolder']) ? $config['showsubfolder'] : true;
$sort = isset ($config['sort']) ? $config['sort'] : true;
$showDetails = isset ($config['showdetails']) ? $config['showdetails'] : false;
$initialFolderState = isset ($config['initialfolderstate']) ? $config['initialfolderstate'] : 'collapsed';
$showSubFolder = isset($config['showsubfolder']) ? $config['showsubfolder'] : true;
$sort = isset($config['sort']) ? $config['sort'] : true;
$showDetails = isset($config['showdetails']) ? $config['showdetails'] : false;
$initialFolderState = isset($config['initialfolderstate']) ? $config['initialfolderstate'] : 'collapsed';
// Vérifier si le chemin existe et est un dossier
if (is_dir($chemin)) {
@ -163,7 +163,7 @@ class folder extends common
if ($showDetails) {
$fileSize = filesize($fileFullPath);
$fileSizeFormatted = $this->formatSizeUnits($fileSize);
$fileInfo = "<span class='file-info'> " . date("d-m-Y H:i", filemtime($fileFullPath)) . " - $fileSizeFormatted</span>";
$fileInfo = "<div class='file-info-container'>" . date("d-m-Y H:i", filemtime($fileFullPath)) . " - $fileSizeFormatted</div>";
}
$items .= "<li class='file'><a href='$fileFullPath' data-lity>$file</a>$fileInfo</li>";
}
@ -180,6 +180,7 @@ class folder extends common
private function formatSizeUnits($bytes)
{
$units = array('octest', 'Ko', 'Mo', 'Go', 'To');

View File

@ -55,7 +55,11 @@
margin-left: -40px;
}
/* Style pour les informations de fichier */
.file-info {
.file-info-container {
display: flex;
float: right;
align-content: left;
/* Ajout d'une largeur fixe à la div */
width: 200px;
}