mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-12 07:18:41 +00:00
add back button and show zip list
This commit is contained in:
parent
65fdcbee93
commit
f8215f4d22
|
|
@ -11,15 +11,18 @@
|
|||
<div class="tab-content">
|
||||
<input type="radio" id="media-c-tab-1" name="tabular-1" checked>
|
||||
<div class="tab">
|
||||
<table class="default">
|
||||
<?php
|
||||
$archive = new ZipArchive();
|
||||
$archive->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 '<tr><td>' . \str_repeat(' ', (\substr_count(\trim($stat['name'], '/'), '/')) * 8) . $stat['name'];
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
<input type="radio" id="media-c-tab-2" name="tabular-1">
|
||||
<div class="tab">
|
||||
|
|
|
|||
|
|
@ -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=
|
|||
<td><?= $this->getHtml('Creator'); ?>
|
||||
<td><?= $this->getHtml('Created'); ?>
|
||||
<tbody>
|
||||
<?php if (!empty($parentPath)) : $url = UriFactory::build('{/prefix}media/list?path=' . $parentPath); ?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('Type'); ?>"><a href="<?= $url; ?>"><i class="fa fa-folder-open-o"></i></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>">..
|
||||
</a>
|
||||
<td>
|
||||
<td>
|
||||
<td>
|
||||
<td>
|
||||
<?php endif; ?>
|
||||
<?php $count = 0;
|
||||
foreach ($media as $key => $value) :
|
||||
++$count;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user