mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-04 03:38:41 +00:00
fix img. minification action
This commit is contained in:
parent
968fc5ffef
commit
9a4c4495df
2
.github/workflows/image.yml
vendored
2
.github/workflows/image.yml
vendored
|
|
@ -19,6 +19,6 @@ jobs:
|
|||
uses: actions/checkout@master
|
||||
|
||||
- name: Compress Images
|
||||
uses: calibreapp/image-actions@master
|
||||
uses: calibreapp/image-actions@main
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -12,8 +12,6 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use Modules\Media\Models\MediaClass;
|
||||
use Modules\Media\Models\Reference;
|
||||
use phpOMS\System\File\FileUtils;
|
||||
use phpOMS\Uri\UriFactory;
|
||||
use phpOMS\Utils\Converter\FileSizeType;
|
||||
|
|
@ -39,9 +37,15 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<a tabindex="0" class="button" href="<?= UriFactory::build('{/prefix}media/upload?path={?path}'); ?>"><?= $this->getHtml('Upload'); ?></a>
|
||||
<a tabindex="0" class="button" href="<?= UriFactory::build('{/prefix}media/file/create?path={?path}'); ?>"><?= $this->getHtml('CreateFile'); ?></a>
|
||||
<a tabindex="0" class="button" href="<?= UriFactory::build('{/prefix}media/collection/create?path={?path}'); ?>"><?= $this->getHtml('CreateCollection'); ?></a>
|
||||
<a tabindex="0" class="button" href="<?= UriFactory::build('{/prefix}media/upload?path={?path}'); ?>">
|
||||
<?= $this->getHtml('Upload'); ?>
|
||||
</a>
|
||||
<a tabindex="0" class="button" href="<?= UriFactory::build('{/prefix}media/file/create?path={?path}'); ?>">
|
||||
<?= $this->getHtml('CreateFile'); ?>
|
||||
</a>
|
||||
<a tabindex="0" class="button" href="<?= UriFactory::build('{/prefix}media/collection/create?path={?path}'); ?>">
|
||||
<?= $this->getHtml('CreateCollection'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -50,8 +54,10 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
|||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<ul class="crumbs-2">
|
||||
<li data-href="<?= UriFactory::build('{/prefix}media/list?path=/Accounts/' . $accountDir); ?>"><a href="<?= UriFactory::build('{/prefix}media/list?path=/Accounts/' . $accountDir); ?>"><i class="fa fa-home"></i></a>
|
||||
<li data-href="<?= UriFactory::build('{/prefix}media/list?path=/'); ?>"><a href="<?= UriFactory::build('{/prefix}media/list?path=/'); ?>">/</a></li>
|
||||
<li data-href="<?= $uri = UriFactory::build('{/prefix}media/list?path=/Accounts/' . $accountDir); ?>">
|
||||
<a href="<?= $uri; ?>"><i class="fa fa-home"></i></a>
|
||||
<li data-href="<?= $uri = UriFactory::build('{/prefix}media/list?path=/'); ?>">
|
||||
<a href="<?= $uri; ?>">/</a>
|
||||
<?php
|
||||
$subPath = '';
|
||||
$paths = \explode('/', \ltrim($mediaPath, '/'));
|
||||
|
|
@ -71,7 +77,8 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
|||
|
||||
$url = UriFactory::build('{/prefix}media/list?path=' . $subPath);
|
||||
?>
|
||||
<li data-href="<?= $url; ?>"<?= $i === $length - 1 ? 'class="active"' : ''; ?>><a href="<?= $url; ?>"><?= $this->printHtml($paths[$i]); ?></a></li>
|
||||
<li data-href="<?= $url; ?>"<?= $i === $length - 1 ? 'class="active"' : ''; ?>>
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($paths[$i]); ?></a>
|
||||
<?php endfor; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -81,7 +88,9 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Media'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<div class="portlet-head">
|
||||
<?= $this->getHtml('Media'); ?><i class="fa fa-download floatRight download btn"></i>
|
||||
</div>
|
||||
<div class="slider">
|
||||
<table id="iMediaList" class="default sticky">
|
||||
<thead>
|
||||
|
|
@ -156,11 +165,15 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
|||
<i class="filter fa fa-filter"></i>
|
||||
</label>
|
||||
<tbody>
|
||||
<?php if (!empty($parentPath)) : $url = UriFactory::build('{/prefix}media/list?path=' . $parentPath); ?>
|
||||
<?php if (!empty($parentPath)) :
|
||||
$url = UriFactory::build('{/prefix}media/list?path=' . $parentPath);
|
||||
?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td>
|
||||
<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; ?>">..
|
||||
<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>
|
||||
|
|
@ -189,21 +202,32 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
|||
<input type="checkbox" id="iMediaSelect-<?= $key; ?>" name="mediaselect">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<td data-label="<?= $this->getHtml('Type'); ?>"><a href="<?= $url; ?>"><i class="fa fa-<?= $this->printHtml($icon); ?>"></i></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>">
|
||||
<?= $this->printHtml($value->name); ?>
|
||||
</a>
|
||||
<td data-label="<?= $this->getHtml('Type'); ?>">
|
||||
<a href="<?= $url; ?>"><i class="fa fa-<?= $this->printHtml($icon); ?>"></i></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Tag'); ?>"><?php $tags = $value->getTags(); foreach ($tags as $tag) : ?>
|
||||
<a href="<?= $url; ?>">
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>">
|
||||
<?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?>
|
||||
<?= $this->printHtml($tag->getL11n()); ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<td data-label="<?= $this->getHtml('Extension'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->extension); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Extension'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($value->extension); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Size'); ?>"><a href="<?= $url; ?>"><?php
|
||||
$size = FileSizeType::autoFormat($value->size);
|
||||
echo $this->printHtml($value->extension !== 'collection' ? \number_format($size[0], 1, '.', ',') . $size[1] : ''); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>"><a class="content" href="<?= UriFactory::build('{/prefix}profile/single?{?}&for=' . $value->createdBy->getId()); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? ''])); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Created'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->createdAt->format('Y-m-d')); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>">
|
||||
<a class="content" href="<?= UriFactory::build('{/prefix}profile/single?{?}&for=' . $value->createdBy->getId()); ?>">
|
||||
<?= $this->printHtml($this->renderUserName(
|
||||
'%3$s %2$s %1$s',
|
||||
[$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? '']
|
||||
)); ?>
|
||||
</a>
|
||||
<td data-label="<?= $this->getHtml('Created'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($value->createdAt->format('Y-m-d')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
<tr><td colspan="8" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
|
|
@ -213,7 +237,9 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
|||
<div class="portlet-foot">
|
||||
<a tabindex="0" class="button" href="<?= UriFactory::build($previous); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a>
|
||||
<a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
|
||||
<a tabindex="0" class="button floatRight" href="<?= UriFactory::build('{/prefix}api/media/download'); ?>"><?= $this->getHtml('Download', '0', '0'); ?></a>
|
||||
<a tabindex="0" class="button floatRight" href="<?= UriFactory::build('{/prefix}api/media/download'); ?>">
|
||||
<?= $this->getHtml('Download', '0', '0'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user