# You must use a tab-size of 4 spaces to edit this file.
---
zenario__users:
    panels:
        groups:
            priv: _PRIV_VIEW_USER
            title: Groups
            db_items:
                table: |
                    [[DB_PREFIX]]custom_dataset_fields cdf
                    INNER JOIN [[DB_PREFIX]]custom_dataset_tabs cdtabs
                        ON cdtabs.name = cdf.tab_name
                        AND cdtabs.dataset_id = cdf.dataset_id
                id_column: cdf.id
                where_statement: WHERE cdf.type = 'group'
            no_items_message: No groups found
            default_sort_column: label
            label_format_for_picked_items: |
                [[group_label]]
            item:
                css_class: zenario_group
                tooltip_when_link_is_active: 'View users in the group "[[label]]"'
                link:
                    path: zenario__users/panels/users
                    refiner: group_members
            columns:
                id:
                    title: ID
                    format: id
                    db_column: cdf.id
                    width: xxsmall
                    align_right: true
                    show_by_default: false
                dataset_tab_name:
                    hidden: true
                    db_column: IF(cdtabs.label = '', cdtabs.default_label, cdtabs.label)
                dataset_tab_ord:
                    hidden: true
                    db_column: cdtabs.ord
                field_ord:
                    hidden: true
                    db_column: cdf.ord
                dataset_order:
                    title: Dataset order
                    db_column: CONCAT(cdtabs.ord, '.', cdf.ord)
                    show_by_default: false
                label:
                    title: Group name
                    db_column: cdf.label
                    searchable: true
                    width: large
                    always_show: true
                    css_class: label_column
                db_column:
                    title: Code name
                    db_column: cdf.db_column
                    show_by_default: false
                members:
                    title: Members
                    width: medium
                    show_by_default: true
                    align_right: true
                content_items:
                    title: Content items shared
                    tooltip: Content items to members of this group
                    width: medium
                    show_by_default: false
                    align_right: true
                protected:
                    db_column: cdf.protected
            collection_buttons:
                create:
                    label: Create a group
                    css_class: zenario_create_a_new
                    admin_box:
                        path: zenario_group
                        create_another: true
                    priv: _PRIV_MANAGE_GROUP
                help:
                    label: Help
                    hide_in_select_mode: true
                    help:
                        message: |
                            Groups can be use to organise users. 
                            
                            More specifically, by putting certain users in a group, they are given permissions view specific content items, or other material, on an extranet site.

            item_buttons:
                edit:
                    label: Edit group
                    admin_box:
                        path: zenario_group
                    priv: _PRIV_MANAGE_GROUP
                view_dropdown:
                    label: 'View'
                    hide_when_children_are_not_visible: true
                users:
                    label: 'Group members'
                    parent: view_dropdown
                    link:
                        path: zenario__users/panels/users
                        refiner: group_members
                content_items:
                    label: 'View content items protected by this group'
                    parent: view_dropdown
                    link:
                        path: zenario__content/panels/content
                        refiner: group_members
                delete:
                    label: Delete
                    ajax:
                        confirm:
                            message: Are you sure you want to delete the group "[[label]]"?
                            button_message: Delete
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            action: delete
                    priv: _PRIV_MANAGE_GROUP
                    disabled_if: item.protected
                    disabled_tooltip: |
                        This group is protected and cannot be deleted.