From: Alexander Smirnov Date: Sat, 26 Oct 2024 15:19:00 +0000 (+0300) Subject: [ERP-231] исправляет matrix-erp раздел: рефактор X-Git-Tag: 1.6~20^2~7 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=8ca8d6fae7ebf2cac0ae3f700c44a33ba8d9c714;p=erp24_rep%2Fyii-erp24%2F.git [ERP-231] исправляет matrix-erp раздел: рефактор --- 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) ?? '') : '' ?>