diff --git a/.DS_Store b/.DS_Store
index 8ef6a8a..b1a7722 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/com_eis/.DS_Store b/com_eis/.DS_Store
index 81efcaa..9e68a39 100644
Binary files a/com_eis/.DS_Store and b/com_eis/.DS_Store differ
diff --git a/com_eis/Archiv.zip b/com_eis/Archiv.zip
new file mode 100644
index 0000000..2083cf4
Binary files /dev/null and b/com_eis/Archiv.zip differ
diff --git a/com_eis/eis.xml b/com_eis/eis.xml
index 71da673..dc6e827 100644
--- a/com_eis/eis.xml
+++ b/com_eis/eis.xml
@@ -11,10 +11,10 @@
com_eis
- 2025-07-23
+ 2025-09-18
Thomas Spohr powert by OpenAI
- 1.0.0
- EIS Minimal-Komponente
+ 1.0.1
+ EIS Komponente
EIS\Component\EIS
diff --git a/com_eis/eis.zip b/com_eis/eis.zip
deleted file mode 100644
index c26791c..0000000
Binary files a/com_eis/eis.zip and /dev/null differ
diff --git a/com_eis/src/.DS_Store b/com_eis/src/.DS_Store
index 07ebed8..de809fd 100644
Binary files a/com_eis/src/.DS_Store and b/com_eis/src/.DS_Store differ
diff --git a/com_eis/src/View/.DS_Store b/com_eis/src/View/.DS_Store
index b8dba7a..264a6c7 100644
Binary files a/com_eis/src/View/.DS_Store and b/com_eis/src/View/.DS_Store differ
diff --git a/mod_pdf_tree/.DS_Store b/mod_pdf_tree/.DS_Store
index d95efbe..e70023a 100644
Binary files a/mod_pdf_tree/.DS_Store and b/mod_pdf_tree/.DS_Store differ
diff --git a/mod_pdf_tree/Archiv.zip b/mod_pdf_tree/Archiv.zip
new file mode 100644
index 0000000..8c02f50
Binary files /dev/null and b/mod_pdf_tree/Archiv.zip differ
diff --git a/mod_pdf_tree/helper.php b/mod_pdf_tree/helper.php
index eeb6832..b8b0309 100644
--- a/mod_pdf_tree/helper.php
+++ b/mod_pdf_tree/helper.php
@@ -2,6 +2,7 @@
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
+use Joomla\CMS\Router\Route;
use Joomla\Database\DatabaseDriver;
class ModEisAnzeigeHelper
@@ -21,13 +22,18 @@ class ModEisAnzeigeHelper
$rows = $db->setQuery($query)->loadAssocList();
- // Nach parent_id gruppieren
+ // Nach parent_id gruppieren und alphabetisch sortieren
$grouped = [];
foreach ($rows as $row) {
$pid = $row['parent_id'] === null ? null : (int) $row['parent_id'];
$grouped[$pid][] = $row;
}
+ // Sortieren nach name (case-insensitive)
+ foreach ($grouped as &$group) {
+ usort($group, fn($a, $b) => strcasecmp($a['name'], $b['name']));
+ }
+
return $grouped;
}
@@ -44,22 +50,31 @@ class ModEisAnzeigeHelper
foreach ($items[$parentId] as $item) {
$isFolder = (bool) $item['is_folder'];
- $title = htmlspecialchars($item['title'] ?: $item['name']);
- $path = self::convertToRelativeUrl($item['path'] ?? '');
+ $rawName = $item['title'] ?: $item['name'];
+ $fileId = (int) $item['id'];
- // Erweiterung .pdf im Titel entfernen (nur Anzeige, nicht Link)
- $displayTitle = preg_replace('/\.pdf$/i', '', $title);
+ // Dateiendung .pdf entfernen
+ $displayName = preg_replace('/\.pdf$/i', '', $rawName);
+ $displayName = htmlspecialchars($displayName);
if ($isFolder) {
$fileCount = self::countFilesRecursive($items, $item['id']);
$html .= '';
- $html .= '▶';
- $html .= '📁 ' . $displayTitle . ' (' . $fileCount . ')';
+ $html .= '📁 ' . $displayName . ' (' . $fileCount . ')';
$html .= self::renderTree($items, $item['id']);
$html .= '';
} else {
+ $link = Route::_('index.php?option=com_eis&task=download.download&id=' . $fileId);
+
+ // Tooltip mit Dateigröße
+ $tooltip = '';
+ if (!empty($item['path']) && file_exists($item['path'])) {
+ $size = filesize($item['path']);
+ $tooltip = ' title="Größe: ' . self::formatFileSize($size) . '"';
+ }
+
$html .= '';
- $html .= '📄' . $displayTitle . '';
+ $html .= '📄 ' . $displayName . '';
$html .= '';
}
}
@@ -68,25 +83,6 @@ class ModEisAnzeigeHelper
return $html;
}
- /**
- * Konvertiert absoluten Serverpfad in URL
- */
- private static function convertToRelativeUrl(string $fullPath): string
- {
- // Absoluter Serverpfad zum Joomla-Root
- $webRoot = '/var/www/joomla';
- $webBase = ''; // ggf. '/unterordner', wenn Joomla in Subdir
-
- if (str_starts_with($fullPath, $webRoot)) {
- $relativePath = str_replace($webRoot, '', $fullPath);
- // Leerzeichen und Sonderzeichen escapen
- $relativePath = implode('/', array_map('rawurlencode', explode('/', $relativePath)));
- return rtrim(\JUri::root(), '/') . $webBase . $relativePath;
- }
-
- return $fullPath; // Fallback
- }
-
/**
* Zählt alle PDF-Dateien unterhalb eines Ordners rekursiv
*/
@@ -108,4 +104,20 @@ class ModEisAnzeigeHelper
return $count;
}
+
+ /**
+ * Formatierte Dateigröße für Tooltip
+ */
+ private static function formatFileSize(int $bytes): string
+ {
+ if ($bytes >= 1073741824) {
+ return number_format($bytes / 1073741824, 2) . ' GB';
+ } elseif ($bytes >= 1048576) {
+ return number_format($bytes / 1048576, 1) . ' MB';
+ } elseif ($bytes >= 1024) {
+ return number_format($bytes / 1024, 0) . ' KB';
+ } else {
+ return $bytes . ' B';
+ }
+ }
}
diff --git a/mod_pdf_tree/mod_eis_anzeige.xml b/mod_pdf_tree/mod_eis_anzeige.xml
index 374b241..02f20ff 100644
--- a/mod_pdf_tree/mod_eis_anzeige.xml
+++ b/mod_pdf_tree/mod_eis_anzeige.xml
@@ -1,7 +1,7 @@
EIS-Anzeige
- Ich
+ Thomas Spohr
1.0.1
Anzeige des PDF-Baums mit Dokumentenzählung und Expand/Collapse-All
diff --git a/mod_pdf_tree/mod_eis_anzeige.zip b/mod_pdf_tree/mod_eis_anzeige.zip
deleted file mode 100644
index 21ae967..0000000
Binary files a/mod_pdf_tree/mod_eis_anzeige.zip and /dev/null differ
diff --git a/mod_pdf_tree/tmpl/default.php b/mod_pdf_tree/tmpl/default.php
index 96744fe..e5cd84a 100644
--- a/mod_pdf_tree/tmpl/default.php
+++ b/mod_pdf_tree/tmpl/default.php
@@ -10,8 +10,6 @@
border: 1px solid #ddd;
border-radius: 6px;
box-shadow: 0 4px 10px rgba(0,0,0,0.05);
- width: 100%;
- max-width: 100%; /* Oder: max-width: 1400px; */
}
.pdf-tree-container {
@@ -35,7 +33,6 @@
border: none;
display: block;
}
-
.pdf-tree {
list-style: none;
margin: 0;
@@ -48,7 +45,6 @@
display: none;
}
-
.pdf-tree li {
margin: 0.3em 0;
}