# You must use a tab-size of 4 spaces to edit this file.
---
zenario__content:
    panels:
        content: &contentPanelDefinition
            key:
                cType: ''
                cId: ''
                language: ''
                layoutId: ''
            title: All content items, flat view

            notice:
                show: false
                type: information
                message: 'If only 1 content item appears, this means that another content item uses a duplicate in the visitor version, but not in the latest draft.'
            
            #panel_type: list_with_subheadings
            #subheading_column: release_date
            
            slidedown_view_microtemplate: zenario_slidedown_view_content_item
            no_items_message: No content items have been created.
            db_items:
                table: >
                    [[DB_PREFIX]]content_items AS c
                    INNER JOIN [[DB_PREFIX]]translation_chains AS tc
                       ON c.equiv_id = tc.equiv_id
                      AND c.type = tc.type
                    INNER JOIN [[DB_PREFIX]]content_item_versions AS v
                       ON c.id = v.id
                      AND c.type = v.type
                      AND c.admin_version = v.version
                    LEFT JOIN [[DB_PREFIX]]menu_nodes AS mi
                       ON mi.target_loc = 'int'
                      AND mi.equiv_id = c.equiv_id
                      AND mi.content_type = c.type
                      AND mi.redundancy = 'primary'
                    LEFT JOIN [[DB_PREFIX]]menu_text AS mt
                       ON mt.menu_id = mi.id
                      AND mt.language_id = c.language_id
                    LEFT JOIN [[DB_PREFIX]]files AS f
                       ON f.id = v.file_id
                    LEFT JOIN [[DB_PREFIX]]file_extracts AS fe
                       ON fe.file_id = v.file_id
                    LEFT JOIN [[DB_PREFIX]]content_items_searchable_cache AS cc
                       ON v.id = cc.content_id
                      AND v.type = cc.content_type
                      AND v.version = cc.content_version
                id_column: c.tag_id
                
                custom_where_statement__not_trashed: |
                    WHERE c.status NOT IN ('trashed','deleted')
                custom_where_statement__trashed: |
                    WHERE c.status = 'trashed'
                custom_where_statement__hidden: |
                    WHERE c.status = 'hidden'
            quick_filter_buttons:
                activity:
                    label: 'All time'
                all_time:
                    parent: activity
                    label: 'All time'
                    column: activity_filter
                    value: ''
                    remove_filter: true
                today:
                    parent: activity
                    label: 'Today'
                    column: activity_filter
                    value: today
                last_3_days:
                    parent: activity
                    label: 'Last 3 days'
                    column: activity_filter
                    value: last_3_days
                last_15_days:
                    parent: activity
                    label: 'Last 15 days'
                    column: activity_filter
                    value: last_15_days
                admins:
                    label: 'By any administrator'
                all_admins:
                    parent: admins
                    label: 'By any administrator'
                    column: last_activity_admin_id
                    value: ''
                    remove_filter: true
                language:
                    label: 'All languages'
                all_languages:
                    parent: language
                    label: 'All languages'
                    column: language_id
                    value: ''
                    remove_filter: true
                content_type:
                    label: 'All content types'
                all_content_types:
                    parent: content_type
                    label: 'All content types'
                    column: type
                    value: ''
                    remove_filter: true
                status:
                    label: 'Any status'
                any_status:
                    parent: status
                    label: 'Any status'
                    column: status
                    value: ''
                    remove_filter: true
                has_draft:
                    parent: status
                    label: "Drafts"
                    column: status
                    value: has_draft
                is_published:
                    parent: status
                    label: "Published"
                    column: status
                    value: is_published
                is_unlisted:
                    parent: status
                    label: "Published unlisted"
                    column: status
                    value: is_unlisted
                x_with_draft:
                    parent: status
                    label: "Published or unlisted, with draft"
                    column: status
                    value: x_with_draft
                is_hidden:
                    parent: status
                    label: "Hidden"
                    column: status
                    value: is_hidden
                
            refiners:
                filter_by_lang: {}
                filter_exclude_documents:
                    sql: 'c.type != "document"'
                content_type:
                    sql: 'c.type = [[REFINER__CONTENT_TYPE]]'
                    
                    prefs_by_refiner: true
                    default_sort_column: last_activity_datetime
                    default_sort_desc: true
                    
                    prefs_by_refiner_value: {}
                            
                    
                language:
                    sql: 'c.language_id = [[REFINER__LANGUAGE]]'
                template:
                    sql: 'v.layout_id = [[REFINER__TEMPLATE]]'
                uses_access_code:
                    sql: 'v.access_code = [[REFINER__USES_ACCESS_CODE]]'
                add_translation_to_chain:
                    sql: ''
                filter_by_language_and_content_type: {}
                
                published_draft_and_unlisted_only:
                    sql: 'c.status IN("published", "published_with_draft", "unlisted", "unlisted_with_draft", "first_draft")'
                
                category:
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]category_item_link AS cal
                           ON cal.category_id = [[REFINER__CATEGORY]]
                          AND cal.equiv_id = c.equiv_id
                          AND cal.content_type = v.type
                menu_children:
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]menu_hierarchy AS mh
                           ON mh.ancestor_id = [[REFINER__MENU_CHILDREN]]
                          AND mh.child_id = mi.id
                          AND ([[REFINER__SHOW_LANGUAGE_CHOICE]] IS NULL OR c.language_id = [[REFINER__LANGUAGE]])
                special_pages:
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]special_pages AS sp
                           ON sp.equiv_id = c.id
                          AND sp.content_type = c.type
                find_duplicates:
                    sql: |
                        (select count(*) FROM [[DB_PREFIX]]content_item_versions as vfcd INNER JOIN [[DB_PREFIX]]content_items AS cfcd 
                            ON cfcd.id = vfcd.id AND cfcd.type = vfcd.type
                            WHERE vfcd.file_id = f.id AND vfcd.version IN (cfcd.admin_version, cfcd.visitor_version)) > 1
                work_in_progress:
                    sql: |
                        c.status IN ('first_draft','published_with_draft','hidden_with_draft','trashed_with_draft','unlisted_with_draft')
                module_usage:
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]layouts AS l
                           ON l.layout_id = v.layout_id
                        INNER JOIN [[DB_PREFIX]]layout_slot_link AS lsl
                           ON lsl.layout_id = l.layout_id
                        LEFT JOIN [[DB_PREFIX]]plugin_item_link AS piil
                           ON piil.content_id = v.id
                          AND piil.content_type = v.type
                          AND piil.content_version = v.version
                          AND piil.slot_name = lsl.slot_name
                    sql: 'piil.module_id = [[REFINER__MODULE_USAGE]]'
                module_effective_usage:
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]layouts AS l
                           ON l.layout_id = v.layout_id
                        INNER JOIN [[DB_PREFIX]]layout_slot_link AS lsl
                           ON lsl.layout_id = l.layout_id
                        LEFT JOIN [[DB_PREFIX]]plugin_item_link AS piil
                           ON piil.content_id = v.id
                          AND piil.content_type = v.type
                          AND piil.content_version = v.version
                          AND piil.slot_name = lsl.slot_name
                        LEFT JOIN [[DB_PREFIX]]plugin_layout_link AS pitl
                           ON pitl.layout_id = l.layout_id
                          AND pitl.slot_name = lsl.slot_name
                    sql: 'IFNULL(piil.module_id, pitl.module_id) = [[REFINER__MODULE_EFFECTIVE_USAGE]]'
                plugin_instance_usage:
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]layouts AS l
                           ON l.layout_id = v.layout_id
                        INNER JOIN [[DB_PREFIX]]layout_slot_link AS lsl
                           ON lsl.layout_id = l.layout_id
                        LEFT JOIN [[DB_PREFIX]]plugin_item_link AS piil
                           ON piil.content_id = v.id
                          AND piil.content_type = v.type
                          AND (piil.content_version = c.admin_version OR piil.content_version = c.visitor_version)
                          AND piil.slot_name = lsl.slot_name
                    sql: 'piil.instance_id = [[REFINER__PLUGIN_INSTANCE_USAGE]]'
                plugin_instance_effective_usage:
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]layouts AS l
                           ON l.layout_id = v.layout_id
                        INNER JOIN [[DB_PREFIX]]layout_slot_link AS lsl
                           ON lsl.layout_id = l.layout_id
                        LEFT JOIN [[DB_PREFIX]]plugin_item_link AS piil
                           ON piil.content_id = v.id
                          AND piil.content_type = v.type
                          AND (piil.content_version = c.admin_version OR piil.content_version = c.visitor_version)
                          AND piil.slot_name = lsl.slot_name
                        LEFT JOIN [[DB_PREFIX]]plugin_layout_link AS pitl
                           ON pitl.layout_id = l.layout_id
                          AND pitl.slot_name = lsl.slot_name
                    sql: 'IFNULL(piil.instance_id, pitl.instance_id) = [[REFINER__PLUGIN_INSTANCE_EFFECTIVE_USAGE]]'
                content_items_using_form:
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]plugin_settings AS ps
                           ON ps.foreign_key_to = 'user_form'
                          AND ps.foreign_key_id = [[REFINER_ID]]
                        INNER JOIN [[DB_PREFIX]]layouts AS l
                           ON l.layout_id = v.layout_id
                        INNER JOIN [[DB_PREFIX]]layout_slot_link AS lsl
                           ON lsl.layout_id = l.layout_id
                        LEFT JOIN [[DB_PREFIX]]plugin_item_link AS piil
                           ON piil.content_id = v.id
                          AND piil.content_type = v.type
                          AND (piil.content_version = c.admin_version OR piil.content_version = c.visitor_version)
                          AND piil.slot_name = lsl.slot_name
                        LEFT JOIN [[DB_PREFIX]]plugin_layout_link AS pitl
                           ON pitl.layout_id = l.layout_id
                          AND pitl.slot_name = lsl.slot_name
                    sql: 'IFNULL(piil.instance_id, pitl.instance_id) = ps.instance_id'
                content_items_using_image:
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]inline_images AS cii
                           ON cii.foreign_key_to = 'content'
                          AND cii.foreign_key_id = c.id
                          AND cii.foreign_key_char = v.type
                          AND cii.image_id = [[REFINER_ID]]
            item:
                css_class: content_published
            columns:
                tag:
                    title: ID/alias
                    width: large
                    searchable: true
                    ascii_only: true
                    db_column: c.tag_id
                    always_show: true
                    disallow_filtering: true
                    
                    # If sorting by content type, try to display in the same order as we show the types in the select lists
                    sort_column: |
                        c.type != 'html',
                        c.type != 'news',
                        c.type != 'blog',
                        c.type != 'document',
                        c.type,
                        c.id
                    sort_column_desc: |
                        c.type = 'html',
                        c.type = 'news',
                        c.type = 'blog',
                        c.type = 'document',
                        c.type DESC,
                        c.id DESC
                
                equiv_id:
                    db_column: c.equiv_id
                id:
                    db_column: c.id
                    align_right: true
                    width: xsmall
                type:
                    title: Content type
                    db_column: c.type
                    format: enum
                    width: xsmall
                
                # This dummy column is to create a quick filter on activity. The actually logic will be
                # implemented in the 
                activity_filter:
                    searchable: true
                
                language_id:
                    title: Language
                    db_column: c.language_id
                    format: language_english_name_with_id
                alias:
                    title: Alias
                    searchable: true
                    db_column: c.alias
                    width: small
                    hidden: true
                title:
                    title: Title
                    db_column: v.title
                    searchable: true
                    width: large
                    show_by_default: true
                
                #Ctype Document module inserts a column here with ord 7.

                release_date:
                    title: Release date
                    db_column: v.release_date
                    format: date
                    sort_desc_by_default: true

                number_of_categories:
                    title: Number of categories
                   # show_by_default: false
                    #hidden: true
                menunodecounter:
                    title: menunodecounter
                    hidden: true
                description:
                    title: Description
                    db_column: v.description
                    searchable: true
                    length_limit: 250
                keywords:
                    title: Keywords
                    db_column: v.keywords
                    searchable: true
                    length_limit: 250
                
                file_id:
                    title: File ID
                    db_column: f.id
                    searchable: No
                    width: xsmall
                    align_right: true
                    #On "Find duplicates" panel, this column will always be shown.
                    #The logic is in the class file.
                    visible_if: zenarioO.tuix.key && (zenarioO.tuix.key.cType == 'document' || zenarioO.tuix.key.cType == 'audio')
                checksum:
                    ord: 13.1
                    title: Checksum (short)
                    db_column: f.short_checksum
                    #On "Find duplicates" panel, this column will always be shown.
                    #The logic is in the class file.
                    visible_if: zenarioO.tuix.key && (zenarioO.tuix.key.cType == 'document' || zenarioO.tuix.key.cType == 'audio')
                filename:
                    ord: 13.2
                    title: Filename
                    db_column: v.filename
                    searchable: true
                    width: large
                    always_show: true
                    visible_if: zenarioO.tuix.key && (zenarioO.tuix.key.cType == 'document' || zenarioO.tuix.key.cType == 'audio')
                file_size:
                    ord: 13.3
                    title: File size
                    db_column: f.size
                    format: filesize
                    searchable: No
                    visible_if: zenarioO.tuix.key && (zenarioO.tuix.key.cType == 'document' || zenarioO.tuix.key.cType == 'audio')
                file_path:
                    db_column: f.path
                s3_filename:
                    ord: 13.4
                    title: S3 filename
                    db_column: v.s3_filename
                    searchable: No
                    width: large
                    visible_if: zenarioO.tuix.key && (zenarioO.tuix.key.cType == 'document' || zenarioO.tuix.key.cType == 'audio')
                s3_file_id:
                    ord: 13.5
                    title: S3 File ID
                    db_column: v.s3_file_id
                    searchable: No
                    hidden: true
                mime_type:
                    db_column: f.mime_type

                version:
                    title: Version
                    db_column: v.version
                    width: xsmall
                status:
                    title: Status
                    db_column: c.status
                    format: enum
                    values:
                        first_draft: First draft
                        published_with_draft: Published with draft
                        unlisted_with_draft: Published unlisted with draft
                        hidden_with_draft: Hidden with draft
                        trashed_with_draft: Trashed with draft
                        published: Published
                        unlisted: Published unlisted
                        hidden: Hidden
                        trashed: Trashed
                    #This property enable us to create filters on some specific combinations of values,
                    #e.g. to show all content items that have a draft.
                    filters_by_value:
                        has_draft: |
                            c.status IN ('first_draft', 'published_with_draft', 'unlisted_with_draft', 'hidden_with_draft', 'trashed_with_draft')
                        is_published: |
                            c.status IN ('published_with_draft', 'published')
                        is_unlisted: |
                            c.status IN ('unlisted_with_draft', 'unlisted')
                        x_with_draft: |
                            c.status IN ('published_with_draft', 'unlisted_with_draft')
                        is_hidden: |
                            c.status IN ('hidden_with_draft', 'hidden')
                permissions:
                    title: Permissions
                    db_column: tc.privacy
                    width: xlarge
                permissions_smart_group_id:
                    hidden: true
                    db_column: tc.smart_group_id
                admin_version_status:
                    db_column: c.status
                    format: enum
                    values:
                        first_draft: Draft
                        published_with_draft: Draft
                        unlisted_with_draft: Draft
                        hidden_with_draft: Draft
                        trashed_with_draft: Draft
                        published: Published
                        unlisted: Published unlisted
                        hidden: Hidden
                        trashed: Trashed
                visitor_version_status:
                    db_column: c.status
                    format: enum
                    values:
                        first_draft: '[Not published]'
                        published_with_draft: ""
                        unlisted_with_draft: '[Unlisted]'
                        hidden_with_draft: '[Hidden]'
                        trashed_with_draft: '[Trashed]'
                        published: ""
                        unlisted: '[Unlisted]'
                        hidden: '[Hidden]'
                        trashed: '[Trashed]'
                privacy:
                    db_column: tc.privacy
                    format: enum
                    values:
                        public:
                            label: 'Permissions: Public, visible to everyone'
                        logged_out:
                            label: 'Permissions: Public, only show to visitors who are NOT logged in'
                        logged_in:
                            label: 'Permissions: Private, only show to extranet users'
                        group_members:
                            label: 'Permissions: Private, only show to extranet users in group...'
                        in_smart_group:
                            label: 'Permissions: Private, only show to extranet users in smart group...'
                        logged_in_not_in_smart_group:
                            label: 'Permissions: Private, only show to extranet users NOT in smart group...'
                        with_role:
                            label: 'Permissions: Private, only show to extranet users with role...'
                        call_static_method:
                            label: "Permissions: Call a module's static method to decide"
                        send_signal:
                            label: 'Permissions: Send a signal to decide'
                at_location:
                    db_column: tc.at_location
                layout_status:
                    db_column: lay.status
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]layouts AS lay
                           ON lay.layout_id = v.layout_id
                    hidden: true
                last_activity_datetime:
                    title: Last activity
                    width: medium
                    show_by_default: true
                    db_column: v.last_activity_datetime
                    format: datetime
                    searchable: true
                last_activity_admin_id:
                    title: Last activity by
                    db_column: v.last_activity_admin_id
                    format: enum
                    show_by_default: true
                    width: large
                    sort_desc_by_default: true
                    searchable: true
                first_created_datetime:
                    title: First draft created
                    db_column: c.first_created_datetime
                    format: datetime
                    sort_desc_by_default: false
                created_datetime:
                    title: Latest draft created
                    db_column: v.created_datetime
                    show_by_default: false
                    width: large
                    sort_desc_by_default: true
                concealed_datetime:
                    title: Hidden/trashed
                    db_column: v.concealed_datetime
                    format: datetime
                    show_by_default: false
                    sort_desc_by_default: true
                concealed_by:
                    title: Hidden/trashed by
                    db_column: v.concealer_id
                    show_by_default: false
                    width: xlarge
                creating_author_id:
                    db_column: v.creating_author_id
                last_modified_datetime:
                    title: Last edited
                    db_column: v.last_modified_datetime
                    show_by_default: false
                    width: large
                    sort_desc_by_default: true
                last_modified_by_admin:
                    title: Last edited by
                    width: large
                    show_by_default: false
                last_author_id:
                    db_column: v.last_author_id
                published_datetime:
                    title: Published
                    db_column: v.published_datetime
                    format: datetime
                    sort_desc_by_default: true
                publisher_id:
                    db_column: v.publisher_id
                word_count:
                    title: Page word count
                    db_column: >
                        IFNULL(cc.content_item_text_wordcount, 0)
                    align_right: true
                    width: xsmall
                    show_by_default: true
                    tooltip: "Word count of version controlled plugins on the content item."
                attachment_word_count:
                    title: Attachment word count
                    db_column: >
                        IFNULL(cc.file_extract_wordcount, 0)
                    align_right: true
                    width: xsmall
                    show_by_default: true
                    tooltip: "Word count of the attachment on the content item."
                extract_pagecount:
                    title: Attachment page count
                    db_column: cc.file_extract_pagecount
                    empty_value: 'n/a'
                    align_right: true
                    width: xsmall
                    tooltip: |
                        Page count of the attachment on the content item,
                        as recorded by Amazon Textract.
                accesses:
                    title: User accesses
                    table_join: |
                        LEFT JOIN [[DB_PREFIX]]user_content_accesslog AS uca
                            ON v.id = uca.content_id
                           AND v.type = uca.content_type
                           AND v.version = uca.content_version
                    db_column: >
                        IF(COUNT(uca.user_id) > 0, COUNT(uca.user_id), 0)
                    align_right: true
                    width: xsmall
                    show_by_default: false
                lock_owner_id:
                    db_column: c.lock_owner_id
                writer_name:
                    title: Writer name
                    table_join: |
                        LEFT JOIN [[DB_PREFIX]]writer_profiles AS wp
                            ON wp.id = v.writer_id
                    db_column: CONCAT(wp.first_name, " ", wp.last_name)
                    searchable: true
                archives_exist:
                    hidden: true
                    width: medium
                    title: 'Archives exist?'
                    db_column: |
                        c.status != 'first_draft' AND (
                            SELECT 1
                            FROM [[DB_PREFIX]]content_item_versions AS pv
                            WHERE pv.id = c.id
                              AND pv.type = c.type
                              AND pv.version NOT IN (c.visitor_version, c.admin_version)
                            LIMIT 1
                        )
                    format: yes_or_no
                archived_versions_count:
                    hidden: true
                    db_column: |
                        (
                            SELECT COUNT(*)
                            FROM [[DB_PREFIX]]content_item_versions AS pv
                            WHERE pv.id = c.id
                              AND pv.type = c.type
                              AND pv.version NOT IN (c.visitor_version, c.admin_version)
                              AND c.status != 'first_draft'
                        )
                zenario_trans__links:
                    title: Translations
                    width: medium
                    align_right: true
                    show_by_default: true
                layout:
                    title: Layout
                    db_column: "CONCAT('L', IF (v.layout_id < 10, LPAD(CAST(v.layout_id AS CHAR), 2, '0'), CAST(v.layout_id AS CHAR)))"
                    show_by_default: true
                    width: xsmall
                    hidden: true
                layout_id:
                    db_column: v.layout_id
                    filter_format: enum
                    values:
                        - L01
                        - L02
                        #...
                menu:
                    title: Menu node
                    db_column: mt.name
                    show_by_default: true
                    item_link: menu_item
                    disallow_sorting: true
                menu_id:
                    db_column: mi.id
                scheduled_publish_datetime:
                    title: 'Scheduled publish date/time'
                    db_column: v.scheduled_publish_datetime
                    format: datetime
                pinned:
                    db_column: v.pinned
                    hidden: true
                
                head_html:
                    db_column: v.head_html
                    hidden: true
                foot_html:
                    db_column: v.foot_html
                    hidden: true
                
                    
            label_format_for_grid_view: |
                [[tag]]
                        Version [[version]]
            label_format_for_picked_items: '[[tag]] [[visitor_version_status]]'
            label_format_for_popouts: '[[tag]] Version [[version]] [[[admin_version_status]]]'
            default_sort_column: last_activity_datetime
            default_sort_desc: true
            collection_buttons:
                new_dropdown:
                    hide_when_children_are_not_visible: true
                    css_class: zenario_create_a_new
                    label: New
                create:
                    parent: new_dropdown
                    priv: _PRIV_EDIT_DRAFT
                    hide_in_select_mode: true
                    hide_on_filter: true
                    css_class: zenario_create_a_new
                    admin_box:
                        path: zenario_content
                        key:
                            create_from_content_panel: 1
                    #This button will be hidden on many refiners.
                    #Controlled in the PHP code.
                delete_trashed_items:
                    priv: _PRIV_DELETE_TRASHED_CONTENT_ITEMS
                    hide_in_select_mode: true
                    hide_when_no_search_results: true
                    hidden: true
                    label: Empty trash
                    ajax:
                        confirm:
                            #The confirmation message is created in the PHP class file.
                            button_message: Delete
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            delete_trashed_items: 1
                diagnostics_dropdown:
                    label: Diagnostics
                    hide_when_children_are_not_visible: true
    
                content_find_duplicates:
                    parent: diagnostics_dropdown
                    hide_in_select_mode: true
                    hide_when_no_search_results: true
                    hide_on_filter: true
                    visible_if: |
                        zenarioO.tuix.key &&
                        zenarioO.tuix.key.cType == 'document'
                    label: Find items with duplicate file attachments
                    link:
                        path: zenario__content/panels/content
                        refiner: find_duplicates
                export:
                    hide_when_no_search_results: true
                    hide_in_select_mode: true
                    visible_if: |
                        !zenarioO.filteredView
                    label: Export
                    admin_box:
                        path: zenario_export_content_items
                        key:
                            type: ''
                        pass_matched_ids: true
                export_filtered_list:
                    hide_when_no_search_results: true
                    hide_in_select_mode: true
                    visible_if: |
                        zenarioO.filteredView
                    label: Export filtered list
                    admin_box:
                        path: zenario_export_content_items
                        key:
                            type: ''
                            wasFiltered: true
                        pass_matched_ids: true
                
                settings_dropdown:
                    css_class: organizer_settings_dropdown
                    hide_when_children_are_not_visible: true
                    label: ⚙
                
                settings_ctype:
                    priv: _PRIV_EDIT_CONTENT_TYPE
                    parent: settings_dropdown
                    hide_in_select_mode: true
                    hidden: true
                    hide_on_refiner: find_duplicates
                    label: ''
                    admin_box:
                        path: zenario_content_type_details
                        key:
                            id: ''
                            openedFromCollectionButton: 1
                            
                settings_ctype_list:
                    priv: _PRIV_RUN_MODULE
                    parent: settings_dropdown
                    hide_in_select_mode: true
                    hide_on_refiner: &hide_settings_on_these_refiners
                        filter_by_lang: true
                        #content_type: true
                        #language: true
                        #template: true
                        category: true
                        menu_children: true
                        #special_pages: true
                        find_duplicates: true
                        #work_in_progress: true
                        module_usage: true
                        module_effective_usage: true
                        plugin_instance_usage: true
                        plugin_instance_effective_usage: true
                        content_items_using_form: true
                        hidden: true
                        content_items_using_image: true
                        zenario__locations__create_content: true
                        group_members: true
                        form_id: true
                        uses_access_code: true
                    label: Enable more content types
                    link:
                        path: zenario__library/panels/modules_running_and_suspended/collection_buttons/view_all_modules////~-zenario_ctype
                help:
                    label: Help
                    hide_in_select_mode: true
                    help:
                        message: |
                            Content items are the way that Zenario represents web pages.
                            
                            While HTML pages contain HTML and standard meta data, other content types can contain file attachments, dates, location information, reference numbers and other information.
                            
                            Content items are create initially in draft form, and must be published before regular visitors can see them. They undergo a version control process, and eventually can be trashed or deleted.
                help_trash:
                    label: Help
                    hidden: true
                    help:
                        message: >
                            This panel shows all of the content items that have been trashed.
                            To restore a content item, you need to re-draft and then publish it.
                help_hidden:
                    label: Help
                    hidden: true
                    help:
                        message: >
                            This panel shows all of the content items that have been hidden.
                            To restore a content item, you need to re-draft and/or publish it.
                    
                    
            inline_buttons:
                no_menu_linked:
                    css_class: zenario_not_at_menu
                    tooltip: "This content item is not in the menu"
                    visible_if: >
                        item.menunodecounter == 0
                menu_text_missing:
                    css_class: zenario_not_at_menu
                    tooltip: "This content item is in the menu, but the menu text is missing"
                    visible_if: >
                        item.menunodecounter == 'menu_node_text_missing'
                one_menu_linked:
                    css_class: zenario_at_menu_unique
                    tooltip: "This content item is in the menu"
                    visible_if: >
                        item.menunodecounter == 1
                one_or_more_menu_linked:
                    css_class: zenario_at_menu_primary
                    tooltip: "This content item has more than one menu node linking to it"
                    visible_if: >
                        item.menunodecounter != 'menu_node_text_missing' && item.menunodecounter > 1
                        
                layout:
                    css_class: zenario_layout_inline_button
                    label: |
                        [[layout]]
                    admin_box:
                        priv: _PRIV_EDIT_DRAFT
                        path: zenario_content_layout
                    visible_if: |
                        zenarioA.checkSpecificPerms(id)                        
                cant_change_layout:
                    css_class: zenario_layout_inline_button
                    label: |
                        [[layout]]
                    visible_if: |
                        !zenarioA.checkSpecificPerms(id)
                privacy:
                    css_class: privacy_inline_button
                    tooltip: "[[privacy]]"
                    admin_box:
                        path: zenario_content_privacy
                pinned:
                    css_class: pinned
                    tooltip: "This content item is pinned"
                    admin_box:
                        path: zenario_content
                    visible_if: item.pinned == 1
                not_pinned:
                    css_class: not_pinned
                    tooltip: "This content item is not pinned"
                    admin_box:
                        path: zenario_content
                    visible_if: item.pinned == 0
                no_categories:
                    css_class: no_categories
                    tooltip: "Content item is not in any categories"
                    admin_box:
                        path: zenario_content_categories
                    visible_if: >
                        item.number_of_categories == 0
                one_category:
                    css_class: one_or_more_categories
                    tooltip: "Content item is in one category"
                    admin_box:
                        path: zenario_content_categories
                    visible_if: >
                        item.number_of_categories == 1
                multiple_categories:
                    css_class: one_or_more_categories
                    tooltip: "Content item is in [[number_of_categories]] categories"
                    admin_box:
                        path: zenario_content_categories
                    visible_if: >
                        item.number_of_categories > 1
                view_frontend:
                    css_class: view_frontend
                    tooltip: Go to content item in front-end window
                    frontend_link: true
                    visible_if: >
                        zenario.engToBoolean(item.frontend_link)
                inspect:
                    css_class: inspect
                    tooltip: Quick-view in floating box
                    popout:
                        iframe: true
                    visible_if: >
                        zenario.engToBoolean(item.frontend_link)
            
            item_buttons:
                start_editing:
                    parent: action_dropdown
                    priv: _PRIV_EDIT_DRAFT
                    multiple_select: true
                    hide_in_select_mode: true
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id) && (item.status == 'published' || item.status == 'unlisted')
                    label: Start editing
                    multiple_select: true
                    multiple_select_label: Start editing selected items
                    without_columns_set:
                        ghost: true
                    ajax:
                        confirm:
                            message: |
                                Create a draft that can be edited?
                                                           
                                The published version will not be affected until the new draft is published.
                            multiple_select_message: |
                                Create drafts that can be edited?
                                                           
                                The published versions will not be affected until the new drafts are published.
                            button_message: Make a draft
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            create_draft: 1
                settings:
                    priv: _PRIV_EDIT_DRAFT
                    multiple_select: true
                    hide_in_select_mode: true
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    label: Edit content item metadata
                    multiple_select_label: Edit content items
                    admin_box:
                        path: zenario_content
                    without_columns_set:
                        ghost: true

                property_dropdown:
                    label: More properties
                    multiple_select: true
                    hide_when_children_are_not_visible: true
                
                alias:
                    parent: property_dropdown
                    hide_in_select_mode: true
                    priv: _PRIV_EDIT_DRAFT
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    label: Edit alias
                    admin_box:
                        path: zenario_alias
                    without_columns_set:
                        ghost: true
                        
                head__populated:
                    parent: property_dropdown
                    hide_in_select_mode: true
                    priv: _PRIV_MANAGE_ITEM_SLOT
                    label: HTML/JS in <head>
                    tooltip: 'Populated'
                    admin_box:
                        path: zenario_head_foot_slot
                        key:
                            mode: head
                            level: item
                    visible_if: item.head_html
                head__empty:
                    parent: property_dropdown
                    hide_in_select_mode: true
                    priv: _PRIV_MANAGE_ITEM_SLOT
                    label: HTML/JS in <head>
                    tooltip: 'Empty'
                    admin_box:
                        path: zenario_head_foot_slot
                        key:
                            mode: head
                            level: item
                    visible_if: !item.head_html
                foot__populated:
                    copy_of: head__populated
                    hide_in_select_mode: true
                    label: HTML/JS before </body>
                    tooltip: 'Populated'
                    admin_box:
                        key:
                            mode: foot
                    visible_if: item.foot_html
                foot__empty:
                    copy_of: head__empty
                    hide_in_select_mode: true
                    label: HTML/JS before </body>
                    tooltip: 'Empty'
                    admin_box:
                        key:
                            mode: foot
                    visible_if: !item.foot_html
                                    
                layout:
                    priv: _PRIV_EDIT_DRAFT
                    visible_if: |
                        ((window.__selectedType = undefined) || true)
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                        && (window.__selectedType === item.type || window.__selectedType === undefined)
                        && (window.__selectedType = item.type)
                    # Note - a little bit of hacky code here, as we don't have proper support for a feature.
                    # What I'm trying to do is make sure that the button is only shown when the content type
                    # of all of the selected items is the same.
                    parent: property_dropdown
                    hide_in_select_mode: true
                    label: Change layout
                    multiple_select: true
                    admin_box:
                        path: zenario_content_layout
                    without_columns_set:
                        ghost: true
                    
                ###############################################
                ### Dropdown for publishing and (un)locking ###
                ###############################################
                publishing_dropdown:
                    label: Publishing
                    multiple_select: true
                    hide_when_children_are_not_visible: true
                publish:
                    parent: publishing_dropdown
                    priv: _PRIV_PUBLISH_CONTENT_ITEM
                    hide_in_select_mode: true
                    label: Publish...
                    multiple_select: true
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id) &&
                        item.not_locked &&
                        !item.publication_time &&
                        (item.draft || item.status == 'hidden')
                    without_columns_set:
                        ghost: true
                    admin_box:
                        path: zenario_publish
                change_scheduled_publishing:
                    parent: publishing_dropdown
                    priv: _PRIV_PUBLISH_CONTENT_ITEM
                    hide_in_select_mode: true
                    label: Scheduled publishing...
                    multiple_select: true
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id) &&
                        item.publication_time
                    without_columns_set:
                        ghost: true
                    admin_box:
                        path: zenario_publish
                lock:
                    priv: _PRIV_EDIT_DRAFT
                    parent: publishing_dropdown
                    hide_in_select_mode: true
                    visible_if_for_all_selected_items: >
                        ('' + item.status).match(/draft/)
                        && item.lock_owner_id == 0
                        && zenarioA.checkSpecificPerms(id)
                    label: Lock this draft
                    ajax:
                        confirm:
                            message: |
                                Lock this draft?
                                
                                No other administrator will be able to edit it until it is unlocked, published or deleted.
                            button_message: Lock
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            lock: 1
                locked:
                    parent: publishing_dropdown
                    hide_in_select_mode: true
                    visible_if_for_all_selected_items: >
                        ('' + item.status).match(/draft/)
                        && item.lock_owner_id != 0
                        && item.lock_owner_id != zenario.adminId
                    label: Locked
                    css_class: zenario_item_locked
                locked_by_you:
                    parent: publishing_dropdown
                    hide_in_select_mode: true
                    visible_if_for_all_selected_items: >
                        ('' + item.status).match(/draft/)
                        && item.lock_owner_id != 0
                        && item.lock_owner_id == zenario.adminId
                    label: LOCKED by you
                    css_class: zenario_item_locked
                unlock:
                    priv: _PRIV_EDIT_DRAFT
                    parent: publishing_dropdown
                    hide_in_select_mode: true
                    visible_if_for_all_selected_items: >
                        ('' + item.status).match(/draft/)
                        && item.lock_owner_id != 0
                        && item.lock_owner_id == zenario.adminId
                        && zenarioA.checkSpecificPerms(id)
                        && !item.publication_time
                    label: Unlock
                    tooltip: This content item is locked by you
                    ajax:
                        confirm:
                            #message: |
                                #Are you sure that you wish to unlock this content item?
                                #
                                #Any administrator who has authoring permission will be able to make changes to it.
                            button_message: Unlock
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            unlock: 1
                force_open:
                    priv: _PRIV_CANCEL_CHECKOUT
                    parent: publishing_dropdown
                    hide_in_select_mode: true
                    visible_if_for_all_selected_items: >
                        ('' + item.status).match(/draft/)
                        && item.lock_owner_id != 0
                        && item.lock_owner_id != zenario.adminId
                        && !item.publication_time
                    label: Force unlock
                    tooltip: This content item is locked by another administrator
                    ajax:
                        confirm:
                            # This message is set dynamically
                            #message: |
                                #Are you sure that you wish to force-unlock on this content item?
                                #
                                #Any administrator who has authoring permission will be able to make changes to it.
                            button_message: Cancel lock
                            cancel_button_message: Leave it alone
                            message_type: warning
                        request:
                            unlock: 1
                
                ######################################################
                ### End of dropdown for publishing and (un)locking ###
                ######################################################
                    
                
                action_dropdown:
                    label: Actions
                    multiple_select: true
                    hide_when_children_are_not_visible: true
                category_dropdown:
                    label: Categories
                    multiple_select: true
                    hide_when_children_are_not_visible: true
                
                
                view_dropdown:
                    label: View
                    multiple_select: true
                    hide_when_children_are_not_visible: true
                
                view_frontend:
                    parent: view_dropdown
                    hide_in_select_mode: true
                    label: Content item in front-end
                    frontend_link: true
                inspect:
                    parent: view_dropdown
                    hide_in_select_mode: true
                    label: Quick-view in floating box
                    popout:
                        iframe: true
                    visible_if: >
                        zenario.engToBoolean(item.frontend_link)
                
                zenario_trans__view:
                    parent: view_dropdown
                    hide_in_select_mode: true
                    label: Translation chain
                    link:
                        path: zenario__content/panels/chained
                        refiner: zenario_trans__chained_in_link
                open:
                    parent: view_dropdown
                    label: Open file
                    hide_in_select_mode: true
                    onclick: |
                        var item = zenarioO.selectedItemDetails();
                        window.open(URLBasePath + 'zenario/file.php?usage=content&showInWindow=1&cID=' + item.id + '&cType=' + item.type);
                        return false;
                    visible_if: (item.type == 'document' || item.type == 'picture' || item.type == 'audio' || item.type == 'video')
                download:
                    parent: view_dropdown
                    label: Download
                    hide_in_select_mode: true
                    ajax:
                        confirm:
                            message: 'Download the file "[[filename]]"?'
                            button_message: Download
                            cancel_button_message: Cancel
                            message_type: question
                            download: true
                        request:
                            download: 1
                    with_columns_set:
                        has_file: true
                    without_columns_set:
                        ghost: true
                s3_download:
                    parent: view_dropdown
                    label: Download S3 file
                    hide_in_select_mode: true
                    hidden: true
                    ajax:
                        confirm:
                            message: 'Download the file "[[s3_filename]]" from S3?'
                            button_message: Download
                            cancel_button_message: Cancel
                            message_type: question
                            download: true
                        request:
                            s3_download: 1
                    with_columns_set:
                        has_s3file: true
                    without_columns_set:
                        ghost: true
                view_image:
                    parent: view_dropdown
                    hide_in_select_mode: true
                    label: View picture
                    popout:
                        href: 'zenario/file.php?usage=content&popout=1'
                    with_columns_set:
                        has_picture: true
                    without_columns_set:
                        ghost: true
                images:
                    parent: view_dropdown
                    hide_in_select_mode: true
                    label: Attached images
                    link:
                        path: zenario__library/panels/image_library
                        refiner: images_for_content_item
                    without_columns_set:
                        no_images: true
                        ghost: true
                view_slots:
                    priv: _PRIV_VIEW_SLOT
                    parent: view_dropdown
                    hide_in_select_mode: true
                    label: Slots and plugins on this content item
                    link:
                        path: zenario__content/panels/slots
                        refiner: content_item
                
                categories_add:
                    #This button only appears if multiple content items are selected.
                    priv: _PRIV_EDIT_DRAFT
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    parent: category_dropdown
                    hide_in_select_mode: true
                    label: Add to categories...
                    multiple_select_only: true
                    multiple_select: true
                    admin_box:
                        path: zenario_content_categories_add
                    without_columns_set:
                        ghost: true
                    disabled_if_for_any_selected_items: |
                        !zenarioO.tuix.custom__content_types_with_categories[item.type]
                    disabled_tooltip: Categories are not enabled for this content type
                categories:
                    #This button only appears if exactly 1 content item is selected.
                    #It allows an admin to add/remove a content item to/from
                    #any number of categories all within 1 admin box.
                    priv: _PRIV_EDIT_DRAFT
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    parent: category_dropdown
                    hide_in_select_mode: true
                    label: Change categories...
                    admin_box:
                        path: zenario_content_categories
                    without_columns_set:
                        ghost: true
                    disabled_if_for_any_selected_items: |
                        !zenarioO.tuix.custom__content_types_with_categories[item.type]
                    disabled_tooltip: Categories are not enabled for this content type
                categories_remove:
                    #This button only appears if multiple content items are selected.
                    priv: _PRIV_EDIT_DRAFT
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    parent: category_dropdown
                    hide_in_select_mode: true
                    label: Remove from categories...
                    multiple_select_only: true
                    multiple_select: true
                    admin_box:
                        path: zenario_content_categories_remove
                    without_columns_set:
                        ghost: true
                    disabled_if_for_any_selected_items: |
                        !zenarioO.tuix.custom__content_types_with_categories[item.type]
                    disabled_tooltip: Categories are not enabled for this content type
                
                copy_to_hierarchical_documents:
                    parent: action_dropdown
                    priv: _PRIV_EDIT_DOCUMENTS
                    hide_in_select_mode: true
                    multiple_select: true
                    label: Copy to hierarchical documents
                    admin_box:
                        path: zenario_copy_to_hierarchical_documents
                    visible_if_for_all_selected_items: (item.type == 'document') && (item.status != 'hidden')
                
                quick_add_to_menu:
                    parent: action_dropdown
                    priv: _PRIV_CREATE_DELETE_MENU_ITEM
                    hide_in_select_mode: true
                    label: Attach content item to menu
                    multiple_select: No
                    combine_items:
                        path: zenario__menu/panels/menu_position/refiners/create////
                        min_path: zenario__menu/panels/menu_position
                        target_path: zenario__menu/panels/menu_position
                        disallow_refiners_looping_on_min_path: true
                        one_to_one_choose_phrase: Create menu node
                        visible_if_for_all_selected_items: >
                            zenario.engToBoolean(item.menu_id) || zenario.engToBoolean(item.is_dummy_child)
                        request:
                            mass_add_to_menu: 1
                    with_columns_set:
                        unlinked: true
                    without_columns_set:
                        ghost: true
                        hidden: true
                mass_add_to_menu:
                    parent: action_dropdown
                    priv: _PRIV_CREATE_DELETE_MENU_ITEM
                    hide_in_select_mode: true
                    label: Attach items to menu
                    multiple_select: true
                    multiple_select_only: true
                    combine_items:
                        path: zenario__menu/panels/menu_position/refiners/create////
                        min_path: zenario__menu/panels/menu_position
                        target_path: zenario__menu/panels/menu_position
                        disallow_refiners_looping_on_min_path: true
                        many_to_one_choose_phrase: Create menu nodes
                        visible_if_for_all_selected_items: >
                            zenario.engToBoolean(item.menu_id) || zenario.engToBoolean(item.is_dummy_child)
                        request:
                            mass_add_to_menu: 1
                    with_columns_set:
                        unlinked: true
                    without_columns_set:
                        ghost: true
                        hidden: true
                duplicate:
                    parent: action_dropdown
                    hide_in_select_mode: true
                    priv: _PRIV_EDIT_DRAFT
                    # For limited admins: if the create button is not enabled, don't enable
                    # the duplicate button either
                    visible_if: |
                        !zenarioA.adminHasSpecificPerms
                        || zenarioO.tuix.collection_buttons.create
                    label: Duplicate
                    admin_box:
                        path: zenario_content
                        key:
                            duplicate: 1
                    without_columns_set:
                        ghost: true
                
                
                create_draft_by_copying:
                    parent: action_dropdown
                    hide_in_select_mode: true
                    priv: _PRIV_EDIT_DRAFT
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    with_columns_set:
                        not_locked: true
                        allow_copying_from_other: true
                    without_columns_set:
                        draft: true
                    label: Copy from other...
                    disabled_tooltip: "Please go to the relevant content type panel or the front-end to copy from another content item."
                    combine_items:
                        path: ""
                        min_path: zenario__content/panels/languages
                        max_path: zenario__content/panels/content
                        target_path: zenario__content/panels/content
                        one_to_one_choose_phrase: Copy from selected
                        ajax:
                            confirm:
                                button_message: Create draft and copy
                                cancel_button_message: Cancel
                                message_type: warning
                            request:
                                create_draft_by_copying: 1
                create_draft_by_overwriting:
                    parent: action_dropdown
                    hide_in_select_mode: true
                    priv: _PRIV_EDIT_DRAFT
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    with_columns_set:
                        draft: true
                        not_locked: true
                        allow_copying_from_other: true
                    label: Copy from other...
                    disabled_tooltip: "Please go to the relevant content type panel or the front-end to copy from another content item."
                    combine_items:
                        path: ""
                        min_path: zenario__content/panels/languages
                        max_path: zenario__content/panels/content
                        target_path: zenario__content/panels/content
                        one_to_one_choose_phrase: Copy from selected
                        ajax:
                            confirm:
                                button_message: Copy and overwrite
                                cancel_button_message: Cancel
                                message_type: warning
                            request:
                                create_draft_by_overwriting: 1
                staging_mode:
                    parent: action_dropdown
                    hide_in_select_mode: true
                    priv: _PRIV_EDIT_DRAFT
                    visible_if: |
                        zenarioA.siteSettings.enable_staging_mode
                        && item.draft
                        && item.privacy == 'public'
                    label: 'Staging mode'
                    admin_box:
                        path: zenario_content_staging_mode
                
                delist:
                    parent: action_dropdown
                    priv: _PRIV_PUBLISH_CONTENT_ITEM
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    hide_in_select_mode: true
                    label: Make unlisted
                    multiple_select: true
                    multiple_select_label: Make selected content items unlisted
                    with_columns_set:
                        delistable: true
                    without_columns_set:
                        ghost: true
                    ajax:
                        confirm:
                            html: true
                            message: |
                                <p>Make this content item published but unlisted?</p>
                                <p>Unlisted content items are not shown in:</p>
                                <ul><li>
                                        Menus
                                </li><li>
                                        Content summary lists
                                </li><li>
                                        Site maps
                                </li><li>
                                        Search results
                                </li></ul>
                                <p>They can still be reached by links from banners, WYSIWYG editors, Raw HTML/JavaScript snippets, and from external links to this site.</p>
                            multiple_select_message: |
                                <p>Make [[item_count]] content items published but unlisted?</p>
                                <p>Unlisted content items are not shown in:</p>
                                <ul><li>
                                        Menus
                                </li><li>
                                        Content summary lists
                                </li><li>
                                        Site maps
                                </li><li>
                                        Search results
                                </li></ul>
                                <p>They can still be reached by links from banners, WYSIWYG editors, Raw HTML/JavaScript snippets, and from external links to this site.</p>
                            button_message: Make unlisted
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            delist: 1
                relist:
                    parent: action_dropdown
                    priv: _PRIV_PUBLISH_CONTENT_ITEM
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    hide_in_select_mode: true
                    label: Make listed
                    multiple_select: true
                    multiple_select_label: Make selected content items listed
                    with_columns_set:
                        relistable: true
                    without_columns_set:
                        ghost: true
                    ajax:
                        confirm:
                            html: true
                            message: |
                                <p>Are you sure you want to make this content item listed?</p>
                                <p>When listed, the content item will appear in any menu/content summary list/search plugins as normal.</p>
                            multiple_select_message: |
                                <p>Are you sure you want to make [[item_count]] content items listed?</p>
                                <p>When listed, the content items will appear in any menu/content summary list/search plugins as normal.</p>
                            button_message: Make listed
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            relist: 1
                hide:
                    parent: action_dropdown
                    priv: _PRIV_PUBLISH_CONTENT_ITEM
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    hide_in_select_mode: true
                    label: Hide
                    multiple_select: true
                    multiple_select_label: Hide selected content items
                    with_columns_set:
                        hideable: true
                    without_columns_set:
                        ghost: true
                    admin_box:
                        path: zenario_hide
                trash:
                    parent: action_dropdown
                    priv: _PRIV_PUBLISH_CONTENT_ITEM
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    hide_in_select_mode: true
                    label: Trash
                    multiple_select_label: Trash selected content items
                    multiple_select: true
                    with_columns_set:
                        trashable: true
                    without_columns_set:
                        ghost: true
                    admin_box:
                        path: zenario_trash
                delete:
                    parent: action_dropdown
                    priv: _PRIV_EDIT_DRAFT
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                    hide_in_select_mode: true
                    label: Delete draft
                    multiple_select: true
                    multiple_select_label: Delete drafts
                    with_columns_set:
                        draft: true
                        deletable: true
                        not_locked: true
                    without_columns_set:
                        ghost: true
                    admin_box:
                        path: zenario_delete_draft
                delete_media_content_item:
                    parent: action_dropdown
                    priv: _PRIV_EDIT_DRAFT
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                        && (item.type == 'audio' || item.type == 'document' || item.type == 'picture' || item.type == 'video')
                        && item.status != 'first_draft'
                    hide_in_select_mode: true
                    label: Delete content item
                    multiple_select: true
                    multiple_select_label: Delete content items
                    with_columns_set:
                        deletable: true
                        not_locked: true
                    without_columns_set:
                        ghost: true
                    admin_box:
                        path: zenario_delete_media_content_item
                redraft:
                    parent: action_dropdown
                    hide_in_select_mode: true
                    priv: _PRIV_EDIT_DRAFT
                    label: Re-draft
                    css_class: create label_to_the_left
                    multiple_select: true
                    visible_if_for_all_selected_items: |
                        zenarioA.checkSpecificPerms(id)
                        && (item.status == 'hidden' || item.status == 'trashed')
                    ajax:
                        confirm:
                            message: |
                                Re-draft content item [[tag]]?

                                This action will create a new draft of this content item, which will be available to visitors when it's published.
                            multiple_select_message: |
                                Re-draft these content items?
                                
                                This action will create a new draft for each content item, which will be avaliable to visitors when they are published.
                            button_message: Re-draft
                            cancel_button_message: Cancel
                            message_type: question
                        request:
                            create_draft: 1
                delete_archives:
                    priv: _PRIV_PUBLISH_CONTENT_ITEM
                    visible_if_for_any_selected_items: |
                        item.archives_exist &&
                        zenarioA.checkSpecificPerms(id)
                    parent: action_dropdown
                    hide_in_select_mode: true
                    label: Delete archived versions
                    multiple_select: true
                    ajax:
                        confirm:
                            message: |
                                Delete [[archived_versions_count]] archived version(s) of "[[tag]]"?
                                
                                This will not affect published or draft versions.
                                
                                This cannot be undone.
                            multiple_select_message: |
                                Delete any archived versions of [[item_count]] content items?
                                
                                This will not affect published or draft versions.
                                
                                This cannot be undone.
                            button_message: Delete archived versions
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            delete_archives: 1
        
        trashed_content_items: *contentPanelDefinition
            default_sort_column: concealed_datetime
        
        hidden_content_items: *contentPanelDefinition
            default_sort_column: concealed_datetime
