# You must use a tab-size of 4 spaces to edit this file.
---
plugin_settings:
    module_class_name: zenario_videos_fea
    tabs:
        global_area:
            fields:
                mode: 
                    plugin_setting: 
                        name: mode
                    label: Mode
                    type: select
                    css_class: iconselectmenu
                    format_onchange: true
                    value: no_mode_selected
                    values:
                        no_mode_selected:
                            label: ' -- Inactive -- '
                        list_videos:
                            label: List videos
                        new_video:
                            label: New video
                        view_video:
                            label: View video
                        edit_video:
                            label: Edit video
                        search_videos:
                            label: Search videos
        first_tab:
            label: Options
            custom_templates:
                to_state1: &to_state1
                    group_with_previous_field: true
                    hide_with_previous_field: true
                    hide_if_previous_value_isnt: 1
                    same_row: true
                    pre_field_html: ' - goes to&nbsp; '
                    type: select
                    empty_value: 'No path defined in conductor state diagram'
                    values: slides_and_states
                    readonly: true
                    show_as_a_label_when_readonly: true
                    css_class: zfab_conductor_button_destination
                to_state2: &to_state2
                    group_with_previous_field: true
                    hide_with_previous_field: true
                    hidden: true
                    same_row: true
                    pre_field_html: ' and&nbsp; '
                    type: select
                    values: slides_and_states
                    readonly: true
                    show_as_a_label_when_readonly: true
                    css_class: zfab_conductor_button_destination
            fields:
                desc_snippet:
                    snippet:
                        html: "This tab shows the settings available for the currently selected mode."
                    visible_if:
                        lib.modeNotIn: no_mode_selected
                
                inactive_message:
                    visible_if:
                        lib.modeIn: no_mode_selected
                    snippet: 
                        html: 'This plugin is inactive. Please select a mode to make the plugin active.'
                
                selected_mode_has_no_settings:
                    visible_if:
                        lib.modeIn:
                            - new_video
                            - edit_video
                    snippet: 
                        html: 'This mode has no settings.'
                
                scope:
                    plugin_setting:
                        name: scope
                    visible_if:
                        lib.modeIn:
                            - list_videos
                    label: Scope
                    type: select
                    format_onchange: true
                    empty_value: ' -- Select -- '
                    value: all
                    values:
                        all:
                            label: Show all
                        specific_categories:
                            label: Show videos in specific categories
                        similar_videos:
                            label: Videos in the same categories as the video in the URL
                    validation:
                        required_if_not_hidden: Please select a scope
                
                filters:
                    type: grouping
                    snippet:
                        label: Filters
                        label_class: subheading
                show_fields:
                    type: grouping
                    snippet:
                        label: Show fields
                        label_class: subheading
                item_buttons:
                    type: grouping
                    snippet:
                        label: Item-specific buttons
                        label_class: subheading
                options:
                    type: grouping
                    snippet:
                        label: Options
                        label_class: subheading
                
                
                show_video_titles:
                    grouping: show_fields
                    label: Show video titles
                    visible_if:
                        lib.modeIn: 
                            - list_videos
                            - search_videos
                    plugin_setting:
                        name: show_video_titles
                    value: 1
                    type: checkbox
                show_images:
                    grouping: show_fields
                    label: Show images
                    visible_if:
                        lib.modeIn: 
                            - list_videos
                            - search_videos
                    plugin_setting:
                        name: show_images
                    value: 1
                    type: checkbox
                    format_onchange: true
                
                fall_back_to_default_image:
                    grouping: show_fields
                    indent: 1
                    hide_with_previous_field: true
                    visible_if: zenarioAB.value('show_images')
                    plugin_setting:
                        name: fall_back_to_default_image
                    label: Fall back to default image
                    type: checkbox
                    redraw_onchange: true
                    
                default_image_id:
                    grouping: show_fields
                    indent: 2
                    hide_with_previous_field: true
                    visible_if: zenarioAB.value('fall_back_to_default_image')
                    plugin_setting:
                        name: default_image_id
                    label: 'Default image:'
                    upload:
                        accept: 'image/png, image/jpeg, image/gif, image/svg+xml, image/webp'
                        extensions:
                            - .gif
                            - .jpg
                            - .jpeg
                            - .png
                            - .svg
                            - .webp
                        drag_and_drop: true
                    pick_items:
                        path: zenario__library/panels/image_library
                        select_phrase: Select image...
                    validation:
                        required_if_not_hidden: Please choose a default image.
                
                image_canvas:
                    grouping: show_fields
                    indent: 1
                    plugin_setting:
                        name: image_canvas
                    label: 'Image size:'
                    type: select
                    value: fixed_width_and_height
                    values:
                        fixed_width:
                            label: Constrain by width
                        fixed_height:
                            label: Constrain by height
                        fixed_width_and_height:
                            label: Constrain by width and height
                        unlimited:
                            label: Unlimited size
                    format_onchange: true
                image_width:
                    grouping: show_fields
                    indent: 2
                    plugin_setting:
                        name: image_width
                    label: 'Width:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a width in pixels.
                        numeric: The width must be a number.
                    value: "320"
                    maxlength: "5"
                    style: 'width: 5em;'
                    post_field_html: '&nbsp;pixels'
                image_height:
                    grouping: show_fields
                    indent: 2
                    plugin_setting:
                        name: image_height
                    label: 'Height:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a height in pixels.
                        numeric: The height must be a number.
                    value: "180"
                    maxlength: "5"
                    style: 'width: 5em;'
                    post_field_html: '&nbsp;pixels'
                list_videos__column__short_description:
                    grouping: show_fields
                    visible_if:
                        lib.modeIs: list_videos
                    plugin_setting:
                        name: list_videos__column__short_description
                    label: Short description
                    type: checkbox
                    value: 1
                search_videos__column__short_description:
                    grouping: show_fields
                    visible_if:
                        lib.modeIs: search_videos
                    plugin_setting:
                        name: search_videos__column__short_description
                    label: Short description
                    type: checkbox
                    value: 1
                list_videos__column__date:
                    grouping: show_fields
                    visible_if:
                        lib.modeIs: list_videos
                    plugin_setting:
                        name: list_videos__column__date
                    label: Date
                    type: checkbox
                    value: 1
                search_videos__column__date:
                    grouping: show_fields
                    visible_if:
                        lib.modeIs: search_videos
                    plugin_setting:
                        name: search_videos__column__date
                    label: Date
                    type: checkbox
                    value: 1
                show_dataset_fields:
                    grouping: show_fields
                    visible_if:
                        lib.modeIn:
                            - list_videos
                            - search_videos
                    plugin_setting:
                        name: show_dataset_fields
                    label: 'Show dataset fields:'
                    pick_items:
                        path: ''
                        multiple_select: true
                        reorder_items: true
                        visible_if_for_all_selected_items: item.is_field
                        disallow_refiners_looping_on_min_path: true
                        select_phrase: Select dataset fields...
                
                enable.view_video:
                    grouping: item_buttons
                    visible_if:
                        lib.key: usesConductor
                        lib.modeIn:
                            - list_videos
                            - search_videos
                    plugin_setting:
                        name: enable.view_video
                    label: View video
                    type: checkbox
                    value: true
                    redraw_onchange: true
                to_state1.view_video: *to_state1
                to_state2.view_video: *to_state2
                
                view_video_new_window:
                    grouping: item_buttons
                    visible_if:
                        lib.key: usesConductor
                        lib.modeIs: list_videos
                        lib.value: enable.view_video
                    indent: 1
                    plugin_setting:
                        name: view_video_new_window
                    label: Open in a new window
                    type: checkbox
                
                enable.edit_video:
                    grouping: item_buttons
                    visible_if:
                        lib.key: usesConductor
                        lib.modeIn: list_videos, view_video
                    plugin_setting:
                        name: enable.edit_video
                    label: Edit video
                    type: checkbox
                    redraw_onchange: true
                to_state1.edit_video: *to_state1
                to_state2.edit_video: *to_state2
                
                enable.delete_video:
                    grouping: item_buttons
                    visible_if:
                        lib.modeIn: view_video
                    plugin_setting:
                        name: enable.delete_video
                    label: Delete video
                    type: checkbox
                
                show_title:
                    grouping: options
                    label: Show overall title
                    visible_if:
                        lib.modeIn: 
                            - list_videos
                            - search_videos
                    plugin_setting:
                        name: show_title
                    value: 1
                    type: checkbox
                    redraw_onchange: true
                title_tags:
                    indent: 1
                    same_row: true
                    grouping: options
                    visible_if:
                        lib.value: show_title
                    hide_with_previous_field: true
                    plugin_setting:
                        name: title_tags
                    label: "Title tag:"
                    value: h2
                    type: select
                    values: &tags
                        h1:
                            label: h1
                            ord: 1
                        h2:
                            label: h2
                            ord: 2
                        h3:
                            label: h3
                            ord: 3
                        h4:
                            label: h4
                            ord: 4
                        h5:
                            label: h5
                            ord: 5
                        h6:
                            label: h6
                            ord: 6
                        h7:
                            label: h7
                            ord: 7
                        p:
                            label: p
                            ord: 8
                
                view_results_as:
                    grouping: options
                    visible_if:
                        lib.modeIn:
                            - list_videos
                            - search_videos
                    plugin_setting:
                        name: view_results_as
                    label: 'View results as:'
                    type: select
                    value: blocks
                    values:
                        blocks:
                            ord: 1
                            label: 'Blocks'
                        list:
                            ord: 2
                            label: 'List'
                        let_user_decide:
                            ord: 3
                            label: 'Let user decide'
                
                enable.new_video:
                    grouping: options
                    visible_if:
                        lib.key: usesConductor
                        lib.modeIs: list_videos
                    plugin_setting:
                        name: enable.new_video
                    label: New video (superuser feature)
                    type: checkbox
                    redraw_onchange: true
                to_state1.new_video: *to_state1
                to_state2.new_video: *to_state2
                
                show_video_title:
                    grouping: options
                    label: Show video title
                    visible_if:
                        lib.modeIn: 
                            - view_video
                    plugin_setting:
                        name: show_video_title
                    value: 0
                    type: checkbox
                    redraw_onchange: true
                video_title_tags:
                    indent: 1
                    same_row: true
                    grouping: options
                    visible_if:
                        lib.value: show_video_title
                    hide_with_previous_field: true
                    plugin_setting:
                        name: video_title_tags
                    label: "Video title tag:"
                    value: h1
                    type: select
                    values: *tags

                show_video_language:
                    grouping: options
                    label: Show language
                    visible_if:
                        lib.modeIn: 
                            - view_video
                    plugin_setting:
                        name: show_video_language
                    value: 0
                    type: checkbox
                show_privacy_info:
                    grouping: options
                    label: Show privacy info
                    visible_if:
                        lib.modeIn: 
                            - view_video
                    plugin_setting:
                        name: show_privacy_info
                    value: 0
                    type: checkbox
                
                highlight_currently_playing_video:
                    grouping: options
                    type: checkbox
                    label: Highlight currently playing video
                    plugin_setting:
                        name: highlight_currently_playing_video
                    visible_if:
                        lib.modeIs: list_videos
                
                in_any_or_all_categories:
                    plugin_setting:
                        name: in_any_or_all_categories
                    grouping: filters
                    indent: 1
                    visible_if:
                        lib.modeIs: list_videos
                        lib.scopeIs: specific_categories
                    type: select
                    value: "any"
                    values:
                        any:
                            ord: 1
                            label: 'In ANY of the categories below'
                        all:
                            ord: 2
                            label: 'In ALL of the categories below'
                
                category_filters:
                    grouping: filters
                    indent: 1
                    label: 'Categories:'
                    visible_if:
                        lib.modeIs: list_videos
                        lib.scopeIs: specific_categories
                    plugin_setting:
                        name: category_filters
                    type: checkboxes
                    note_below: Videos in ANY of the selected categories will be shown
                
                order_by:
                    grouping: options
                    label: 'Sort order:'
                    visible_if:
                        lib.modeIs: list_videos
                    plugin_setting:
                        name: order_by
                    type: radios
                    values:
                        alphabetic:
                            label: Alphabetical on title
                        date:
                            label: Most recent date first
                        custom_dataset_field:
                            label: Sort by custom dataset field...
                    value: alphabetic
                    redraw_onchange: true
                sort_by_custom_dataset_field:
                    grouping: options
                    indent: 1
                    visible_if: lib.modeIn('list_videos') && (lib.value('order_by') == 'custom_dataset_field')
                    plugin_setting:
                        name: sort_by_custom_dataset_field
                    label: 'Dataset field:'
                    pick_items:
                        path: ''
                        reorder_items: true
                        visible_if_for_all_selected_items: item.is_field
                        disallow_refiners_looping_on_min_path: true
                        select_phrase: Select dataset field...
                
                page_size:
                    grouping: options
                    visible_if:
                        lib.modeIn: search_videos
                    plugin_setting:
                        name: page_size
                    label: 'Number of items per page:'
                    type: select
                    empty_value: " -- Don't use pagination, show all rows -- "
                    values:
                        1: 1
                        2: 2
                        3: 3
                        4: 4
                        5: 5
                        6: 6
                        7: 7
                        8: 8
                        9: 9
                        10: 10
                        12: 12
                        15: 15
                        20: 20
                        50: 50
                
                search_weightings:
                    type: grouping
                    snippet:
                        label: Search weightings
                        label_class: subheading
                
                title_weighting:
                    grouping: search_weightings
                    plugin_setting:
                        name: title_weighting
                    label: 'Title weighting:'
                    type: select
                    values: &weightings_values
                        _NONE:
                            label: None (score of 0)
                        _LOW:
                            label: Low (score of 1)
                        _MEDIUM:
                            label: Medium (score of 3)
                        _HIGH:
                            label: High (score of 12)
                    value: _HIGH
                    visible_if: lib.modeIn('search_videos')
                description_weighting:
                    grouping: search_weightings
                    plugin_setting:
                        name: description_weighting
                    label: 'Description weighting:'
                    type: select
                    values: *weightings_values
                    value: _LOW
                    visible_if: lib.modeIn('search_videos')
