]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Лайтбокс для видео
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 3 Apr 2025 08:22:34 +0000 (11:22 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 3 Apr 2025 08:22:34 +0000 (11:22 +0300)
erp24/views/bouquet/index.php

index c46ae151d6c742e8f954b9e9c3a1f427dbd23a8c..9ff1438c70839f29f2afef76d64642db43a6d077 100644 (file)
@@ -163,15 +163,22 @@ $this->title = 'Содержание матрицы';
     
                         <div class='col-md-2 d-flex flex-column gap-2'>
                             <div class='card bg-transparent border-0' style='aspect-ratio: 1/1; width: 100%; flex: 1;'>
-                                " . Html::tag('video', '', [
-                                'class'       => 'video-preview',
-                                'src'         => Url::to($model->presentation->url ?? null),
-                                'style'       => 'width: 100%; height: 100%; object-fit: cover;',
-                                'autoplay'    => true,
-                                'muted'       => true,
-                                'loop'        => true,
-                                'playsinline' => true,
-                            ]) . "
+                                " . Html::a(
+                                Html::tag('video', '', [
+                                    'class'       => 'video-preview',
+                                    'src'         => Url::to($model->presentation->url ?? null),
+                                    'style'       => 'width: 100%; height: 100%; object-fit: cover;',
+                                    'autoplay'    => true,
+                                    'muted'       => true,
+                                    'loop'        => true,
+                                    'playsinline' => true,
+                                ]),
+                                Url::to($model->presentation->url ?? null),
+                                [
+                                    'data-lightbox' => $galleryId,
+                                    'data-type' => 'video'
+                                ]
+                            ) . "
                                 <div class='text-center bg-transparent fw-bold p-0 m-0'>Презентация</div>
                             </div>
                             <div class='card' style='aspect-ratio: 1/1; width: 100%; flex: 1;'>";
@@ -190,15 +197,22 @@ $this->title = 'Содержание матрицы';
     
                         <div class='col-md-2 d-flex flex-column gap-2'>
                             <div class='card bg-transparent border-0' style='aspect-ratio: 1/1; width: 100%; flex: 1;'>
-                                " . Html::tag('video', '', [
-                                'class'       => 'video-preview',
-                                'src'         => Url::to($model->buildProcess->url ?? null),
-                                'style'       => 'width: 100%; height: 100%; object-fit: cover;',
-                                'autoplay'    => true,
-                                'muted'       => true,
-                                'loop'        => true,
-                                'playsinline' => true,
-                            ]) . "
+                                " . Html::a(
+                                Html::tag('video', '', [
+                                    'class'       => 'video-preview',
+                                    'src'         => Url::to($model->buildProcess->url ?? null),
+                                    'style'       => 'width: 100%; height: 100%; object-fit: cover;',
+                                    'autoplay'    => true,
+                                    'muted'       => true,
+                                    'loop'        => true,
+                                    'playsinline' => true,
+                                ]),
+                                Url::to($model->buildProcess->url ?? null),
+                                [
+                                    'data-lightbox' => $galleryId,
+                                    'data-type' => 'video'
+                                ]
+                            ) . "
                                 <div class='text-center bg-transparent fw-bold'>Процесс сборки</div>
                             </div>
                             <div class='card' style='aspect-ratio: 1/1; width: 100%; flex: 1;'>";