mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-18 10:18:41 +00:00
Merge branch 'develop' of https://github.com/Karaka-Management/oms-Media into develop
This commit is contained in:
commit
8017102944
|
|
@ -18,9 +18,9 @@ use phpOMS\Uri\UriFactory;
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \phpOMS\Views\View $this
|
||||||
* @var \Modules\Media\Models\MediaType[] $types
|
* @var \Modules\Media\Models\MediaType[] $types
|
||||||
*/
|
*/
|
||||||
$types = $this->getData('types') ?? [];
|
$types = $this->data['types'] ?? [];
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->data['nav']->render(); ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ final class ApiController extends Controller
|
||||||
$uploads = $this->uploadFiles(
|
$uploads = $this->uploadFiles(
|
||||||
names: $request->getDataList('names'),
|
names: $request->getDataList('names'),
|
||||||
fileNames: $request->getDataList('filenames'),
|
fileNames: $request->getDataList('filenames'),
|
||||||
files: $request->getFiles(),
|
files: $request->files,
|
||||||
account: $request->header->account,
|
account: $request->header->account,
|
||||||
basePath: __DIR__ . '/../../../Modules/Media/Files' . \urldecode($request->getDataString('path') ?? ''),
|
basePath: __DIR__ . '/../../../Modules/Media/Files' . \urldecode($request->getDataString('path') ?? ''),
|
||||||
virtualPath: \urldecode($request->getDataString('virtualpath') ?? ''),
|
virtualPath: \urldecode($request->getDataString('virtualpath') ?? ''),
|
||||||
|
|
@ -633,7 +633,7 @@ final class ApiController extends Controller
|
||||||
public function apiReferenceCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiReferenceCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateReferenceCreate($request))) {
|
if (!empty($val = $this->validateReferenceCreate($request))) {
|
||||||
$response->set('collection_create', new FormValidation($val));
|
$response->data['collection_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -770,7 +770,7 @@ final class ApiController extends Controller
|
||||||
public function apiCollectionCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiCollectionCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateCollectionCreate($request))) {
|
if (!empty($val = $this->validateCollectionCreate($request))) {
|
||||||
$response->set('collection_create', new FormValidation($val));
|
$response->data['collection_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -1132,7 +1132,7 @@ final class ApiController extends Controller
|
||||||
|
|
||||||
$this->setMediaResponseHeader($media, $request, $response);
|
$this->setMediaResponseHeader($media, $request, $response);
|
||||||
$view = $this->createView($media, $request, $response);
|
$view = $this->createView($media, $request, $response);
|
||||||
$view->setData('path', __DIR__ . '/../../../');
|
$view->data['path'] = __DIR__ . '/../../../';
|
||||||
|
|
||||||
$response->set('export', $view);
|
$response->set('export', $view);
|
||||||
}
|
}
|
||||||
|
|
@ -1183,7 +1183,7 @@ final class ApiController extends Controller
|
||||||
public function createView(Media $media, RequestAbstract $request, ResponseAbstract $response) : View
|
public function createView(Media $media, RequestAbstract $request, ResponseAbstract $response) : View
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setData('media', $media);
|
$view->data['media'] = $media;
|
||||||
|
|
||||||
if (!\headers_sent()) {
|
if (!\headers_sent()) {
|
||||||
$response->endAllOutputBuffering(); // for large files
|
$response->endAllOutputBuffering(); // for large files
|
||||||
|
|
@ -1202,7 +1202,7 @@ final class ApiController extends Controller
|
||||||
$head->setStyle('core', $css ?? '');
|
$head->setStyle('core', $css ?? '');
|
||||||
|
|
||||||
$head->addAsset(AssetType::CSS, 'cssOMS/styles.css?v=1.0.0');
|
$head->addAsset(AssetType::CSS, 'cssOMS/styles.css?v=1.0.0');
|
||||||
$view->setData('head', $head);
|
$view->data['head'] = $head;
|
||||||
|
|
||||||
switch (\strtolower($media->extension)) {
|
switch (\strtolower($media->extension)) {
|
||||||
case 'xls':
|
case 'xls':
|
||||||
|
|
@ -1341,7 +1341,7 @@ final class ApiController extends Controller
|
||||||
public function apiMediaTypeCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiMediaTypeCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateMediaTypeCreate($request))) {
|
if (!empty($val = $this->validateMediaTypeCreate($request))) {
|
||||||
$response->set('media_type_create', new FormValidation($val));
|
$response->data['media_type_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -1370,7 +1370,7 @@ final class ApiController extends Controller
|
||||||
if ($request->hasData('title')) {
|
if ($request->hasData('title')) {
|
||||||
$type->setL11n(
|
$type->setL11n(
|
||||||
$request->getDataString('title') ?? '',
|
$request->getDataString('title') ?? '',
|
||||||
$request->getDataString('lang') ?? $request->getLanguage()
|
$request->getDataString('lang') ?? $request->header->l11n->language
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1414,7 +1414,7 @@ final class ApiController extends Controller
|
||||||
public function apiMediaTypeL11nCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiMediaTypeL11nCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateMediaTypeL11nCreate($request))) {
|
if (!empty($val = $this->validateMediaTypeL11nCreate($request))) {
|
||||||
$response->set('media_type_l11n_create', new FormValidation($val));
|
$response->data['media_type_l11n_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -1441,7 +1441,7 @@ final class ApiController extends Controller
|
||||||
$l11nMediaType->ref = $request->getDataInt('type') ?? 0;
|
$l11nMediaType->ref = $request->getDataInt('type') ?? 0;
|
||||||
$l11nMediaType->content = $request->getDataString('title') ?? '';
|
$l11nMediaType->content = $request->getDataString('title') ?? '';
|
||||||
$l11nMediaType->setLanguage(
|
$l11nMediaType->setLanguage(
|
||||||
$request->getDataString('language') ?? $request->getLanguage()
|
$request->getDataString('language') ?? $request->header->l11n->language
|
||||||
);
|
);
|
||||||
|
|
||||||
return $l11nMediaType;
|
return $l11nMediaType;
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ final class BackendController extends Controller
|
||||||
PermissionCategory::MEDIA,
|
PermissionCategory::MEDIA,
|
||||||
);
|
);
|
||||||
|
|
||||||
$mediaMapper = MediaMapper::getByVirtualPath($path)->where('tags/title/language', $request->getLanguage());
|
$mediaMapper = MediaMapper::getByVirtualPath($path)->where('tags/title/language', $request->header->l11n->language);
|
||||||
|
|
||||||
if (!$hasPermission) {
|
if (!$hasPermission) {
|
||||||
$permWhere = PermissionAbstractMapper::helper($this->app->dbPool->get('select'))
|
$permWhere = PermissionAbstractMapper::helper($this->app->dbPool->get('select'))
|
||||||
|
|
@ -104,7 +104,7 @@ final class BackendController extends Controller
|
||||||
/** @var Media[] $media */
|
/** @var Media[] $media */
|
||||||
$media = $mediaMapper->execute();
|
$media = $mediaMapper->execute();
|
||||||
|
|
||||||
$collectionMapper = CollectionMapper::getParentCollection($path)->where('tags/title/language', $request->getLanguage());
|
$collectionMapper = CollectionMapper::getParentCollection($path)->where('tags/title/language', $request->header->l11n->language);
|
||||||
|
|
||||||
if (!$hasPermission) {
|
if (!$hasPermission) {
|
||||||
$permWhere = PermissionAbstractMapper::helper($this->app->dbPool->get('select'))
|
$permWhere = PermissionAbstractMapper::helper($this->app->dbPool->get('select'))
|
||||||
|
|
@ -183,9 +183,9 @@ final class BackendController extends Controller
|
||||||
$media = \array_merge($media, $unIndexedFiles);
|
$media = \array_merge($media, $unIndexedFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->addData('media', $media);
|
$view->data['media'] = $media;
|
||||||
$view->addData('path', $path);
|
$view->data['path'] = $path;
|
||||||
$view->addData('account', $this->app->accountManager->get($request->header->account));
|
$view->data['account'] = $this->app->accountManager->get($request->header->account);
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -206,7 +206,7 @@ final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
$view = new MediaView($this->app->l11nManager, $request, $response);
|
$view = new MediaView($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/Media/Theme/Backend/media-single');
|
$view->setTemplate('/Modules/Media/Theme/Backend/media-single');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000401001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1000401001, $request, $response);
|
||||||
|
|
||||||
$id = $request->getDataInt('id');
|
$id = $request->getDataInt('id');
|
||||||
if ($id === 0) {
|
if ($id === 0) {
|
||||||
|
|
@ -222,7 +222,7 @@ final class BackendController extends Controller
|
||||||
$media->setPath('/Modules/Media/Files/' . \ltrim($path, '\\/'));
|
$media->setPath('/Modules/Media/Files/' . \ltrim($path, '\\/'));
|
||||||
$media->isAbsolute = false;
|
$media->isAbsolute = false;
|
||||||
|
|
||||||
$view->addData('view', $this->createMediaView($media, $request, $response));
|
$view->data['view'] = $this->createMediaView($media, $request, $response);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/** @var \Modules\Media\Models\Media $media */
|
/** @var \Modules\Media\Models\Media $media */
|
||||||
|
|
@ -232,20 +232,20 @@ final class BackendController extends Controller
|
||||||
->with('tags/title')
|
->with('tags/title')
|
||||||
->with('content')
|
->with('content')
|
||||||
->where('id', $id)
|
->where('id', $id)
|
||||||
->where('tags/title/language', $request->getLanguage())
|
->where('tags/title/language', $request->header->l11n->language)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
if ($media->class === MediaClass::COLLECTION) {
|
if ($media->class === MediaClass::COLLECTION) {
|
||||||
/** @var \Modules\Media\Models\Media[] $files */
|
/** @var \Modules\Media\Models\Media[] $files */
|
||||||
$files = MediaMapper::getByVirtualPath(
|
$files = MediaMapper::getByVirtualPath(
|
||||||
$media->getVirtualPath() . ($media->getVirtualPath() !== '/' ? '/' : '') . $media->name
|
$media->getVirtualPath() . ($media->getVirtualPath() !== '/' ? '/' : '') . $media->name
|
||||||
)->where('tags/title/language', $request->getLanguage())->execute();
|
)->where('tags/title/language', $request->header->l11n->language)->execute();
|
||||||
|
|
||||||
/** @var \Modules\Media\Models\Collection $collection */
|
/** @var \Modules\Media\Models\Collection $collection */
|
||||||
$collection = CollectionMapper::get()->where('id', $id)->execute();
|
$collection = CollectionMapper::get()->where('id', $id)->execute();
|
||||||
$media = \array_merge($files, $collection->getSources());
|
$media = \array_merge($files, $collection->getSources());
|
||||||
|
|
||||||
$view->addData('path', $collection->getVirtualPath() . '/' . $collection->name);
|
$view->data['path'] = $collection->getVirtualPath() . '/' . $collection->name;
|
||||||
$view->setTemplate('/Modules/Media/Theme/Backend/media-list');
|
$view->setTemplate('/Modules/Media/Theme/Backend/media-list');
|
||||||
} else {
|
} else {
|
||||||
$sub = $request->getDataString('sub') ?? '';
|
$sub = $request->getDataString('sub') ?? '';
|
||||||
|
|
@ -254,7 +254,7 @@ final class BackendController extends Controller
|
||||||
) {
|
) {
|
||||||
$listView = new ListView($this->app->l11nManager, $request, $response);
|
$listView = new ListView($this->app->l11nManager, $request, $response);
|
||||||
$listView->setTemplate('/modules/Media/Theme/Backend/Components/Media/list');
|
$listView->setTemplate('/modules/Media/Theme/Backend/Components/Media/list');
|
||||||
$view->addData('view', $listView);
|
$view->data['view'] = $listView;
|
||||||
} else {
|
} else {
|
||||||
if ($media->class === MediaClass::REFERENCE) {
|
if ($media->class === MediaClass::REFERENCE) {
|
||||||
/** @var \Modules\Media\Models\Media $media */
|
/** @var \Modules\Media\Models\Media $media */
|
||||||
|
|
@ -264,19 +264,19 @@ final class BackendController extends Controller
|
||||||
->with('tags/title')
|
->with('tags/title')
|
||||||
->with('content')
|
->with('content')
|
||||||
->where('id', $media->source?->id ?? 0)
|
->where('id', $media->source?->id ?? 0)
|
||||||
->where('tags/title/language', $request->getLanguage())
|
->where('tags/title/language', $request->header->l11n->language)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$view->addData('view', $this->createMediaView($media->source, $request, $response));
|
$view->data['view'] = $this->createMediaView($media->source, $request, $response);
|
||||||
} else {
|
} else {
|
||||||
$view->addData('view', $this->createMediaView($media, $request, $response));
|
$view->data['view'] = $this->createMediaView($media, $request, $response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->addData('account', $this->app->accountManager->get($request->header->account));
|
$view->data['account'] = $this->app->accountManager->get($request->header->account);
|
||||||
$view->addData('media', $media);
|
$view->data['media'] = $media;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -391,15 +391,15 @@ final class BackendController extends Controller
|
||||||
public function viewModuleSettings(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
public function viewModuleSettings(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response);
|
||||||
|
|
||||||
$id = $request->getDataString('id') ?? '';
|
$id = $request->getDataString('id') ?? '';
|
||||||
|
|
||||||
$settings = SettingMapper::getAll()->where('module', $id)->execute();
|
$settings = SettingMapper::getAll()->where('module', $id)->execute();
|
||||||
$view->setData('settings', $settings);
|
$view->data['settings'] = $settings;
|
||||||
|
|
||||||
$types = MediaTypeMapper::getAll()->with('title')->where('title/language', $response->getLanguage())->execute();
|
$types = MediaTypeMapper::getAll()->with('title')->where('title/language', $response->header->l11n->language)->execute();
|
||||||
$view->setData('types', $types);
|
$view->data['types'] = $types;
|
||||||
|
|
||||||
$view->setTemplate('/Modules/' . static::NAME . '/Admin/Settings/Theme/Backend/settings');
|
$view->setTemplate('/Modules/' . static::NAME . '/Admin/Settings/Theme/Backend/settings');
|
||||||
|
|
||||||
|
|
@ -426,15 +426,15 @@ final class BackendController extends Controller
|
||||||
/** @var \phpOMS\Localization\BaseStringL11n $type */
|
/** @var \phpOMS\Localization\BaseStringL11n $type */
|
||||||
$type = MediaTypeMapper::get()
|
$type = MediaTypeMapper::get()
|
||||||
->with('title')
|
->with('title')
|
||||||
->where('title/language', $response->getLanguage())
|
->where('title/language', $response->header->l11n->language)
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', (int) $request->getData('id'))
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1007501001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1007501001, $request, $response);
|
||||||
$view->addData('type', $type);
|
$view->data['type'] = $type;
|
||||||
|
|
||||||
$l11n = MediaTypeL11nMapper::getAll()->where('type', $type->id)->execute();
|
$l11n = MediaTypeL11nMapper::getAll()->where('type', $type->id)->execute();
|
||||||
$view->addData('l11n', $l11n);
|
$view->data['l11n'] = $l11n;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -477,7 +477,7 @@ final class BackendController extends Controller
|
||||||
$view->setTemplate('/Modules/Media/Theme/Backend/media-file-create');
|
$view->setTemplate('/Modules/Media/Theme/Backend/media-file-create');
|
||||||
|
|
||||||
$editor = new \Modules\Editor\Theme\Backend\Components\Editor\BaseView($this->app->l11nManager, $request, $response);
|
$editor = new \Modules\Editor\Theme\Backend\Components\Editor\BaseView($this->app->l11nManager, $request, $response);
|
||||||
$view->addData('editor', $editor);
|
$view->data['editor'] = $editor;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ trait FileUploaderTrait
|
||||||
*/
|
*/
|
||||||
public static function setUpFileUploaderTrait(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public static function setUpFileUploaderTrait(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
||||||
{
|
{
|
||||||
$head = $response->get('Content')->getData('head');
|
$head = $response->get('Content')->head;
|
||||||
$head->addAsset(AssetType::JS, '/Modules/Media/Controller.js', ['type' => 'module']);
|
$head->addAsset(AssetType::JS, '/Modules/Media/Controller.js', ['type' => 'module']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ trait MediaListTrait
|
||||||
* @var Media[]
|
* @var Media[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $files = [];
|
public array $files = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get files
|
* Get files
|
||||||
|
|
|
||||||
|
|
@ -73,18 +73,6 @@ class MediaType implements \JsonSerializable
|
||||||
$this->setL11n($name);
|
$this->setL11n($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get id
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getId() : int
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use phpOMS\Autoloader;
|
||||||
|
|
||||||
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
||||||
|
|
||||||
$media = $this->getData('media');
|
$media = $this->data['media'];
|
||||||
|
|
||||||
$reader = IOFactory::createReaderforFile(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath());
|
$reader = IOFactory::createReaderforFile(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath());
|
||||||
$reader->setReadDataOnly(true);
|
$reader->setReadDataOnly(true);
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,6 @@ use phpOMS\Utils\Parser\Spreadsheet\SpreadsheetParser;
|
||||||
|
|
||||||
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
||||||
|
|
||||||
$media = $this->getData('media');
|
$media = $this->data['media'];
|
||||||
|
|
||||||
echo SpreadsheetParser::parseSpreadsheet(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath(), 'html');
|
echo SpreadsheetParser::parseSpreadsheet(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath(), 'html');
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use phpOMS\Autoloader;
|
||||||
|
|
||||||
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
||||||
|
|
||||||
$media = $this->getData('media');
|
$media = $this->data['media'];
|
||||||
|
|
||||||
$reader = IOFactory::createReader('Word2007');
|
$reader = IOFactory::createReader('Word2007');
|
||||||
$doc = $reader->load(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath());
|
$doc = $reader->load(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath());
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,10 @@ include __DIR__ . '/template-functions.php';
|
||||||
$mediaPath = \urldecode($this->getData('path') ?? '/');
|
$mediaPath = \urldecode($this->getData('path') ?? '/');
|
||||||
|
|
||||||
/** @var \Modules\Media\Models\Media[] $media */
|
/** @var \Modules\Media\Models\Media[] $media */
|
||||||
$media = $this->getData('media') ?? [];
|
$media = $this->data['media'] ?? [];
|
||||||
|
|
||||||
/** @var \Modules\Admin\Models\Account $account */
|
/** @var \Modules\Admin\Models\Account $account */
|
||||||
$account = $this->getData('account');
|
$account = $this->data['account'];
|
||||||
$accountDir = $account->id . ' ' . $account->login;
|
$accountDir = $account->id . ' ' . $account->login;
|
||||||
|
|
||||||
$previous = empty($media) ? '{/base}/media/list' : '{/base}/media/list?{?}&id=' . \reset($media)->id . '&ptype=p';
|
$previous = empty($media) ? '{/base}/media/list' : '{/base}/media/list?{?}&id=' . \reset($media)->id . '&ptype=p';
|
||||||
|
|
|
||||||
|
|
@ -20,21 +20,21 @@ include __DIR__ . '/template-functions.php';
|
||||||
|
|
||||||
/** @var \Modules\Media\Views\MediaView $this */
|
/** @var \Modules\Media\Views\MediaView $this */
|
||||||
/** @var \Modules\Media\Models\Media $media */
|
/** @var \Modules\Media\Models\Media $media */
|
||||||
$media = $this->getData('media');
|
$media = $this->data['media'];
|
||||||
$view = $this->getData('view');
|
$view = $this->data['view'];
|
||||||
|
|
||||||
/** @var \Modules\Tag\Models\Tag[] $tag */
|
/** @var \Modules\Tag\Models\Tag[] $tag */
|
||||||
$tags = $media->getTags();
|
$tags = $media->getTags();
|
||||||
|
|
||||||
/** @var \Modules\Admin\Models\Account $account */
|
/** @var \Modules\Admin\Models\Account $account */
|
||||||
$account = $this->getData('account');
|
$account = $this->data['account'];
|
||||||
$accountDir = $account->id . ' ' . $account->login;
|
$accountDir = $account->id . ' ' . $account->login;
|
||||||
|
|
||||||
$mediaPath = \urldecode($media->getVirtualPath() ?? '/');
|
$mediaPath = \urldecode($media->getVirtualPath() ?? '/');
|
||||||
|
|
||||||
/** @var \phpOMS\Message\Http\HttpRequest $this->request */
|
/** @var \phpOMS\Message\Http\HttpRequest $this->request */
|
||||||
|
|
||||||
echo $this->getData('nav')->render();
|
echo $this->data['nav']->render();
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user