# You must use a tab-size of 4 spaces to edit this file.
---
zenario__content:
    panels:
        categories:
            title: Content item categories
            panel_type: multi_line_list
            css_class: two_line_list_panel
            use_tall_rows: true
            no_items_message: There are no content item categories.
            db_items:
                table: '[[DB_PREFIX]]categories AS cat'
                custom_where_statement_top_level: WHERE cat.parent_id = 0
                id_column: cat.id
            refiners:
                top_level:
                    sql: cat.parent_id = 0
                parent_category:
                    sql: 'cat.parent_id = [[REFINER__PARENT_CATEGORY]]'
            item:
                name: Category
                names: Categories
                css_class: zenario_category_icon
                tooltip_when_link_is_active: 'View sub-categories of "[[name]]"'
                link:
                    path: zenario__content/panels/categories
                    refiner: parent_category
                    branch: Yes
            columns:
                id:
                    title: ID
                    db_column: cat.id
                    searchable: Yes
                    align_right: Yes
                    disallow_sorting: Yes
                name:
                    title: Name
                    searchable: Yes
                    db_column: cat.name
                    always_show: Yes
                    width: medium
                    css_class: label_column
                landing_page:
                    title: Landing page
                    show_by_default: true
                    width: medium
                    css_class: label_column
                landing_page_equiv_id:
                    title: Landing page equiv ID
                    hidden: true
                    db_column: cat.landing_page_equiv_id
                landing_page_content_type:
                    title: Landing page content type
                    hidden: true
                    db_column: cat.landing_page_content_type
                item_count:
                    title: Content items
                    db_column: |
                        (
                            SELECT COUNT(DISTINCT c.id, c.type)
                            FROM [[DB_PREFIX]]category_item_link AS cil
                            INNER JOIN [[DB_PREFIX]]content_items AS c
                               ON c.equiv_id = cil.equiv_id
                              AND c.type = cil.content_type
                              AND c.status NOT IN ('trashed','deleted')
                            WHERE cil.category_id = cat.id
                        )
                    show_by_default: Yes
                    align_right: Yes
                    disallow_sorting: Yes
                public:
                    title: Public
                    db_column: cat.public
                    format: yes_or_no
                    yes_phrase: Public
                    no_phrase: Private
                    always_show: Yes
                    parent: name
                path:
                    title: Path
                children:
                    title: Sub-categories
                    show_by_default: Yes
                    align_right: Yes
                parent_id:
                    hidden: true
                    db_column: cat.parent_id
            default_sort_column: name
            label_format_for_picked_items: |
                [[full_path_label]]
            label_format_for_grid_view: |
                [[name]]
                ([[item_count]])
            collection_buttons:
                create:
                    label: Create a category
                    priv: _PRIV_MANAGE_CATEGORY
                    css_class: zenario_create_a_new
                    hide_on_filter: true
                    admin_box:
                        path: zenario_categories
                        create_another: true
                help:
                    label: Help
                    priv: _PRIV_MANAGE_CATEGORY
                    css_class: zenario_common_features
                    hide_on_filter: true
                    help:
                        message: |
                            By categorising content items, you can make lists of content items appear to visitors automatically. These lists are called "Content summary lists".

                            Content summary lists are plugins; make sure the Content Summary List module is running, and then put one of its plugins on page, in order to see it.

                            Categories must be enabled on a per-content type basis. If you cannot categorise a content item, go to Configuration->Content Types and open the interface for this content type, to check whether it is enabled to use categories.
            item_buttons:
                edit:
                    priv: _PRIV_MANAGE_CATEGORY
                    label: Edit category
                    admin_box:
                        path: zenario_categories
                view_dropdown:
                    label: View
                    multiple_select: Yes
                    hide_when_children_are_not_visible: Yes
                create_sub_category:
                    priv: _PRIV_MANAGE_CATEGORY
                    label: Create a sub-category
                    admin_box:
                        path: zenario_categories
                        key:
                            sub_category: '1'
                    visible_if_for_all_selected_items: >
                        (!item.children) 
                view_content:
                    label: View content items in this category
                    link:
                        path: zenario__content/panels/content
                        refiner: category
                        branch: Yes
                    record_count: item_count
                delete:
                    priv: _PRIV_MANAGE_CATEGORY
                    label: Delete
                    multiple_select: Yes
                    multiple_select_tooltip: Delete categories
                    hide_in_select_mode: Yes
                    ajax:
                        confirm:
                            message: |
                                Are you sure you wish to delete the category "[[name]]"?
                            
                                Any sub-categories of this category will be deleted and all associations with content item will be removed, but no content items will be deleted.
                            multiple_select_message: |
                                Are you sure you wish to delete these categories?
                            
                                Any sub-categories will also be deleted and all associations with content will be removed.
                            
                                No content items will be deleted.
                            button_message: Delete
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            delete: "1"
