# You must use a tab-size of 4 spaces to edit this file.
---
zenario__content:
    panels:
        categories:
            title: Content item categories
            help_text_title: Content item categories
            panel_type: multi_line_list
            css_class: two_line_list_panel
            use_tall_rows: true
            no_items_message: No categories found
            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:
                css_class: zenario_category_icon
                tooltip_when_link_is_active: 'View sub-categories of "[[name]]"'
                link:
                    path: zenario__content/panels/categories
                    refiner: parent_category
            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 organise content in a better way, and control how it is presented to site visitors.
                            
                            A common way to use categories is to use a "content summary list" plugin, which automatically presents a list of content items in a given category to visitors.

                            To do this, make sure the Content Summary List module is running, then put one of its plugins on an HTML page. You should be able to edit the plugin's settings to specify that it lists content items from a given category.

                            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
                    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: |
                                Delete the category "[[name]]"?
                            
                                Any sub-categories of this category will be deleted and any associations with content items will be removed.
                                
                                No content items will be deleted.
                            multiple_select_message: |
                                Delete the selected categories?
                            
                                Any sub-categories will also be deleted and any 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"