# You must use a tab-size of 4 spaces to edit this file.
---
zenario__users:
    panels:
        users:
            item_buttons:
                user_access_log:
                    ord: 0.2
                    parent: view_dropdown
                    hide_in_select_mode: Yes
                    label: This user's content item access log
                    link:
                        path: zenario__users/panels/access_log
                        branch: Yes
                        refiner: user

        access_log:
            priv: _PRIV_VIEW_USER
            title: Extranet user content item access log
            
            notice:
                show: false
                type: information
                message: ''
                
            db_items:
                table: '[[DB_PREFIX]]user_content_accesslog AS uca'
                id_column: uca.id
                group_by: >
                    uca.hit_datetime, uca.user_id, uca.content_id,
                    uca.content_type
            refiners:
                user:
                    sql: 'uca.user_id = [[REFINER_ID]]'
                content:
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]content_items AS c
                                                           ON c.tag_id = [[REFINER_ID]]
                                                          AND c.id = uca.content_id
                                                          AND c.type = uca.content_type
            columns:
                Time:
                    title: Time accessed
                    db_column: uca.hit_datetime
                    format: datetime
                    show_by_default: Yes
                User_Id:
                    title: User ID
                    db_column: uca.user_id
                    show_by_default: Yes
                Screen_name:
                    title: Screen name
                    db_column: u.screen_name
                    table_join: '[[DB_PREFIX]]users AS u ON u.id = uca.user_id'
                    searchable: Yes
                First_Name:
                    title: First name
                    db_column: u.first_name
                    show_by_default: Yes
                    table_join: '[[DB_PREFIX]]users AS u ON u.id = uca.user_id'
                    searchable: Yes
                Last_Name:
                    title: Last name
                    db_column: u.last_name
                    show_by_default: Yes
                    table_join: '[[DB_PREFIX]]users AS u ON u.id = uca.user_id'
                    searchable: Yes
                Email:
                    title: Email
                    db_column: u.email
                    show_by_default: Yes
                    table_join: '[[DB_PREFIX]]users AS u ON u.id = uca.user_id'
                    searchable: Yes
                Content_Item:
                    title: Content item
                    db_column: "CONCAT(uca.content_type, '_', uca.content_id)"
                    item_link: content_item
                    show_by_default: Yes
                Content_Item_Id:
                    title: Content item id
                    db_column: uca.content_id
                    item_link: content_item
                    show_by_default: Yes
                    server_side_only: Yes
                Content_Item_Type:
                    title: Content item type
                    db_column: uca.content_type
                    show_by_default: Yes
                    server_side_only: Yes
                Content_Item_Version:
                    title: Content item version
                    db_column: uca.content_version
                    show_by_default: Yes
                    server_side_only: Yes
            default_sort_column: Time
            default_sort_desc: Yes
            item:
                name: Log
                names: Logs
                css_class: log access_log
            no_items_message: No accesses have been logged.
            
            collection_buttons:
                export:
                    label: Export
                    admin_box:
                        path: zenario_export_access_log
                        key:
                            tag_id: ''
                    hide_in_select_mode: true
            
