# You must use a tab-size of 4 spaces to edit this file.
---
zenario__users:
    panels:
        smart_groups:
            priv: _PRIV_VIEW_USER
            panel_type: multi_line_list_or_grid
            use_tall_rows: true
            
            item:
                name: Smart group
                names: Smart groups
                css_class: zenario_smart_group
            title: Smart groups
            select_mode_title: Select a smart group
            no_items_message: No smart groups are defined.
            no_items_in_search_message: No smart groups match your search.
            
            db_items:
                table: '[[DB_PREFIX]]smart_groups AS sg'
                id_column: sg.id
                client_side: true
            refiners:
                smart_newsletter_group:
                    title: Smart newsletter groups
                    select_mode_title: Select a smart newsletter group
                    no_items_message: No smart newsletter groups are defined.
                    no_items_in_search_message: No smart newsletter groups match your search.
                    sql: |
                        sg.intended_usage = 'smart_newsletter_group'
                smart_permissions_group:
                    title: Smart permissions groups
                    select_mode_title: Select a smart permissions group
                    no_items_message: No smart permissions groups are defined.
                    no_items_in_search_message: No smart permissions groups match your search.
                    sql: |
                        sg.intended_usage = 'smart_permissions_group'
            columns:
                name:
                    title: Smart group name
                    db_column: sg.name
                    searchable: true
                    width: large
                    always_show: true
                intended_usage_formatted_nicely:
                    title: Intended usage
                    parent: name
                    always_show: true
                intended_usage:
                    db_column: sg.intended_usage
                members_formatted_nicely:
                    title: Members
                    always_show: true
                    parent: name
                members:
                    title: Members (sortable)
                    width: small
                    align_right: true
                created_on:
                    title: Date/time created
                    db_column: sg.created_on
                    format: datetime
                last_modified_on:
                    title: Date/time last modified
                    db_column: sg.last_modified_on
                    format: datetime
                description:
                    title: Description
                    width: xxlarge
                    show_by_default: true
                    disallow_sorting: true
            
            collection_buttons:
                create_dropdown:
                    hide_when_children_are_not_visible: true
                    css_class: zenario_create_a_new
                    label: Create a smart group...
                    
                perms:
                    parent: create_dropdown
                    priv: _PRIV_MANAGE_GROUP
                    hide_on_filter: true
                    hide_in_select_mode: true
                    css_class: zenario_create_a_new
                    label: Create a smart group
                    admin_box:
                        path: zenario_smart_group
                        key:
                            intended_usage: smart_permissions_group
                    
                lists:
                    parent: create_dropdown
                    priv: _PRIV_MANAGE_GROUP
                    hide_on_filter: true
                    hide_in_select_mode: true
                    css_class: zenario_create_a_new
                    label: Create a smart newsletter group
                    admin_box:
                        path: zenario_smart_group
                        key:
                            intended_usage: smart_newsletter_group
                    
                
                help:
                    label: Help
                    help:
                        message: |
                            Smart groups are views of user/contact records that you can define. When creating a smart group, you define criteria based on fields on the user/contact data record, such as groups and checkbox flags.
                            
                            If you are using the Newsletter system to send mass emails, you should create a smart group for each mailing list you would like to send to.
            item_buttons:
                edit:
                    priv: _PRIV_VIEW_USER
                    hide_in_select_mode: true
                    label: Edit smart group
                    admin_box:
                        path: zenario_smart_group
                view_dropdown:
                    label: View
                    multiple_select: true
                    hide_when_children_are_not_visible: true
                action_dropdown:
                    label: Actions
                    hide_in_select_mode: true
                    hide_when_children_are_not_visible: true
                    multiple_select: true
                duplicate:
                    priv: _PRIV_VIEW_USER
                    parent: action_dropdown
                    hide_in_select_mode: true
                    label: Duplicate
                    admin_box:
                        path: zenario_smart_group
                        key:
                            duplicate: true
                group_members:
                    parent: view_dropdown
                    label: Members
                    link:
                        path: zenario__users/panels/users
                        branch: true
                        refiner: smart_group
                delete:
                    priv: _PRIV_MANAGE_GROUP
                    hide_in_select_mode: true
                    ord: 99
                    label: Delete
                    multiple_select: true
                    ajax:
                        confirm:
                            message: |
                                Are you sure you want to delete the smart group "[[name]]"? No users will be deleted.
                            multiple_select_message: |
                                Are you sure you wish to delete all of the selected smart groups? No users will be deleted.
                            button_message: Delete
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            delete: "1"
