sonata_doctrine_orm_admin:
    templates:
        types:
            show: # or "list"
                json: '@kohinos/bundles/SonataAdminBundle/show_json.html.twig'

sonata_admin:
    persist_filters: true
    security:
        # handler: sonata.admin.security.handler.role
        handler: app.security.handler.role
        role_admin: ROLE_ADMIN
        role_super_admin: ROLE_SUPER_ADMIN
    title: 'Admin'
    title_logo: /images/logo.png
    # Pour modifier l'image par défaut sur la vue "Mosaique" de l'administration
    # options:
    #     mosaic_background: '/path/to/image.png' # or use base64
    templates:
        layout:                         '@kohinos/bundles/SonataAdminBundle/standard_layout.html.twig'
        #outer_list_rows_mosaic:          '@kohinos/bundles/SonataAdminBundle/list_outer_rows_mosaic.html.twig'
        # ajax:                           '@kohinos/bundles/SonataAdminBundle/ajax_layout.html.twig'
        list:                           '@kohinos/bundles/SonataAdminBundle/CRUD/list.html.twig'
        # show:                           '@kohinos/bundles/SonataAdminBundle/CRUD/show.html.twig'
        # show_compare:                   '@kohinos/bundles/SonataAdminBundle/CRUD/show_compare.html.twig'
        # edit:                           '@kohinos/bundles/SonataAdminBundle/CRUD/edit.html.twig'
        # history:                        '@kohinos/bundles/SonataAdminBundle/CRUD/history.html.twig'
        # preview:                        '@kohinos/bundles/SonataAdminBundle/CRUD/preview.html.twig'
        # delete:                         '@kohinos/bundles/SonataAdminBundle/CRUD/delete.html.twig'
        # batch:                          '@kohinos/bundles/SonataAdminBundle/CRUD/list__batch.html.twig'
        # acl:                            '@kohinos/bundles/SonataAdminBundle/CRUD/acl.html.twig'
        # action:                         '@kohinos/bundles/SonataAdminBundle/CRUD/action.html.twig'
        # select:                         '@kohinos/bundles/SonataAdminBundle/CRUD/list__select.html.twig'
        # filter:                         '@kohinos/bundles/SonataAdminBundle/Form/filter_admin_fields.html.twig'
        dashboard:                      '@kohinos/bundles/SonataAdminBundle/dashboard.html.twig'
        # search:                         '@kohinos/bundles/SonataAdminBundle/Core/search.html.twig'
        # batch_confirmation:             '@kohinos/bundles/SonataAdminBundle/CRUD/batch_confirmation.html.twig'
        # inner_list_row:                 '@kohinos/bundles/SonataAdminBundle/CRUD/list_inner_row.html.twig'
        # base_list_field:                '@kohinos/bundles/SonataAdminBundle/CRUD/base_list_field.html.twig'
        list_block:                     '@kohinos/bundles/SonataAdminBundle/Block/block_admin_list.html.twig'
        user_block:                     '@kohinos/bundles/SonataUserBundle/Core/user_block.html.twig'
        # add_block:                      '@kohinos/bundles/SonataAdminBundle/Core/add_block.html.twig'
        # pager_links:                    '@kohinos/bundles/SonataAdminBundle/Pager/links.html.twig'
        # pager_results:                  '@kohinos/bundles/SonataAdminBundle/Pager/results.html.twig'
        # tab_menu_template:              '@kohinos/bundles/SonataAdminBundle/Core/tab_menu_template.html.twig'
        # history_revision_timestamp:     '@kohinos/bundles/SonataAdminBundle/CRUD/history_revision_timestamp.html.twig'
        # short_object_description:       '@kohinos/bundles/SonataAdminBundle/Helper/short-object-description.html.twig'
        # search_result_block:            '@kohinos/bundles/SonataAdminBundle/Block/block_search_result.html.twig'
        # action_create:                  '@kohinos/bundles/SonataAdminBundle/CRUD/dashboard__action_create.html.twig'
        # button_acl:                     '@kohinos/bundles/SonataAdminBundle/Button/acl_button.html.twig'
        # button_create:                  '@kohinos/bundles/SonataAdminBundle/Button/create_button.html.twig'
        # button_edit:                    '@kohinos/bundles/SonataAdminBundle/Button/edit_button.html.twig'
        # button_history:                 '@kohinos/bundles/SonataAdminBundle/Button/history_button.html.twig'
        # button_list:                    '@kohinos/bundles/SonataAdminBundle/Button/list_button.html.twig'
        # button_show:                    '@kohinos/bundles/SonataAdminBundle/Button/show_button.html.twig'
    assets:
        stylesheets:
            # The default stylesheet list:
            # - build/app.css
            - bundles/sonatacore/vendor/bootstrap/dist/css/bootstrap.min.css
            - bundles/sonatacore/vendor/components-font-awesome/css/font-awesome.min.css
            # - fontawesome/css/fontawesome.min.css
            # - fontawesome/css/solid.css
            # - fontawesome/css/brands.css
            # - public/fontawesome/css/v4-shims.css
            - bundles/sonatacore/vendor/ionicons/css/ionicons.min.css
            - bundles/sonataadmin/vendor/admin-lte/dist/css/AdminLTE.min.css
            - bundles/sonataadmin/vendor/admin-lte/dist/css/skins/skin-black.min.css
            - bundles/sonataadmin/vendor/iCheck/skins/square/blue.css
            - bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css
            - bundles/sonataadmin/vendor/jqueryui/themes/base/jquery-ui.css
            - bundles/sonatacore/vendor/select2/select2.css
            - bundles/sonatacore/vendor/select2-bootstrap-css/select2-bootstrap.min.css
            - bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css
            - bundles/sonataadmin/css/styles.css
            - bundles/sonataadmin/css/layout.css
            - bundles/sonataadmin/css/tree.css
            - bundles/sonataadmin/css/colors.css

        extra_stylesheets:
            - build/admin.css
        # javascript paths to add to the page in addition to the list above
        extra_javascripts:
            # - fontawesome/js/all.js
            # - public/fontawesome/js/v4-shims.js
    dashboard:
        # DASHBOARD de l'admin
        #
        # Layout :
        #
        # TOP     TOP     TOP

        #  LEFT CENTER RIGHT
        #  LEFT CENTER RIGHT
        #  LEFT CENTER RIGHT

        # BOTTOM BOTTOM BOTTOM
        blocks:
            -
                class:    col-xs-12 col-md-12
                position: top
                type: admin.block.dashboard
            -
                class:    col-xs-12 col-md-12
                position: center
                type: sonata.admin.block.admin_list
            # -
            #     class:    col-xs-12 col-md-6
            #     position: center
            #     type: sonata.admin.block.admin_list
            # -
            #     class:    col-xs-4 col-md-3
            #     position: top
            #     type:     sonata.admin.block.stats
            #     settings:
            #         code: admin.adherent.gerer
            #         icon: fas fa-user
            #         text: Adherents
            #         color: bg-info
            #         filters:
            #             enabled: { value: 1 }
                        # _per_page: { value: 32 }
            # -
            #     class:    col-xs-4 col-md-3
            #     position: top
            #     type:     sonata.admin.block.stats
            #     settings:
            #         code: admin.prestataire.gerer
            #         icon: fas fa-user-ninja
            #         text: Prestataires
            #         color: bg-info
            #         filters:
            #             enabled: { value: 1 }
            # -
            #     class:    col-xs-4 col-md-3
            #     position: top
            #     type:     sonata.admin.block.stats
            #     settings:
            #         code: admin.groupe.gerer
            #         icon: fas fa-user-ninja
            #         text: Groupes
            #         color: bg-info
            #         filters:
            #             enabled: { value: 1 }
            # -
            #     class:    col-xs-4 col-md-3
            #     position: top
            #     type:     sonata.admin.block.stats
            #     settings:
            #         code: admin.comptoir.gerer
            #         icon: fas fa-user-ninja
            #         text: Comptoirs
            #         color: bg-info
            #         filters:
            #             enabled: { value: 1 }
            # -
            #   type: sonata.block.service.text
            #   position: right
            #   settings:
            #         content: >
            #             <h2>Bienvenue sur l'administration de votre Monnaie Locale Complémentaire !</h2>
            #             :
             # Exemple de block de stats
             # -
             #    class:    col-lg-3 col-xs-6          # twitter bootstrap responsive code
             #    position: top                        # zone in the dashboard
             #    type:     sonata.admin.block.stats   # block id
             #    settings:
             #        code:  sonata.page.admin.page    # admin code - service id
             #        icon:  fa-magic                  # font awesome icon
             #        text:  Edited Pages
             #        color: bg-yellow                 # colors: bg-green, bg-red and bg-aqua
             #        filters:                         # filter values
             #            edited: { value: 1 }         # filtre on admin (settings:code)

        groups:
            sonata.admin.group.users:
                keep_open:       false
                label:           Utilisateurs
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-users"></i>'
                items:
                    - sonata.user.admin.user
                    - sonata.user.admin.group
            # sonata.admin.group.media:
            #     keep_open:       false
            #     label:           Média
            #     label_catalogue: SonataAdminBundle
            #     icon:            '<i class="fa fa-image"></i>'
            #     items:
            #         - sonata.media.admin.media
            #         - sonata.media.admin.gallery
            sonata.admin.group.adherent:
                keep_open:       false
                label:           "Adhérents"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-address-card"></i>'
                items:
                    - route:        adherent_create
                      label:        Ajouter
                      roles:        ['ROLE_SUPER_ADMIN', 'ROLE_ADMIN_ADHERENT_GERER_ALL', 'ROLE_ADMIN_ADHERENT_GERER_CREATE']
                    - admin.adherent.gerer
                    - admin.adherent.cotisations
                    - admin.adherent.profilsdecotisation
            sonata.admin.group.prestataire:
                keep_open:       false
                label:           "Prestataires"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-shopping-basket"></i>'
                items:
                    - route:        prestataire_create
                      label:        Ajouter
                      roles:        ['ROLE_SUPER_ADMIN', 'ROLE_ADMIN_PRESTATAIRE_GERER_ALL', 'ROLE_ADMIN_PRESTATAIRE_GERER_CREATE']
                    - admin.prestataire.gerer
                    - admin.prestataire.cotisations
                    - admin.groupepresta.gerer
                    - admin.etatpresta.gerer
                    - admin.rubrique.gerer
            sonata.admin.group.groupe:
                on_top:          true
                label:           "Groupes locaux"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-object-group"></i>'
                items:
                    - admin.groupe.gerer
            sonata.admin.group.comptoir:
                on_top:          true
                label:           "Comptoirs"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-home"></i>'
                items:
                    - admin.comptoir.gerer
            sonata.admin.group.operation:
                keep_open:       false
                label:           "Trésorerie"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-euro"></i>'
                items:
                    # - admin.operation.gerer
                    - admin.operation.adherent.gerer
                    - admin.operation.prestataire.gerer
                    - admin.operation.groupe.gerer
                    - admin.operation.comptoir.gerer
                    - admin.operation.siege.gerer
            sonata.admin.group.flux:
                keep_open:       false
                label:           "Flux / Actions"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-bank"></i>'
                items:
                    - admin.flux.gerer
                    - admin.all.cotisations
                    - admin.all.achatsmonnaie
                    - admin.all.demande.achatsmonnaie
                    - admin.dons
                    - admin.transfert.gerer
                    - admin.transaction.gerer
                    - admin.reconversion.gerer
            sonata.admin.group.thirdPartyFinancers:
                keep_open:       false
                label:           "Tiers financeurs"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-handshake-o"></i>'
                items:
                    - admin.thirdPartyFinancers
                    - admin.thirdPartyAllocationFunding
            # sonata.admin.group.helloasso:
            #     keep_open:       false
            #     on_top:          true
            #     label:           "HelloAsso"
            #     label_catalogue: SonataAdminBundle
            #     icon:            '<i class="fa fa-bookmark-o"></i>'
            #     items:
            #         - admin.helloasso
            # sonata.admin.group.compta:
            #     keep_open:       false
            #     on_top:          true
            #     label:           "Comptabilité"
            #     label_catalogue: SonataAdminBundle
            #     icon:            '<i class="fa fa-list"></i>'
            #     items:
            #         - admin.flux.gerer
            sonata.admin.group.news:
                keep_open:       false
                on_top:          true
                label:           "Actualités"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-newspaper-o"></i>'
                items:
                    - admin.news.gerer
            sonata.admin.group.document:
                keep_open:       false
                on_top:          true
                label:           "Documents"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-file"></i>'
                items:
                    - admin.document.gerer
            sonata.admin.group.page:
                keep_open:       false
                on_top:          true
                label:           "Pages"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-file-image-o"></i>'
                items:
                    - admin.page.gerer
            sonata.admin.group.faq:
                keep_open:       false
                on_top:          true
                label:           "FAQ"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-question"></i>'
                items:
                    - admin.faq.gerer
            # @TODO : gérer les "traductions" => erreur on update translation :
            #     php bin/console translation:update --force fr --prefix="" -v
            #  
            sonata.admin.group.traduction:
                keep_open:       false
                on_top:          true
                label:           "Traductions"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-flag"></i>'
                items:
                    - admin.traduction.gerer
            sonata.admin.group.menu_builder:
                keep_open:       false
                on_top:          true
                label:           config.label_menu
                label_catalogue: ProdigiousSonataMenuBundle
                icon:            '<i class="fa fa-magic"></i>'
                items:
                    - prodigious_sonata_menu.admin.menu
            sonata.admin.import:
                keep_open:       false
                on_top:          true
                label:           "Import"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-upload"></i>'
                items:
                    - admin.import
            sonata.admin.productsFamily:
                keep_open:       false
                on_top:          true
                label:           "Familles de produits"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-shopping-basket"></i>'
                items:
                    - admin.productsFamily
            sonata.admin.informationPopup:
                keep_open:       false
                on_top:          true
                label:           "Popups d'information"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-exclamation-circle"></i>'
                items:
                    - admin.informationPopup
            sonata.admin.group.globalparameter:
                keep_open:       false
                on_top:          true
                label:           "Configuration"
                label_catalogue: SonataAdminBundle
                icon:            '<i class="fa fa-cogs"></i>'
                items:
                    - admin.globalparameter.gerer

        # Gérer l'affichage du menu de l'admin en fonction des roles
        # groups:
        #     app.admin.group.content:
        #         label: app.admin.group.content
        #         label_catalogue: App
        #         items:
        #             - app.admin.post
        #         roles: [ ROLE_ONE, ROLE_TWO ]
    options:
        legacy_twig_text_extension: false

sonata_block:
    blocks:
        sonata.admin.block.admin_list:
            contexts: [admin]