2017 © Pedro Peláez
 

yii2-extension embeddable-gallery

Embeddable gallery, to be attached to any model

image

maks757/embeddable-gallery

Embeddable gallery, to be attached to any model

  • Thursday, June 15, 2017
  • by maks757
  • Repository
  • 1 Watchers
  • 0 Stars
  • 46 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 2 % Grown

The README.md

embeddable-gallery

Embeddable gallery, to be attached to any model, (*1)

backend config

'modules' => [
    'egallery' => [
        'class' => \maks757\egallery\GalleryModule::className()
    ],
    //...
],

common config

'components' => [
        'egallery' => [
            'class' => \maks757\imagable\Imagable::className(),
            'imageClass' => CreateImageMetaMulti::className(),
            'nameClass' => GenerateName::className(),
            'imagesPath' => '@frontend/web/images',
            'categories' => [
                'category' => [
                    'egallery' => [
                        'size' => [
                            'origin' => [
                                'width' => 0,
                                'height' => 0,
                            ]
                        ]
                    ]
                ]
            ]
        ],
        //...
    ],

views

<?php if(!empty($model->id)): ?>
    <?= $form->field(new \maks757\egallery\components\UploadForm(), 'imageFiles[]')->widget(FileInput::className(), [
        'options' => [
            'multiple' => true,
            'accept' => 'image/*'
        ],
        'pluginOptions' => [
            'showRemove' => false,
            'previewFileType' => 'image',
            'maxFileCount' => 20,
            'uploadUrl' => Url::toRoute(['/egallery/image/upload']),
            'uploadExtraData' => [
                'id' => $model->id,
                'key' => $model->className()
            ],
        ],
        'pluginEvents' => [
            'fileuploaded' => 'function() { $.pjax.reload({container:"#pjax_block", timeout: 100000, url: "'.Url::to('', true).'"}); }'
        ]
    ])->label('Загрузка изображений') ?>
    <?php Pjax::begin(['enablePushState' => false, 'id' => 'pjax_block']) ?>
    <?= \maks757\egallery\widgets\show_images\Gallery::widget(['object' => $model, 'show_name' => false]) ?>
    <?php Pjax::end() ?>
<?php endif; ?>

Alt text, (*2)

VK
Google
GitHub, (*3)

The Versions

15/06 2017

dev-master

9999999-dev

Embeddable gallery, to be attached to any model

  Sources   Download

The Requires

 

by Max Cherednyk

gallery

15/06 2017

0.5.1

0.5.1.0

Embeddable gallery, to be attached to any model

  Sources   Download

The Requires

 

by Max Cherednyk

gallery

15/06 2017

0.5.0

0.5.0.0

Embeddable gallery, to be attached to any model

  Sources   Download

The Requires

 

by Max Cherednyk

gallery

15/06 2017

0.4.0

0.4.0.0

Embeddable gallery, to be attached to any model

  Sources   Download

The Requires

 

by Max Cherednyk

gallery

15/06 2017

0.3.103

0.3.103.0

Embeddable gallery, to be attached to any model

  Sources   Download

The Requires

 

by Max Cherednyk

gallery

15/06 2017

0.2.103

0.2.103.0

Embeddable gallery, to be attached to any model

  Sources   Download

The Requires

 

by Max Cherednyk

gallery

15/06 2017

0.1.103

0.1.103.0

Embeddable gallery, to be attached to any model

  Sources   Download

The Requires

 

by Max Cherednyk

gallery

11/03 2017

0.0.003

0.0.003.0

Embeddable gallery, to be attached to any model

  Sources   Download

The Requires

 

by Max Cherednyk

gallery

11/03 2017

0.0.103

0.0.103.0

Embeddable gallery, to be attached to any model

  Sources   Download

The Requires

 

by Max Cherednyk

gallery

14/02 2017

0.0.002

0.0.002.0

Embeddable gallery, to be attached to any model

  Sources   Download

The Requires

 

by Max Cherednyk

gallery

14/02 2017

0.0.001

0.0.001.0

Embeddable gallery, to be attached to any model

  Sources   Download

The Requires

 

by Max Cherednyk

gallery