mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-11 17:08:40 +00:00
fix urls
This commit is contained in:
parent
ca27d3e374
commit
8a1861356c
|
|
@ -5,7 +5,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Media",
|
||||
"uri": "{/prefix}media/list",
|
||||
"uri": "{/lang}/{/app}/media/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 20,
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
"type": 2,
|
||||
"subtype": 2,
|
||||
"name": "Media",
|
||||
"uri": "{/prefix}profile/single/media?{?}",
|
||||
"uri": "{/lang}/{/app}/profile/single/media?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 3,
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tbody>
|
||||
<?php $count = 0;
|
||||
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; ?>">
|
||||
<td><a href="<?= $url; ?>"><?= $type->getId(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($type->name); ?></a>
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"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": 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}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ $next = empty($this->media)
|
|||
<td><?= $this->getHtml('Created', 'Media'); ?>
|
||||
<tbody>
|
||||
<?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 = '';
|
||||
$extensionType = FileUtils::getExtensionType($value->extension);
|
||||
|
|
@ -46,7 +46,7 @@ $next = empty($this->media)
|
|||
?>
|
||||
<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('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('Extension'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->extension); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Size'); ?>"><a href="<?= $url; ?>"><?= $value->size; ?></a>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use phpOMS\Uri\UriFactory;
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ use phpOMS\Uri\UriFactory;
|
|||
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<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 class="portlet">
|
||||
|
|
|
|||
|
|
@ -30,20 +30,20 @@ $media = $this->getData('media') ?? [];
|
|||
$account = $this->getData('account');
|
||||
$accountDir = $account->getId() . ' ' . $account->login;
|
||||
|
||||
$previous = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \reset($media)->getId() . '&ptype=p';
|
||||
$next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->getId() . '&ptype=n';
|
||||
$previous = empty($media) ? '{/lang}/{/app}/media/list' : '{/lang}/{/app}/media/list?{?}&id=' . \reset($media)->getId() . '&ptype=p';
|
||||
$next = empty($media) ? '{/lang}/{/app}/media/list' : '{/lang}/{/app}/media/list?{?}&id=' . \end($media)->getId() . '&ptype=n';
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<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'); ?>
|
||||
</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'); ?>
|
||||
</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'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -54,9 +54,9 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
|
|||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<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>
|
||||
<li data-href="<?= $uri = UriFactory::build('media/list?path=/'); ?>">
|
||||
<li data-href="<?= $uri = UriFactory::build('{/lang}/{/app}/media/list?path=/'); ?>">
|
||||
<a href="<?= $uri; ?>">/</a>
|
||||
<?php
|
||||
$subPath = '';
|
||||
|
|
@ -75,7 +75,7 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
|
|||
|
||||
$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>
|
||||
|
|
@ -166,7 +166,7 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
|
|||
</label>
|
||||
<tbody>
|
||||
<?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; ?>">
|
||||
<td>
|
||||
|
|
@ -186,8 +186,8 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
|
|||
++$count;
|
||||
|
||||
$url = $value->extension === 'collection'
|
||||
? UriFactory::build('media/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name)
|
||||
: UriFactory::build('media/single?id=' . $value->getId()
|
||||
? UriFactory::build('{/lang}/{/app}/media/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name)
|
||||
: UriFactory::build('{/lang}/{/app}/media/single?id=' . $value->getId()
|
||||
. '&path={?path}' . (
|
||||
$value->getId() === 0
|
||||
? '/' . $value->name
|
||||
|
|
@ -199,9 +199,9 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
|
|||
?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td><label class="checkbox" for="iMediaSelect-<?= $key; ?>">
|
||||
<input type="checkbox" id="iMediaSelect-<?= $key; ?>" name="mediaselect">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<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'); ?>">
|
||||
|
|
@ -220,7 +220,7 @@ $next = empty($media) ? 'media/list' : 'media/list?{?}&id=' . \end($media)->
|
|||
$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('profile/single?{?}&for=' . $value->createdBy->getId()); ?>">
|
||||
<a class="content" href="<?= UriFactory::build('{/lang}/{/app}/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 ?? '']
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ echo $this->getData('nav')->render();
|
|||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<?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: ?>
|
||||
<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; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -52,8 +52,8 @@ echo $this->getData('nav')->render();
|
|||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<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('media/list?path=/'); ?>"><a href="<?= UriFactory::build('media/list?path=/'); ?>">/</a></li>
|
||||
<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('{/lang}/{/app}/media/list?path=/'); ?>"><a href="<?= UriFactory::build('{/lang}/{/app}/media/list?path=/'); ?>">/</a></li>
|
||||
<?php
|
||||
$subPath = '';
|
||||
$paths = \explode('/', \ltrim($mediaPath, '/'));
|
||||
|
|
@ -71,7 +71,7 @@ echo $this->getData('nav')->render();
|
|||
|
||||
$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>
|
||||
<?php endfor; ?>
|
||||
|
|
@ -92,7 +92,7 @@ echo $this->getData('nav')->render();
|
|||
$size = FileSizeType::autoFormat($media->size);
|
||||
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('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, ', ')
|
||||
); ?></a>
|
||||
<tr><td><?= $this->getHtml('Tags'); ?><td>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use phpOMS\Uri\UriFactory;
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user