# You must use a tab-size of 4 spaces to edit this file.

zenario__languages:
    panels:
        countries:
            title: Countries
            multiple_select_mode_title: Select countries
            select_mode_title: Select a country
            db_items:
                table: '[[DB_PREFIX]][[ZENARIO_COUNTRY_MANAGER_PREFIX]]country_manager_countries AS c'
                id_column: c.id
            refiners:
                active:
                    sql: 'c.active = 1'
            refiner_required: false
            default_sort_column: country_name
            columns:
                country_code:
                    title: ISO code
                    db_column: c.id
                    show_by_default: true
                    searchable: true
                    always_show: true
                    width: small
                country_name:
                    title: Country name
                    db_column: c.english_name
                    show_by_default: true
                    searchable: true
                    always_show: true
                    width: large
                regions_count:
                    title: Regions
                    disallow_sorting: true
                    show_by_default: true
                    width: small
                vlp_phrase:
                    title: Visitor phrase code
                    disallow_sorting: true
                    db_column: "CONCAT('_COUNTRY_NAME_',c.id)"
                    show_by_default: false
                    width: large
                country_status:
                    title: Status
                    disallow_sorting: true
                    db_column: "IF(c.active=1,'active','suspended')"
                    show_by_default: true
                    format: enum
                    values:
                        active: Active
                        suspended: Suspended
                    always_show: true
                    width: xsmall
            quick_filter_buttons:
                all:
                    label: 'All'
                    column: country_status
                    remove_filter: true
                    hide_on_refiner: true
                active:
                    label: 'Active'
                    column: country_status
                    value: active
                    hide_on_refiner: true
                suspended:
                    label: 'Suspended'
                    column: country_status
                    value: suspended
                    hide_on_refiner: true
            item:
                css_class: zenario_country_manager_country
                name: Country
                names: Countries
                tooltip_when_link_is_active: "View this country's regions"
                link:
                    path: zenario__languages/panels/regions
                    branch: true
                    refiner: country_code_filter
            collection_buttons:
                create_country:
                    priv: _PRIV_MANAGE_COUNTRY
                    ord: 1
                    css_class: zenario_create_a_new
                    hide_on_filter: true
                    label: Create a country
                    admin_box:
                        path: zenario_country_manager__country
                        create_another: true
            item_buttons:
                edit_country:
                    label: Edit country
                    hide_in_select_mode: true
                    admin_box:
                        path: zenario_country_manager__country
                view_dropdown:
                    label: View
                    multiple_select: true
                    hide_when_children_are_not_visible: true
                edit_phrases:
                    parent: view_dropdown
                    label: Translated phrases
                    hide_in_select_mode: true
                    with_columns_set:
                        traits.show_localizations: true
                    admin_box:
                        path: zenario_phrase
                        key:
                            loadCountryName: true
                action_dropdown:
                    label: Actions
                    multiple_select: true
                    hide_when_children_are_not_visible: true
                activate_country:
                    parent: action_dropdown
                    priv: _PRIV_MANAGE_COUNTRY
                    label: Activate
                    with_columns_set:
                        traits.suspended: true
                    hide_in_select_mode: true
                    multiple_select: true
                    multiple_select_tooltip: Activate selected countries
                    ajax:
                        confirm:
                            message: 'Activate the country "[[country_name]]"?'
                            multiple_select_message: Activate the selected countries?
                            button_message: Activate
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            action: activate_country
                suspend_country:
                    parent: action_dropdown
                    priv: _PRIV_MANAGE_COUNTRY
                    label: Suspend
                    with_columns_set:
                        traits.active: true
                    hide_in_select_mode: true
                    multiple_select: true
                    multiple_select_tooltip: Suspend selected countries
                    ajax:
                        confirm:
                            message: 'Suspend the country "[[country_name]]"?'
                            multiple_select_message: Suspend the selected countries?
                            button_message: Suspend
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            action: suspend_country
                remove_country:
                    priv: _PRIV_MANAGE_COUNTRY
                    label: Delete country
                    hide_in_select_mode: true
                    multiple_select: true
                    multiple_select_label: Delete selected countries
                    ajax:
                        confirm:
                            message: |
                                Delete the country "[[country_name]]"?

                                This will also delete its name (phrase) as seen by visitors.
                            multiple_select_message: |
                                Delete the selected countries?

                                This will also delete their names (phrases) as seen by visitors.
                            button_message: Delete
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            action: delete_country
        regions:
            title: Regions
            name: Regions
            no_items_message: No regions found.
            db_items:
                table: |
                    [[DB_PREFIX]][[ZENARIO_COUNTRY_MANAGER_PREFIX]]country_manager_regions AS r
                id_column: r.id
            default_sort_column: region_name
            columns:
                region_name:
                    title: Region name
                    db_column: name
                    show_by_default: true
                    searchable: true
                region_type:
                    title: Region type
                    db_column: region_type
                    show_by_default: true
                    searchable: true
                    hidden: true

            refiners:
                parent_id:
                    sql: 'r.parent_id=[[REFINER_ID]]'
                country_code_filter:
                    sql: 'r.country_id=[[REFINER_ID]]'
            refiner_required: false
            item:
                css_class: zenario_country_manager_region
                name: Region
                names: Regions
                tooltip_when_link_is_active: 'View sub-regions of this region'
                link:
                    path: zenario__languages/panels/regions
                    branch: true
                    refiner: parent_id
            collection_buttons:
                create_region:
                    priv: _PRIV_MANAGE_COUNTRY
                    ord: 1
                    css_class: zenario_create_a_new
                    hide_on_filter: true
                    label: Create a region
                    admin_box:
                        path: zenario_country_manager__region
                        create_another: true
            item_buttons:
                edit_region:
                    label: Edit region
                    hide_in_select_mode: true
                    admin_box:
                        path: zenario_country_manager__region
                view_dropdown:
                    label: View
                    multiple_select: true
                    hide_when_children_are_not_visible: true
                edit_phrases:
                    parent: view_dropdown
                    label: Phrases
                    hide_in_select_mode: true
                    with_columns_set:
                        traits.show_localizations: true
                    admin_box:
                        path: zenario_phrase
                        key:
                            loadRegionName: true
                remove_region:
                    priv: _PRIV_MANAGE_COUNTRY
                    label: Delete
                    hide_in_select_mode: true
                    multiple_select: true
                    multiple_select_tooltip: Delete selected regions
                    ajax:
                        confirm:
                            message: 'Are you sure you wish to delete the region "[[region_name]]"?'
                            multiple_select_message: >
                                Are you sure you wish to delete the selected regions?
                            button_message: Delete
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            action: delete_region
