?>
<div style="overflow-x: scroll;">
<?= $form->field($model, 'modelsProducts')->widget(MultipleInput::className(), [
- 'min' => 1,
+ 'min' => 0,
'max' => 100,
'columns' => [
[
]);
+ $query->joinWith(['imagesWriteOffsErp']);
+
+ $action = $query->createCommand()->getRawSql();
+
+ $modelWriteOffsProductsErp = $query->All();
+ $productImagesList = [];
+ $forWidget = false;
+ foreach ($modelWriteOffsProductsErp as $item) {
+ $productImagesList = WriteOffsErp::getImagesList($item->imagesWriteOffsErp, $forWidget);
+ }
+ if (!empty($productImagesList)) {
+// $dataTable = dosamigos\gallery\Gallery::widget(['items' => $productImagesList]);
+ if ($forWidget) {
+ $dataTable = dosamigos\gallery\Gallery::widget(['items' => $productImagesList]);
+ } else {
+ $dataTable = implode('', $productImagesList);
+ }
+ }
+ }
+ $test = 33;
+ return $dataTable ?? '';
+ },
+ 'headerOptions' => [
+// 'style' => 'width: 70px;',
+ ]
+ ],
+ [
+ 'name' => 'images_row',
+ 'type' => BaseColumn::TYPE_STATIC,
+ 'value' => function($data) {
+// $images = WriteOffsErp::getImagesList($product->imagesWriteOffsErp);
+ if (!empty($data['id'])) {
+ $query = WriteOffsProductsErp::find()
+ ->andWhere([
+ 'write_offs_products_erp.id' => $data['id'],
+ 'write_offs_products_erp.active_product' => 1,
+ ]);
+
+
$query->joinWith(['imagesWriteOffsErp']);
$action = $query->createCommand()->getRawSql();
'class' => 'custom_css_class_file_input'
]
],
+ [
+ 'name' => 'videoFiles',
+ 'title' => 'Видео: mp4, webm, ogg, mov',
+ 'type' => FileInput::className(),
+ 'options' => [
+ 'options' => [
+ 'multiple' => true,
+ 'accept' => 'video/*',
+ 'name' => 'video_name',
+ 'capture' => '',
+ 'class' => 'file'
+ ],
+ 'pluginOptions' => [
+ 'showPreview' => false, // отключено, т.к. видео превью не поддерживаются по умолчанию
+ 'showCaption' => true,
+ 'showRemove' => true,
+ 'showUpload' => false,
+ 'overwriteInitial' => true,
+ 'browseIcon' => '+',
+ 'cancelIcon' => 'x',
+ 'removeIcon' => '-',
+ 'buttonLabelClass' => 'hidden',
+ 'fileActionSettings' => ['showUpload' => false],
+ 'maxFileCount' => 10,
+ 'allowedFileExtensions' => ['mp4', 'webm', 'ogg', 'mov'],
+ 'multiple' => true
+ ],
+ 'model' => $multipleUploadForm,
+ ],
+ 'columnOptions' => [
+ 'class' => 'custom_css_class_file_input'
+ ]
+ ],
+
[
'name' => 'comment',
'type' => 'textInput',