From 8ca8d6fae7ebf2cac0ae3f700c44a33ba8d9c714 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Sat, 26 Oct 2024 18:19:00 +0300 Subject: [PATCH] =?utf8?q?[ERP-231]=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?utf8?q?=D0=BB=D1=8F=D0=B5=D1=82=20matrix-erp=20=D1=80=D0=B0=D0=B7=D0=B4?= =?utf8?q?=D0=B5=D0=BB:=20=D1=80=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/helpers/File.php | 2 +- erp24/records/MatrixErp.php | 3 -- erp24/views/matrix_erp/index.php | 72 +++++++++++--------------------- 3 files changed, 26 insertions(+), 51 deletions(-) diff --git a/erp24/helpers/File.php b/erp24/helpers/File.php index 0a21adec..e21a8598 100644 --- a/erp24/helpers/File.php +++ b/erp24/helpers/File.php @@ -121,7 +121,7 @@ class File extends FileHelper $resizedPath = $uploadDir . "/images/resize/{$substr}/{$w}_{$h}_{$quality}"; $resizedFile = "{$resizedPath}/{$filename}"; - if (!file_exists($imagePath)) { + if (!file_exists($imagePath ?? '')) { $filePath = self::src($filename); self::ResizeImage($filePath, $w, $h, $quality); } diff --git a/erp24/records/MatrixErp.php b/erp24/records/MatrixErp.php index c09f0303..c7c184cd 100644 --- a/erp24/records/MatrixErp.php +++ b/erp24/records/MatrixErp.php @@ -96,7 +96,6 @@ class MatrixErp extends \yii\db\ActiveRecord if (!empty($componentsArray)) { $this->componentsArray = self::getProducts($componentsArray); } - $test = 1; } @@ -124,6 +123,4 @@ class MatrixErp extends \yii\db\ActiveRecord return $products; } - - } diff --git a/erp24/views/matrix_erp/index.php b/erp24/views/matrix_erp/index.php index f0e0bf97..9af43859 100644 --- a/erp24/views/matrix_erp/index.php +++ b/erp24/views/matrix_erp/index.php @@ -200,11 +200,10 @@ $this->params['breadcrumbs'][] = $this->title; Количество setComponentsArray(); if (!empty($item->componentsArray)) { $components = $item->componentsArray; foreach ($components as $component) { - - ?> @@ -237,9 +236,6 @@ $this->params['breadcrumbs'][] = $this->title; if (!empty($imagesArray)) { $images = implode('', $imagesArray); } - - - ?> description ?? ''?> @@ -253,52 +249,34 @@ $this->params['breadcrumbs'][] = $this->title;
- - - - - url_link_video)) { - ?> - - + + - getFiles(); - $filesRow = $filesQuery->one(); - // foreach($MatrixErpMedia as $matrixErpMediaRow) { - //$filesRow = ArrayHelper::getValue($matrixErpMediaRow->getRelatedRecords(),'files'); - if (!empty($filesRow)) { - $fileRow = FileService::getFile($filesRow); - } - - ?> + url_link_video)): ?> - - - + + - - + + + + + + + + +
НазваниеСсылка
Ссылка на видеоurl_link_video, - $matrixProperty->url_link_video, - [ - 'class' => 'profile-link', - 'target'=>'_blank' - ] - );?> - НазваниеСсылка
name?> Ссылка на видеоurl_link_video, + $matrixProperty->url_link_video, + [ + 'class' => 'profile-link', + 'target'=>'_blank' + ] + );?> +
name?> file ? + (FileService::getFile($matrixErpMediaRow->file) ?? '') : '' ?>
-- 2.39.5