From f8215f4d225c39dfda0b122598c3d1239379e31c Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 20 Feb 2021 21:18:48 +0100 Subject: [PATCH] add back button and show zip list --- Theme/Backend/Components/Media/archive.tpl.php | 9 ++++++--- Theme/Backend/media-list.tpl.php | 15 +++++++++++++++ Theme/Backend/template-functions.php | 2 +- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Theme/Backend/Components/Media/archive.tpl.php b/Theme/Backend/Components/Media/archive.tpl.php index 7a0bc30..3b8a7d0 100644 --- a/Theme/Backend/Components/Media/archive.tpl.php +++ b/Theme/Backend/Components/Media/archive.tpl.php @@ -11,15 +11,18 @@
+ open(($this->media->isAbsolute ? '' : __DIR__ . '/../../../../../../') . $this->media->getPath()); - for( $i = 0; $i < $archive->numFiles; $i++ ){ - $stat = $archive->statIndex( $i ); - print_r( basename( $stat['name'] ) . PHP_EOL ); + for($i = 0; $i < $archive->numFiles; ++$i) { + $stat = $archive->statIndex($i); + + echo '
' . \str_repeat(' ', (\substr_count(\trim($stat['name'], '/'), '/')) * 8) . $stat['name']; } ?> +
diff --git a/Theme/Backend/media-list.tpl.php b/Theme/Backend/media-list.tpl.php index 262d58e..108baa5 100755 --- a/Theme/Backend/media-list.tpl.php +++ b/Theme/Backend/media-list.tpl.php @@ -52,12 +52,17 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id= $subPath = ''; $paths = \explode('/', \ltrim($mediaPath, '/')); $length = \count($paths); + $parentPath = ''; for ($i = 0; $i < $length; ++$i) : if ($paths[$i] === '') { continue; } + if ($i === $length - 1) { + $parentPath = $subPath === '' ? '/' : $subPath; + } + $subPath .= '/' . $paths[$i]; $url = UriFactory::build('{/prefix}media/list?path=' . $subPath); @@ -83,6 +88,16 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id= getHtml('Creator'); ?> getHtml('Created'); ?> + + + + .. + + + + + + $value) : ++$count; diff --git a/Theme/Backend/template-functions.php b/Theme/Backend/template-functions.php index ba4d2f7..91d17d2 100755 --- a/Theme/Backend/template-functions.php +++ b/Theme/Backend/template-functions.php @@ -25,7 +25,7 @@ $fileIconFunction = function (int $extensionType) : string } elseif ($extensionType === ExtensionType::PDF) { return 'file-pdf-o'; } elseif ($extensionType === ExtensionType::ARCHIVE) { - return 'file-zip'; + return 'file-zip-o'; } elseif ($extensionType === ExtensionType::AUDIO) { return 'file-audio-o'; } elseif ($extensionType === ExtensionType::VIDEO) {