mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-18 18:28:40 +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">
|
<div class="tab-content">
|
||||||
<input type="radio" id="media-c-tab-1" name="tabular-1" checked>
|
<input type="radio" id="media-c-tab-1" name="tabular-1" checked>
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
|
<table class="default">
|
||||||
<?php
|
<?php
|
||||||
$archive = new ZipArchive();
|
$archive = new ZipArchive();
|
||||||
$archive->open(($this->media->isAbsolute ? '' : __DIR__ . '/../../../../../../') . $this->media->getPath());
|
$archive->open(($this->media->isAbsolute ? '' : __DIR__ . '/../../../../../../') . $this->media->getPath());
|
||||||
|
|
||||||
for( $i = 0; $i < $archive->numFiles; $i++ ){
|
for($i = 0; $i < $archive->numFiles; ++$i) {
|
||||||
$stat = $archive->statIndex( $i );
|
$stat = $archive->statIndex($i);
|
||||||
print_r( basename( $stat['name'] ) . PHP_EOL );
|
|
||||||
|
echo '<tr><td>' . \str_repeat(' ', (\substr_count(\trim($stat['name'], '/'), '/')) * 8) . $stat['name'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<input type="radio" id="media-c-tab-2" name="tabular-1">
|
<input type="radio" id="media-c-tab-2" name="tabular-1">
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
|
|
|
||||||
|
|
@ -52,12 +52,17 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
||||||
$subPath = '';
|
$subPath = '';
|
||||||
$paths = \explode('/', \ltrim($mediaPath, '/'));
|
$paths = \explode('/', \ltrim($mediaPath, '/'));
|
||||||
$length = \count($paths);
|
$length = \count($paths);
|
||||||
|
$parentPath = '';
|
||||||
|
|
||||||
for ($i = 0; $i < $length; ++$i) :
|
for ($i = 0; $i < $length; ++$i) :
|
||||||
if ($paths[$i] === '') {
|
if ($paths[$i] === '') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($i === $length - 1) {
|
||||||
|
$parentPath = $subPath === '' ? '/' : $subPath;
|
||||||
|
}
|
||||||
|
|
||||||
$subPath .= '/' . $paths[$i];
|
$subPath .= '/' . $paths[$i];
|
||||||
|
|
||||||
$url = UriFactory::build('{/prefix}media/list?path=' . $subPath);
|
$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('Creator'); ?>
|
||||||
<td><?= $this->getHtml('Created'); ?>
|
<td><?= $this->getHtml('Created'); ?>
|
||||||
<tbody>
|
<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;
|
<?php $count = 0;
|
||||||
foreach ($media as $key => $value) :
|
foreach ($media as $key => $value) :
|
||||||
++$count;
|
++$count;
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ $fileIconFunction = function (int $extensionType) : string
|
||||||
} elseif ($extensionType === ExtensionType::PDF) {
|
} elseif ($extensionType === ExtensionType::PDF) {
|
||||||
return 'file-pdf-o';
|
return 'file-pdf-o';
|
||||||
} elseif ($extensionType === ExtensionType::ARCHIVE) {
|
} elseif ($extensionType === ExtensionType::ARCHIVE) {
|
||||||
return 'file-zip';
|
return 'file-zip-o';
|
||||||
} elseif ($extensionType === ExtensionType::AUDIO) {
|
} elseif ($extensionType === ExtensionType::AUDIO) {
|
||||||
return 'file-audio-o';
|
return 'file-audio-o';
|
||||||
} elseif ($extensionType === ExtensionType::VIDEO) {
|
} elseif ($extensionType === ExtensionType::VIDEO) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user