generator: admingenerator.generator.doctrine
params:
  model: Muzich\CoreBundle\Entity\User
  namespace_prefix: Muzich
  bundle_name: AdminBundle
  fields:
    plain_password:
      formType: text
      dbType: text

builders:
  list:
    params:
      title: List for Users
      display: [ id, username, email, reputation, bad_count, enabled ]
      actions:
        new: ~
      object_actions:
        show: ~
        edit: ~
        delete: ~
  filters:
    params:
      display: [ username, email, enabled ]
  new:
    params:
      title: New User
      display:
        "General": [ username, plain_password, email, town, country ]
        "Resettings": [ email_requested, email_requested_datetime ]
        "Moderation": [ bad_report_count, moderated_element_count, moderated_tag_count, moderated_comment_count ]
        "System": [ cgu_accepted, mail_newsletter, mail_partner, enabled ]
      actions:
        save: ~
        list: ~
  edit:
    params:
      title: "You're editing the object \"%object%\"|{ %object%: User.username }|"
      display: 
        "General": [ username, plain_password, email, town, country ]
        "Resettings": [ email_requested, email_requested_datetime ]
        "Moderation": [ bad_report_count, moderated_element_count, moderated_tag_count, moderated_comment_count ]
        "System": [ cgu_accepted, mail_newsletter, mail_partner, enabled ]
      actions:
        save: ~
        list: ~
  show:
    params:
      title: "You're viewing the object \"%object%\"|{ %object%: User.username }|"
      display:
        "General": [ username, email, town, country ]
        "Resettings": [ email_requested, email_requested_datetime ]
        "Moderation": [ enabled, bad_report_count, moderated_element_count, moderated_tag_count, moderated_comment_count ]
        "System": [ cgu_accepted, mail_newsletter, mail_partner ]
      actions:
        Disable_and_delete_elements:
          route: Muzich_AdminBundle_Moderate_user_disable_and_delete_elements
          params:
            pk: "{{ User.id }}"
          confirm: Sure to DISABLE user and DELETE ALL HIS ELEMENTS ?
          icon: icon-trash
        list: ~
        new: ~
  delete: ~
