mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-15 08:48:42 +00:00
autofixes
This commit is contained in:
parent
aaa4de2adc
commit
4ea01e2175
|
|
@ -28,7 +28,6 @@ use phpOMS\Message\ResponseAbstract;
|
||||||
*/
|
*/
|
||||||
trait FileUploaderTrait
|
trait FileUploaderTrait
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup file uploader.
|
* Setup file uploader.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -340,7 +340,7 @@ class Media implements \JsonSerializable
|
||||||
return $this->isAbsolute ? $this->path : \ltrim($this->path, '\\/');
|
return $this->isAbsolute ? $this->path : \ltrim($this->path, '\\/');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ use phpOMS\Stdlib\Base\Enum;
|
||||||
abstract class PathSettings extends Enum
|
abstract class PathSettings extends Enum
|
||||||
{
|
{
|
||||||
public const FILE_PATH = 1;
|
public const FILE_PATH = 1;
|
||||||
|
|
||||||
public const RANDOM_PATH = 2;
|
public const RANDOM_PATH = 2;
|
||||||
|
|
||||||
public const COLLECTION_PATH = 3;
|
public const COLLECTION_PATH = 3;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,5 +27,6 @@ use phpOMS\Stdlib\Base\Enum;
|
||||||
abstract class PermissionState extends Enum
|
abstract class PermissionState extends Enum
|
||||||
{
|
{
|
||||||
public const MEDIA = 1;
|
public const MEDIA = 1;
|
||||||
|
|
||||||
public const COLLECTION = 2;
|
public const COLLECTION = 2;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,24 @@ use phpOMS\Stdlib\Base\Enum;
|
||||||
abstract class UploadStatus extends Enum
|
abstract class UploadStatus extends Enum
|
||||||
{
|
{
|
||||||
public const OK = 0;
|
public const OK = 0;
|
||||||
|
|
||||||
public const WRONG_PARAMETERS = -1;
|
public const WRONG_PARAMETERS = -1;
|
||||||
|
|
||||||
public const NOTHING_UPLOADED = -2;
|
public const NOTHING_UPLOADED = -2;
|
||||||
|
|
||||||
public const UPLOAD_SIZE = -3;
|
public const UPLOAD_SIZE = -3;
|
||||||
|
|
||||||
public const UNKNOWN_ERROR = -4;
|
public const UNKNOWN_ERROR = -4;
|
||||||
|
|
||||||
public const CONFIG_SIZE = -5;
|
public const CONFIG_SIZE = -5;
|
||||||
|
|
||||||
public const WRONG_EXTENSION = -6;
|
public const WRONG_EXTENSION = -6;
|
||||||
|
|
||||||
public const NOT_UPLOADED = -7;
|
public const NOT_UPLOADED = -7;
|
||||||
|
|
||||||
public const NOT_MOVABLE = -8;
|
public const NOT_MOVABLE = -8;
|
||||||
|
|
||||||
public const FAILED_HASHING = -9;
|
public const FAILED_HASHING = -9;
|
||||||
|
|
||||||
public const NOT_ENCRYPTABLE = -10;
|
public const NOT_ENCRYPTABLE = -10;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="ipt-second"><button><?= $this->getHtml('Select', 'Media') ?></button></div>
|
<div class="ipt-second"><button><?= $this->getHtml('Select', 'Media'); ?></button></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box" id="<?= $this->printHtml($this->getId()); ?>-tags" data-limit="0" data-active="true">
|
<div class="box" id="<?= $this->printHtml($this->getId()); ?>-tags" data-limit="0" data-active="true">
|
||||||
<template id="<?= $this->printHtml($this->getId()); ?>-tagTemplate">
|
<template id="<?= $this->printHtml($this->getId()); ?>-tagTemplate">
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,15 @@ use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Media', 'Media') ?><i class="fa fa-download floatRight download btn"></i></div>
|
<div class="portlet-head"><?= $this->getHtml('Media', 'Media'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||||
<table class="default">
|
<table class="default">
|
||||||
<thead>
|
<thead>
|
||||||
<td>
|
<td>
|
||||||
<td class="wf-100"><?= $this->getHtml('Name', 'Media') ?>
|
<td class="wf-100"><?= $this->getHtml('Name', 'Media'); ?>
|
||||||
<td><?= $this->getHtml('Type', 'Media') ?>
|
<td><?= $this->getHtml('Type', 'Media'); ?>
|
||||||
<td><?= $this->getHtml('Size', 'Media') ?>
|
<td><?= $this->getHtml('Size', 'Media'); ?>
|
||||||
<td><?= $this->getHtml('Creator', 'Media') ?>
|
<td><?= $this->getHtml('Creator', '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('{/prefix}media/single?{?}&id=' . $value->getId());
|
$url = UriFactory::build('{/prefix}media/single?{?}&id=' . $value->getId());
|
||||||
|
|
@ -46,12 +46,12 @@ use phpOMS\Uri\UriFactory;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<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('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Extension') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getExtension()); ?></a>
|
<td data-label="<?= $this->getHtml('Extension'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getExtension()); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Size') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getSize()); ?></a>
|
<td data-label="<?= $this->getHtml('Size'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getSize()); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Creator') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedBy()->getName1()); ?></a>
|
<td data-label="<?= $this->getHtml('Creator'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedBy()->getName1()); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Created') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a>
|
<td data-label="<?= $this->getHtml('Created'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php if ($count === 0) : ?>
|
<?php if ($count === 0) : ?>
|
||||||
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table class="layout wf-100">
|
<table class="layout wf-100">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td><label for="iMedia"><?= $this->getHtml('Media') ?></label>
|
<tr><td><label for="iMedia"><?= $this->getHtml('Media'); ?></label>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<div class="ipt-wrap">
|
<div class="ipt-wrap">
|
||||||
<div class="ipt-first">
|
<div class="ipt-first">
|
||||||
|
|
@ -37,9 +37,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ipt-second"><button><?= $this->getHtml('Select', 'Media') ?></button></div>
|
<div class="ipt-second"><button><?= $this->getHtml('Select', 'Media'); ?></button></div>
|
||||||
</div>
|
</div>
|
||||||
<tr><td><label for="iUpload"><?= $this->getHtml('Upload', 'Media') ?></label>
|
<tr><td><label for="iUpload"><?= $this->getHtml('Upload', 'Media'); ?></label>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<input type="hidden" name="virtualPath" form="<?= $this->form; ?>" value="<?= $this->virtualPath; ?>">
|
<input type="hidden" name="virtualPath" form="<?= $this->form; ?>" value="<?= $this->virtualPath; ?>">
|
||||||
<input type="file" id="iUpload" name="upload" form="<?= $this->form; ?>" multiple>
|
<input type="file" id="iUpload" name="upload" form="<?= $this->form; ?>" multiple>
|
||||||
|
|
|
||||||
|
|
@ -36,21 +36,21 @@ use phpOMS\Uri\UriFactory;
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
<form method="PUT" id="media-uploader" action="<?= UriFactory::build('{/api}media/collection'); ?>">
|
<form method="PUT" id="media-uploader" action="<?= UriFactory::build('{/api}media/collection'); ?>">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('CreateCollection') ?></div>
|
<div class="portlet-head"><?= $this->getHtml('CreateCollection'); ?></div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table class="layout wf-100">
|
<table class="layout wf-100">
|
||||||
<tr><td><label for="iVirtualPath"><?= $this->getHtml('VirtualPath') ?></label>
|
<tr><td><label for="iVirtualPath"><?= $this->getHtml('VirtualPath'); ?></label>
|
||||||
<tr><td><input type="text" id="iVirtualPath" name="virtualPath" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>" disabled>
|
<tr><td><input type="text" id="iVirtualPath" name="virtualPath" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>" disabled>
|
||||||
<tr><td><label for="iPath"><?= $this->getHtml('Path') ?></label>
|
<tr><td><label for="iPath"><?= $this->getHtml('Path'); ?></label>
|
||||||
<tr><td><input type="text" id="iPath" name="path" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>">
|
<tr><td><input type="text" id="iPath" name="path" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>">
|
||||||
<tr><td><label><?= $this->getHtml('Settings') ?></label>
|
<tr><td><label><?= $this->getHtml('Settings'); ?></label>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<label class="checkbox" for="iAddCollection">
|
<label class="checkbox" for="iAddCollection">
|
||||||
<input type="checkbox" id="iAddCollection" name="addcollection" checked>
|
<input type="checkbox" id="iAddCollection" name="addcollection" checked>
|
||||||
<span class="checkmark"></span>
|
<span class="checkmark"></span>
|
||||||
<?= $this->getHtml('AddToCollection') ?>
|
<?= $this->getHtml('AddToCollection'); ?>
|
||||||
</label>
|
</label>
|
||||||
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
|
<tr><td><label for="iName"><?= $this->getHtml('Name'); ?></label>
|
||||||
<tr><td><input type="text" id="iName" name="name" multiple>
|
<tr><td><input type="text" id="iName" name="name" multiple>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -47,21 +47,21 @@ use phpOMS\Uri\UriFactory;
|
||||||
<div class="portlet-head"><?= $this->getHtml('Settings'); ?></div>
|
<div class="portlet-head"><?= $this->getHtml('Settings'); ?></div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table class="layout wf-100">
|
<table class="layout wf-100">
|
||||||
<tr><td><label for="iVirtualPath"><?= $this->getHtml('VirtualPath') ?></label>
|
<tr><td><label for="iVirtualPath"><?= $this->getHtml('VirtualPath'); ?></label>
|
||||||
<tr><td><input type="text" id="iVirtualPath" name="virtualPath" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>" disabled>
|
<tr><td><input type="text" id="iVirtualPath" name="virtualPath" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>" disabled>
|
||||||
<tr><td><label for="iPath"><?= $this->getHtml('Path') ?></label>
|
<tr><td><label for="iPath"><?= $this->getHtml('Path'); ?></label>
|
||||||
<tr><td><input type="text" id="iPath" name="path" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>">
|
<tr><td><input type="text" id="iPath" name="path" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>">
|
||||||
<tr><td><label><?= $this->getHtml('Settings') ?></label>
|
<tr><td><label><?= $this->getHtml('Settings'); ?></label>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<label class="checkbox" for="iAddCollection">
|
<label class="checkbox" for="iAddCollection">
|
||||||
<input type="checkbox" id="iAddCollection" name="addcollection" checked>
|
<input type="checkbox" id="iAddCollection" name="addcollection" checked>
|
||||||
<span class="checkmark"></span>
|
<span class="checkmark"></span>
|
||||||
<?= $this->getHtml('AddToCollection') ?>
|
<?= $this->getHtml('AddToCollection'); ?>
|
||||||
</label>
|
</label>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-foot">
|
<div class="portlet-foot">
|
||||||
<input type="submit" value="<?= $this->getHtml('Save', '0', '0') ?>">
|
<input type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
||||||
|
|
||||||
$url = UriFactory::build('{/prefix}media/list?path=' . $subPath);
|
$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></li>
|
||||||
<?php endfor; ?>
|
<?php endfor; ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -71,16 +71,16 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="portlet">
|
<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>
|
||||||
<table id="mediaList" class="default">
|
<table id="mediaList" class="default">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<td class="wf-100"><?= $this->getHtml('Name') ?>
|
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
||||||
<td><?= $this->getHtml('Type') ?>
|
<td><?= $this->getHtml('Type'); ?>
|
||||||
<td><?= $this->getHtml('Size') ?>
|
<td><?= $this->getHtml('Size'); ?>
|
||||||
<td><?= $this->getHtml('Creator') ?>
|
<td><?= $this->getHtml('Creator'); ?>
|
||||||
<td><?= $this->getHtml('Created') ?>
|
<td><?= $this->getHtml('Created'); ?>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php $count = 0;
|
<?php $count = 0;
|
||||||
foreach ($media as $key => $value) :
|
foreach ($media as $key => $value) :
|
||||||
|
|
@ -99,18 +99,18 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
||||||
$icon = $fileIconFunction(FileUtils::getExtensionType($value->getExtension()));
|
$icon = $fileIconFunction(FileUtils::getExtensionType($value->getExtension()));
|
||||||
?>
|
?>
|
||||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
<tr tabindex="0" 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('Name') ?>"><a href="<?= $url; ?>">
|
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>">
|
||||||
<?= $this->printHtml(
|
<?= $this->printHtml(
|
||||||
$value->getExtension() !== 'collection'
|
$value->getExtension() !== 'collection'
|
||||||
? $value->getName() . (
|
? $value->getName() . (
|
||||||
$value->getExtension() !== '' ? '.' . $value->getExtension() : ''
|
$value->getExtension() !== '' ? '.' . $value->getExtension() : ''
|
||||||
) : $value->getName()); ?>
|
) : $value->getName()); ?>
|
||||||
</a>
|
</a>
|
||||||
<td data-label="<?= $this->getHtml('Extension') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getExtension()); ?></a>
|
<td data-label="<?= $this->getHtml('Extension'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getExtension()); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Size') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getSize()); ?></a>
|
<td data-label="<?= $this->getHtml('Size'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getSize()); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Creator') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedBy()->getName1()); ?></a>
|
<td data-label="<?= $this->getHtml('Creator'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedBy()->getName1()); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Created') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a>
|
<td data-label="<?= $this->getHtml('Created'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php if ($count === 0) : ?>
|
<?php if ($count === 0) : ?>
|
||||||
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||||
|
|
|
||||||
|
|
@ -43,11 +43,11 @@ echo $this->getData('nav')->render();
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table class="list w-100">
|
<table class="list w-100">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td><?= $this->getHtml('Name') ?><td class="wf-100"><?= $this->printHtml($media->getName()); ?>
|
<tr><td><?= $this->getHtml('Name'); ?><td class="wf-100"><?= $this->printHtml($media->getName()); ?>
|
||||||
<tr><td><?= $this->getHtml('Size') ?><td class="wf-100"><?= $this->printHtml($media->getSize()); ?>
|
<tr><td><?= $this->getHtml('Size'); ?><td class="wf-100"><?= $this->printHtml($media->getSize()); ?>
|
||||||
<tr><td><?= $this->getHtml('Created') ?><td><?= $this->printHtml($media->getCreatedAt()->format('Y-m-d')); ?>
|
<tr><td><?= $this->getHtml('Created'); ?><td><?= $this->printHtml($media->getCreatedAt()->format('Y-m-d')); ?>
|
||||||
<tr><td><?= $this->getHtml('Creator') ?><td><?= $this->printHtml($media->getCreatedBy()->getName1()); ?>
|
<tr><td><?= $this->getHtml('Creator'); ?><td><?= $this->printHtml($media->getCreatedBy()->getName1()); ?>
|
||||||
<tr><td colspan="2"><?= $this->getHtml('Description') ?>
|
<tr><td colspan="2"><?= $this->getHtml('Description'); ?>
|
||||||
<tr><td colspan="2"><?= $media->getDescription(); ?>
|
<tr><td colspan="2"><?= $media->getDescription(); ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -61,9 +61,9 @@ echo $this->getData('nav')->render();
|
||||||
data-tag="form"
|
data-tag="form"
|
||||||
data-method="POST"
|
data-method="POST"
|
||||||
data-uri="<?= UriFactory::build('{/api}media?{?}&csrf={$CSRF}'); ?>">
|
data-uri="<?= UriFactory::build('{/api}media?{?}&csrf={$CSRF}'); ?>">
|
||||||
<button class="save hidden"><?= $this->getHtml('Save', '0', '0') ?></button>
|
<button class="save hidden"><?= $this->getHtml('Save', '0', '0'); ?></button>
|
||||||
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0') ?></button>
|
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0'); ?></button>
|
||||||
<button class="update"><?= $this->getHtml('Edit', '0', '0') ?></button>
|
<button class="update"><?= $this->getHtml('Edit', '0', '0'); ?></button>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -75,15 +75,15 @@ echo $this->getData('nav')->render();
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<table class="default">
|
<table class="default">
|
||||||
<caption><?= $this->getHtml('Media') ?><i class="fa fa-download floatRight download btn"></i></caption>
|
<caption><?= $this->getHtml('Media'); ?><i class="fa fa-download floatRight download btn"></i></caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<td class="wf-100"><?= $this->getHtml('Name') ?>
|
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
||||||
<td><?= $this->getHtml('Type') ?>
|
<td><?= $this->getHtml('Type'); ?>
|
||||||
<td><?= $this->getHtml('Size') ?>
|
<td><?= $this->getHtml('Size'); ?>
|
||||||
<td><?= $this->getHtml('Creator') ?>
|
<td><?= $this->getHtml('Creator'); ?>
|
||||||
<td><?= $this->getHtml('Created') ?>
|
<td><?= $this->getHtml('Created'); ?>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
if (!\is_dir($media->isAbsolute() ? $media->getPath() : __DIR__ . '/../../../../' . \ltrim($media->getPath(), '//'))
|
if (!\is_dir($media->isAbsolute() ? $media->getPath() : __DIR__ . '/../../../../' . \ltrim($media->getPath(), '//'))
|
||||||
|
|
|
||||||
|
|
@ -36,21 +36,21 @@ use phpOMS\Uri\UriFactory;
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
<form method="PUT" id="media-uploader" action="<?= UriFactory::build('{/api}media'); ?>">
|
<form method="PUT" id="media-uploader" action="<?= UriFactory::build('{/api}media'); ?>">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Upload') ?></div>
|
<div class="portlet-head"><?= $this->getHtml('Upload'); ?></div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table class="layout wf-100">
|
<table class="layout wf-100">
|
||||||
<tr><td><label for="iVirtualPath"><?= $this->getHtml('VirtualPath') ?></label>
|
<tr><td><label for="iVirtualPath"><?= $this->getHtml('VirtualPath'); ?></label>
|
||||||
<tr><td><input type="text" id="iVirtualPath" name="virtualPath" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>" disabled>
|
<tr><td><input type="text" id="iVirtualPath" name="virtualPath" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>" disabled>
|
||||||
<tr><td><label for="iPath"><?= $this->getHtml('Path') ?></label>
|
<tr><td><label for="iPath"><?= $this->getHtml('Path'); ?></label>
|
||||||
<tr><td><input type="text" id="iPath" name="path" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>">
|
<tr><td><input type="text" id="iPath" name="path" value="<?= empty($this->request->getUri()->getQuery('path')) ? '/' : $this->request->getUri()->getQuery('path'); ?>">
|
||||||
<tr><td><label><?= $this->getHtml('Settings') ?></label>
|
<tr><td><label><?= $this->getHtml('Settings'); ?></label>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<label class="checkbox" for="iAddCollection">
|
<label class="checkbox" for="iAddCollection">
|
||||||
<input type="checkbox" id="iAddCollection" name="addcollection" checked>
|
<input type="checkbox" id="iAddCollection" name="addcollection" checked>
|
||||||
<span class="checkmark"></span>
|
<span class="checkmark"></span>
|
||||||
<?= $this->getHtml('AddToCollection') ?>
|
<?= $this->getHtml('AddToCollection'); ?>
|
||||||
</label>
|
</label>
|
||||||
<tr><td><label for="iFiles"><?= $this->getHtml('Files') ?></label>
|
<tr><td><label for="iFiles"><?= $this->getHtml('Files'); ?></label>
|
||||||
<tr><td><input type="file" id="iFiles" name="files" multiple>
|
<tr><td><input type="file" id="iFiles" name="files" multiple>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ namespace Modules\Media\tests\Admin;
|
||||||
class AdminTest extends \PHPUnit\Framework\TestCase
|
class AdminTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
protected const MODULE_NAME = 'Media';
|
protected const MODULE_NAME = 'Media';
|
||||||
|
|
||||||
protected const URI_LOAD = 'http://127.0.0.1/en/backend/media';
|
protected const URI_LOAD = 'http://127.0.0.1/en/backend/media';
|
||||||
|
|
||||||
use \Modules\tests\ModuleTestTrait;
|
use \Modules\tests\ModuleTestTrait;
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ use phpOMS\Router\WebRouter;
|
||||||
class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
protected $app = null;
|
protected $app = null;
|
||||||
|
|
||||||
protected $module = null;
|
protected $module = null;
|
||||||
|
|
||||||
protected function setUp() : void
|
protected function setUp() : void
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user