easy_admin:
    entities:
        ClassifiedCategory:
            class: App\ClassifiedsBundle\Entity\ClassifiedCategory
            list_type: tree
            list:
                title: entity.classified_category.title.list
                fields:
                    - property: title
                      label: common.title
                actions:
                    - { name: new, icon: plus }
                    - { name: edit, icon: pencil }
                    - { name: delete, icon: trash }
            show:
                title: entity.classified_category.title.show
                fields:
                    - { property: id, label: common.id }
            form:
                fields:
                    - type: group
                      css_class: col-lg-7
                      label: common.basic_data
                      icon: paint-brush

                    - property: locales
                      type: collection
                      type_options:
                          label: false
                          entry_type: App\ClassifiedsBundle\Form\Type\ClassifiedCategoryLocaleType
                          error_bubbling: false
                          by_reference: false


                    - type: group
                      css_class: col-sm-5
                      label: entity.menu_item.form.group.tree
                      icon: cogs


                    - property: parent
                      label: common.parent_element
                      type: App\ClassifiedsBundle\Form\Type\ClassifiedCategorySelectType
                      type_options:
                        class: App\ClassifiedsBundle\Entity\ClassifiedCategory
                        required: true
                    - property: weight
                      label: common.weight
                      help: common.weight.help
            new:
                title: entity.classified_category.title.new
            edit:
                title: entity.classified_category.title.edit

        Classified:
            class: App\ClassifiedsBundle\Entity\Classified
            controller: App\ClassifiedsBundle\Controller\ClassifiedsAdminController
            list:
                dql_filter: 'entity.status <> 0'
                title: entity.classified.title.list
                fields:
                    - { property: id, label: common.id }
                    - { property: name, label: common.title }
                    - property: createdDate
                      label: common.added
                      template: "CoreBundle:backend/display:field_date_small_hours.html.twig"
                    - property: displayDeadline
                      label: entity.classified.form.label.displayDeadline
                      template: "CoreBundle:backend/display:field_date_small_hours.html.twig"
                    - property: highlighted
                      label: entity.classified.form.label.highlight
                      template: "ClassifiedsBundle:backend/display:field_highlighted.html.twig"
                    - { property: user.fullName, label: common.owner }
                    - property: email
                      label: common.email
                      template: "@Core/backend/display/field_email_envelope.html.twig"
                    - property: phone
                      label: common.phone_number
                    - property: status
                      label: entity.classified.form.label.added
                      template: "@Classifieds/backend/display/list_status.html.twig"
                actions:
                    - { name: edit, icon: pencil }
                    - { name: classified, icon: eye, type: route, label: common.preview }
            show:
                fields:
                    - { property: user.fullName, label: common.company_name }
            form:
                fields:
                    - type: group
                      css_class: col-lg-5
                      label: common.basic_data
                      icon: paint-brush

                    - property: negotiable
                      label: entity.classified.form.label.negotiable

                    - property: displayDeadline
                      label: entity.classified.form.label.displayDeadline

                    - property: displayPeriod
                      label: entity.classified_display_period.name.singleton

                    - property: promotionDeadline
                      label: entity.classified.form.label.promotionDeadline

                    - property: promotionIndefinitely
                      label: entity.classified.form.label.promotionIndefinitely

                    - property: price
                      label: common.price
                      type: money
                      type_options:
                        currency: zł
                        scale: 2

                    - property: user
                      label: entity.classified.form.label.owner
                      type: Notimeo\UserBundle\Form\Type\UsersType

                    - property: cond
                      label: entity.classified.form.label.condition
                      type: App\ClassifiedsBundle\Form\Type\ClassifiedsConditionsType

                    - property: highlighted
                      label: entity.classified.form.label.highlight
                      type: App\ClassifiedsBundle\Form\Type\ClassifiedsHighlightedType


                    - type: section
                      label: entity.classified.form.label.contact_data
                      icon: phone

                    - property: email
                      label: common.email

                    - property: voivodeship
                      label: common.voivodeship

                    - property: city
                      label: common.city

                    - property: phone
                      label: common.phone_number

                    - type: group
                      css_class: col-md-7
                      label: common.other
                      icon: cogs

                    - property: viewsAmount
                      label: entity.user.name.viewsAmount

                    - property: category
                      label: entity.classified_category.name.multiple_simple
                      type: App\ClassifiedsBundle\Form\Type\ClassifiedCategorySelectType
                      type_options:
                        class: App\ClassifiedsBundle\Entity\ClassifiedCategory
                        required: true

                    - type: group
                      css_class: col-lg-7
                      label: common.content
                      icon: paint-brush

                    - property: locales
                      type: collection
                      type_options:
                          label: false
                          entry_type: App\ClassifiedsBundle\Form\Type\ClassifiedLocaleType
                          error_bubbling: false
                          by_reference: false

                    - type: group
                      css_class: col-lg-7
                      label: common.photos
                      icon: camera

                    - property: images
                      type: collection
                      type_options:
                          label: false
                          entry_type: App\ClassifiedsBundle\Form\Type\ClassifiedImagesType
                          error_bubbling: false
                          by_reference: false
            new:
                title: entity.classified.title.new
            edit:
                title: entity.classified.title.edit
        ClassifiedConfig:
            require_permission: ROLE_ADMIN
            class: App\ClassifiedsBundle\Entity\ClassifiedConfig
            controller: App\ClassifiedsBundle\Controller\ClassifiedsConfigAdminController
            config:
        ClassifiedDisplayPeriod:
            require_permission: ROLE_ADMIN
            class: App\ClassifiedsBundle\Entity\ClassifiedDisplayPeriod
            disabled_actions: [search, show]
            list:
                title: entity.classified_display_period.title.list
                sort: [value, ASC]
                fields:
                    - { property: id, label: common.id }
                    - { property: value, label: common.value }
            form:
                fields:
                    - { property: value, label: common.value }
            new:
                title: entity.classified_display_period.title.new
            edit:
                title: entity.classified_display_period.title.edit
