2017 © Pedro Peláez
 

library easyadmin-gallery

Mosaic listing, drag and drop upload and more for EasyAdminBundle

image

funcphp/easyadmin-gallery

Mosaic listing, drag and drop upload and more for EasyAdminBundle

  • Wednesday, May 9, 2018
  • by emreakinci
  • Repository
  • 1 Watchers
  • 6 Stars
  • 156 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 1 Versions
  • 8 % Grown

The README.md

# Func/EasyAdminGalleryBundle, (*1)

Mosaic listing, drag and drop upload and more for EasyAdminBundle, (*2)

Demo, (*3)

  • Mosaic / mason listing
  • Drag and drop file upload and create records

install

download repo via composer

composer require funcphp/easyadmin-gallery "dev-master"

enable bundle from app/AppKernel.php

    $bundles = [
        ...
        new Func\EasyAdminGalleryBundle\FuncEasyAdminGalleryBundle(),
        ...
    ];

install assets

php bin/console assets:install --symlink

usage

1.

set your gallery entitiy controller as Func\EasyAdminGalleryBundle\Controller\GalleryController, (*4)

or, (*5)

use this trait in your gallery admin controller: Func\EasyAdminGalleryBundle\Controller\Traits\ListMosaic, (*6)

2.1. mosaic view

easy_admin:
    entities:
        Gallery:
            class: AppBundle\Entity\Gallery # an entity
            controller: Func\EasyAdminGalleryBundle\Controller\GalleryController
            list:
                fields:

                    # thumbnail field
                    -
                        property: 'image'
                        type: 'image'
                        base_path: '%path.gallery%'
                        thumbnail: true ##

                    # thumbnail text field
                    -
                        property: 'title'
                        thumbnail_text: true ##

                    # other fields
                    - 'id'
                    - 'enabled'

                    ...
                ...
            ...
        ...
    ...
...

ready to mosaic listing., (*7)

2.2. drag and drop upload

set your gallery entitiy controller as Func\EasyAdminGalleryBundle\Controller\GalleryController, (*8)

or, (*9)

use this trait in your gallery admin controller: Func\EasyAdminGalleryBundle\Controller\Traits\DragDrop, (*10)

easy_admin:
    entities:
        Gallery:
            class: AppBundle\Entity\Gallery # an entity
            controller: Func\EasyAdminGalleryBundle\Controller\GalleryController
            dragDrop:

                #backend values
                values:
                   #column: "value"
                    imageFile: "%%file%%"
                    title: "%%file.name%%"
                    enabled: true
                    description: "This record created by drag'n drop!"

                #frontend values
                fields:
                   #form fields to overwrite values
                    - 'enabled'
                    - 'description'

            list:
                fields:
                    ...
            form:
                fields:
                    ...
                ...
            ...
        ...
    ...
...

ready to drag and drop uploading., (*11)

todo list

  • [x] custom list action: mosaic / mason listing
  • [x] custom list action: drag and drop file upload and create records
  • [ ] custom show action: gallery viewing - prev / curr / next
  • [ ] custom edit action: drag and drop

The Versions

09/05 2018

dev-master

9999999-dev

Mosaic listing, drag and drop upload and more for EasyAdminBundle

  Sources   Download