This commit is contained in:
Dennis Eichhorn 2022-12-10 22:17:54 +01:00
parent ca27d3e374
commit 8a1861356c
10 changed files with 32 additions and 32 deletions

View File

@ -5,7 +5,7 @@
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Media", "name": "Media",
"uri": "{/prefix}media/list", "uri": "{/lang}/{/app}/media/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 20, "order": 20,
@ -21,7 +21,7 @@
"type": 2, "type": 2,
"subtype": 2, "subtype": 2,
"name": "Media", "name": "Media",
"uri": "{/prefix}profile/single/media?{?}", "uri": "{/lang}/{/app}/profile/single/media?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 3, "order": 3,

View File

@ -69,7 +69,7 @@ echo $this->getData('nav')->render(); ?>
<tbody> <tbody>
<?php $count = 0; <?php $count = 0;
foreach ($types as $key => $type) : ++$count; foreach ($types as $key => $type) : ++$count;
$url = UriFactory::build('admin/module/settings?id=Media&type=' . $type->getId()); ?> $url = UriFactory::build('{/lang}/{/app}/admin/module/settings?id=Media&type=' . $type->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>"> <tr tabindex="0" data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $type->getId(); ?></a> <td><a href="<?= $url; ?>"><?= $type->getId(); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($type->name); ?></a> <td><a href="<?= $url; ?>"><?= $this->printHtml($type->name); ?></a>

View File

@ -5,9 +5,9 @@
{ {
"key": 1, "listener": "click", "action": [ "key": 1, "listener": "click", "action": [
{"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "<?= $this->getId(); ?>"}, {"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "<?= $this->getId(); ?>"},
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"}, {"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}, {"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1},
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"}, {"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1} {"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
] ]
} }

View File

@ -38,7 +38,7 @@ $next = empty($this->media)
<td><?= $this->getHtml('Created', 'Media'); ?> <td><?= $this->getHtml('Created', 'Media'); ?>
<tbody> <tbody>
<?php $count = 0; foreach ($this->media as $key => $value) : ++$count; <?php $count = 0; foreach ($this->media as $key => $value) : ++$count;
$url = UriFactory::build('media/single?{?}&id=' . $value->getId()); $url = UriFactory::build('{/lang}/{/app}/media/single?{?}&id=' . $value->getId());
$icon = ''; $icon = '';
$extensionType = FileUtils::getExtensionType($value->extension); $extensionType = FileUtils::getExtensionType($value->extension);
@ -46,7 +46,7 @@ $next = empty($this->media)
?> ?>
<tr data-href="<?= $url; ?>"> <tr data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Type'); ?>"><a href="<?= $url; ?>"><i class="fa fa-<?= $this->printHtml($icon); ?>"></i></a> <td data-label="<?= $this->getHtml('Type'); ?>"><a href="<?= $url; ?>"><i class="fa fa-<?= $this->printHtml($icon); ?>"></i></a>
<td data-label="<?= $this->getHtml('Path'); ?>"><a class="content" href="<?= UriFactory::build('media/list?{?}&path=' . $value->getVirtualPath()); ?>"><?= $this->printHtml($value->getVirtualPath()); ?></a> <td data-label="<?= $this->getHtml('Path'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/media/list?{?}&path=' . $value->getVirtualPath()); ?>"><?= $this->printHtml($value->getVirtualPath()); ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a> <td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<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; ?>"><?= $value->size; ?></a> <td data-label="<?= $this->getHtml('Size'); ?>"><a href="<?= $url; ?>"><?= $value->size; ?></a>

View File

@ -22,7 +22,7 @@ use phpOMS\Uri\UriFactory;
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<a tabindex="0" class="button" href="<?= UriFactory::build('media/list?path={?path}'); ?>"><?= $this->getHtml('Back', '0', '0'); ?></a> <a tabindex="0" class="button" href="<?= UriFactory::build('{/lang}/{/app}/media/list?path={?path}'); ?>"><?= $this->getHtml('Back', '0', '0'); ?></a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -39,7 +39,7 @@ use phpOMS\Uri\UriFactory;
<div class="col-xs-12 col-md-4"> <div class="col-xs-12 col-md-4">
<div class="box"> <div class="box">
<a tabindex="0" class="button" href="<?= UriFactory::build('media/list?path={?path}'); ?>"><?= $this->getHtml('Back'); ?></a> <a tabindex="0" class="button" href="<?= UriFactory::build('{/lang}/{/app}/media/list?path={?path}'); ?>"><?= $this->getHtml('Back'); ?></a>
</div> </div>
<div class="portlet"> <div class="portlet">

View File

@ -30,20 +30,20 @@ $media = $this->getData('media') ?? [];
$account = $this->getData('account'); $account = $this->getData('account');
$accountDir = $account->getId() . ' ' . $account->login; $accountDir = $account->getId() . ' ' . $account->login;
$previous = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \reset($media)->getId() . '&ptype=p'; $previous = empty($media) ? '{/lang}/{/app}/media/list' : '{/lang}/{/app}/media/list?{?}&id=' . \reset($media)->getId() . '&ptype=p';
$next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->getId() . '&ptype=n'; $next = empty($media) ? '{/lang}/{/app}/media/list' : '{/lang}/{/app}/media/list?{?}&id=' . \end($media)->getId() . '&ptype=n';
?> ?>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<a tabindex="0" class="button" href="<?= UriFactory::build('media/upload?path={?path}'); ?>"> <a tabindex="0" class="button" href="<?= UriFactory::build('{/lang}/{/app}/media/upload?path={?path}'); ?>">
<?= $this->getHtml('Upload'); ?> <?= $this->getHtml('Upload'); ?>
</a> </a>
<a tabindex="0" class="button" href="<?= UriFactory::build('media/file/create?path={?path}'); ?>"> <a tabindex="0" class="button" href="<?= UriFactory::build('{/lang}/{/app}/media/file/create?path={?path}'); ?>">
<?= $this->getHtml('CreateFile'); ?> <?= $this->getHtml('CreateFile'); ?>
</a> </a>
<a tabindex="0" class="button" href="<?= UriFactory::build('media/collection/create?path={?path}'); ?>"> <a tabindex="0" class="button" href="<?= UriFactory::build('{/lang}/{/app}/media/collection/create?path={?path}'); ?>">
<?= $this->getHtml('CreateCollection'); ?> <?= $this->getHtml('CreateCollection'); ?>
</a> </a>
</div> </div>
@ -54,9 +54,9 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<ul class="crumbs-2"> <ul class="crumbs-2">
<li data-href="<?= $uri = UriFactory::build('media/list?path=/Accounts/' . $accountDir); ?>"> <li data-href="<?= $uri = UriFactory::build('{/lang}/{/app}/media/list?path=/Accounts/' . $accountDir); ?>">
<a href="<?= $uri; ?>"><i class="fa fa-home"></i></a> <a href="<?= $uri; ?>"><i class="fa fa-home"></i></a>
<li data-href="<?= $uri = UriFactory::build('media/list?path=/'); ?>"> <li data-href="<?= $uri = UriFactory::build('{/lang}/{/app}/media/list?path=/'); ?>">
<a href="<?= $uri; ?>">/</a> <a href="<?= $uri; ?>">/</a>
<?php <?php
$subPath = ''; $subPath = '';
@ -75,7 +75,7 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
$subPath .= '/' . $paths[$i]; $subPath .= '/' . $paths[$i];
$url = UriFactory::build('media/list?path=' . $subPath); $url = UriFactory::build('{/lang}/{/app}/media/list?path=' . $subPath);
?> ?>
<li data-href="<?= $url; ?>"<?= $i === $length - 1 ? 'class="active"' : ''; ?>> <li data-href="<?= $url; ?>"<?= $i === $length - 1 ? 'class="active"' : ''; ?>>
<a href="<?= $url; ?>"><?= $this->printHtml($paths[$i]); ?></a> <a href="<?= $url; ?>"><?= $this->printHtml($paths[$i]); ?></a>
@ -166,7 +166,7 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
</label> </label>
<tbody> <tbody>
<?php if (!empty($parentPath)) : <?php if (!empty($parentPath)) :
$url = UriFactory::build('media/list?path=' . $parentPath); $url = UriFactory::build('{/lang}/{/app}/media/list?path=' . $parentPath);
?> ?>
<tr tabindex="0" data-href="<?= $url; ?>"> <tr tabindex="0" data-href="<?= $url; ?>">
<td> <td>
@ -186,8 +186,8 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
++$count; ++$count;
$url = $value->extension === 'collection' $url = $value->extension === 'collection'
? UriFactory::build('media/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name) ? UriFactory::build('{/lang}/{/app}/media/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name)
: UriFactory::build('media/single?id=' . $value->getId() : UriFactory::build('{/lang}/{/app}/media/single?id=' . $value->getId()
. '&path={?path}' . ( . '&path={?path}' . (
$value->getId() === 0 $value->getId() === 0
? '/' . $value->name ? '/' . $value->name
@ -199,9 +199,9 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
?> ?>
<tr tabindex="0" data-href="<?= $url; ?>"> <tr tabindex="0" data-href="<?= $url; ?>">
<td><label class="checkbox" for="iMediaSelect-<?= $key; ?>"> <td><label class="checkbox" for="iMediaSelect-<?= $key; ?>">
<input type="checkbox" id="iMediaSelect-<?= $key; ?>" name="mediaselect"> <input type="checkbox" id="iMediaSelect-<?= $key; ?>" name="mediaselect">
<span class="checkmark"></span> <span class="checkmark"></span>
</label> </label>
<td data-label="<?= $this->getHtml('Type'); ?>"> <td data-label="<?= $this->getHtml('Type'); ?>">
<a href="<?= $url; ?>"><i class="fa fa-<?= $this->printHtml($icon); ?>"></i></a> <a href="<?= $url; ?>"><i class="fa fa-<?= $this->printHtml($icon); ?>"></i></a>
<td data-label="<?= $this->getHtml('Name'); ?>"> <td data-label="<?= $this->getHtml('Name'); ?>">
@ -220,7 +220,7 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
$size = FileSizeType::autoFormat($value->size); $size = FileSizeType::autoFormat($value->size);
echo $this->printHtml($value->extension !== 'collection' ? \number_format($size[0], 1, '.', ',') . $size[1] : ''); ?></a> echo $this->printHtml($value->extension !== 'collection' ? \number_format($size[0], 1, '.', ',') . $size[1] : ''); ?></a>
<td data-label="<?= $this->getHtml('Creator'); ?>"> <td data-label="<?= $this->getHtml('Creator'); ?>">
<a class="content" href="<?= UriFactory::build('profile/single?{?}&for=' . $value->createdBy->getId()); ?>"> <a class="content" href="<?= UriFactory::build('{/lang}/{/app}/profile/single?{?}&for=' . $value->createdBy->getId()); ?>">
<?= $this->printHtml($this->renderUserName( <?= $this->printHtml($this->renderUserName(
'%3$s %2$s %1$s', '%3$s %2$s %1$s',
[$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? ''] [$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? '']

View File

@ -40,9 +40,9 @@ echo $this->getData('nav')->render();
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<?php if ($this->request->getData('path') !== null) : ?> <?php if ($this->request->getData('path') !== null) : ?>
<a tabindex="0" class="button" href="<?= UriFactory::build('media/list?path=' . ($media->getId() === 0 ? $media->getVirtualPath() : '{?path}')); ?>"><?= $this->getHtml('Back'); ?></a> <a tabindex="0" class="button" href="<?= UriFactory::build('{/lang}/{/app}/media/list?path=' . ($media->getId() === 0 ? $media->getVirtualPath() : '{?path}')); ?>"><?= $this->getHtml('Back'); ?></a>
<?php else: ?> <?php else: ?>
<a tabindex="0" class="button" href="<?= $this->request->getReferer() !== '' ? $this->request->getReferer() : UriFactory::build('media/list'); ?>"><?= $this->getHtml('Back'); ?></a> <a tabindex="0" class="button" href="<?= $this->request->getReferer() !== '' ? $this->request->getReferer() : UriFactory::build('{/lang}/{/app}/media/list'); ?>"><?= $this->getHtml('Back'); ?></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> </div>
@ -52,8 +52,8 @@ echo $this->getData('nav')->render();
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<ul class="crumbs-2"> <ul class="crumbs-2">
<li data-href="<?= UriFactory::build('media/list?path=/Accounts/' . $accountDir); ?>"><a href="<?= UriFactory::build('media/list?path=/Accounts/' . $accountDir); ?>"><i class="fa fa-home"></i></a> <li data-href="<?= UriFactory::build('{/lang}/{/app}/media/list?path=/Accounts/' . $accountDir); ?>"><a href="<?= UriFactory::build('{/lang}/{/app}/media/list?path=/Accounts/' . $accountDir); ?>"><i class="fa fa-home"></i></a>
<li data-href="<?= UriFactory::build('media/list?path=/'); ?>"><a href="<?= UriFactory::build('media/list?path=/'); ?>">/</a></li> <li data-href="<?= UriFactory::build('{/lang}/{/app}/media/list?path=/'); ?>"><a href="<?= UriFactory::build('{/lang}/{/app}/media/list?path=/'); ?>">/</a></li>
<?php <?php
$subPath = ''; $subPath = '';
$paths = \explode('/', \ltrim($mediaPath, '/')); $paths = \explode('/', \ltrim($mediaPath, '/'));
@ -71,7 +71,7 @@ echo $this->getData('nav')->render();
$subPath .= '/' . $paths[$i]; $subPath .= '/' . $paths[$i];
$url = UriFactory::build('media/list?path=' . $subPath); $url = UriFactory::build('{/lang}/{/app}/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></li>
<?php endfor; ?> <?php endfor; ?>
@ -92,7 +92,7 @@ echo $this->getData('nav')->render();
$size = FileSizeType::autoFormat($media->size); $size = FileSizeType::autoFormat($media->size);
echo $this->printHtml(\number_format($size[0], 1, '.', ',') . $size[1]); ?> echo $this->printHtml(\number_format($size[0], 1, '.', ',') . $size[1]); ?>
<tr><td><?= $this->getHtml('Created'); ?><td><?= $this->printHtml($media->createdAt->format('Y-m-d')); ?> <tr><td><?= $this->getHtml('Created'); ?><td><?= $this->printHtml($media->createdAt->format('Y-m-d')); ?>
<tr><td><?= $this->getHtml('Creator'); ?><td><a href="<?= UriFactory::build('profile/single?for=' . $media->createdBy->getId()); ?>"><?= $this->printHtml( <tr><td><?= $this->getHtml('Creator'); ?><td><a href="<?= UriFactory::build('{/lang}/{/app}/profile/single?for=' . $media->createdBy->getId()); ?>"><?= $this->printHtml(
\ltrim($media->createdBy->name2 . ', ' . $media->createdBy->name1, ', ') \ltrim($media->createdBy->name2 . ', ' . $media->createdBy->name1, ', ')
); ?></a> ); ?></a>
<tr><td><?= $this->getHtml('Tags'); ?><td> <tr><td><?= $this->getHtml('Tags'); ?><td>

View File

@ -22,7 +22,7 @@ use phpOMS\Uri\UriFactory;
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<a tabindex="0" class="button" href="<?= UriFactory::build('media/list?path={?path}'); ?>"><?= $this->getHtml('Back', '0', '0'); ?></a> <a tabindex="0" class="button" href="<?= UriFactory::build('{/lang}/{/app}/media/list?path={?path}'); ?>"><?= $this->getHtml('Back', '0', '0'); ?></a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -12,7 +12,7 @@
}, },
"creator": { "creator": {
"name": "Karaka", "name": "Karaka",
"website": "www.spl1nes.com" "website": "jingga.app"
}, },
"description": "The profile module.", "description": "The profile module.",
"directory": "Media", "directory": "Media",