# You must use a tab-size of 4 spaces to edit this file.
---
plugin_settings:
    module_class_name: zenario_event_listing
    tabs:
        first_tab:
            label: Filter
            fields:
                period_mode:
                    label: 'Period:'
                    plugin_setting:
                        name: period_mode
                    type: select
                    values:
                        all_time:
                            ord: 1
                            label: Any time period
                        date_range:
                            ord: 2
                            label: Date range
                        year_period:
                            ord: 3
                            label: >
                                Current year, or next year if today is the last day of the
                                year
                        month_period:
                            ord: 4
                            label: Month period (use select boxes below to adjust this setting)
                        week_period:
                            ord: 5
                            label: Current week (Mon-Sun), or next week if today is a Sunday
                        today_only:
                            ord: 6
                            label: Today
                    value: all_time
                    format_onchange: Yes
                
                period_start_date:
                    plugin_setting:
                        name: period_start_date
                    label: 'Date range start:'
                    type: date
                    change_month_and_year: 1
                    indent: 1
                period_end_date:
                    plugin_setting:
                        name: period_end_date
                    label: 'Date range end:'
                    type: date
                    change_month_and_year: 1
                    indent: 1
                
                month_period_operator:
                    label: 'Show event if occurs:'
                    plugin_setting:
                        name: month_period_operator
                    type: select
                    values:
                        eq: in
                        ge: in or after
                    post_field_html: '&nbsp;'
                    indent: 1
                month_period_value:
                    plugin_setting:
                        name: month_period_value
                    same_row: Yes
                    indent: 1
                    type: select
                    values:
                        - 
                            label: this month
                            ord: 1
                        - 
                            label: next month
                            ord: 2
                        - 
                            label: current month + 2
                            ord: 3
                        - 
                            label: current month + 3
                            ord: 4
                        - 
                            label: current month + 4
                            ord: 5
                        - 
                            label: current month + 5
                            ord: 6
                        - 
                            label: current month + 6
                            ord: 7
                        - 
                            label: current month + 7
                            ord: 8
                        - 
                            label: current month + 8
                            ord: 9
                        - 
                            label: current month + 9
                            ord: 10
                        - 
                            label: current month + 10
                            ord: 11
                        - 
                            label: current month + 11
                            ord: 12
                        - 
                            label: current month + 12
                            ord: 13
                
                
                future:
                    label: 'Show future events'
                    plugin_setting:
                        name: future
                    type: checkbox
                    value: "1"
                    side_note: Show events whose start date is in the future.
                ongoing:
                    label: 'Show current events'
                    plugin_setting:
                        name: ongoing
                    type: checkbox
                    value: "1"
                    side_note: Show today's events (or which have started already and whose end date is in the future).
                past:
                    label: 'Show past events'
                    plugin_setting:
                        name: past
                    type: checkbox
                    value: "1"
                    side_note: Show events whose end date is in the past.
                
                category_list:
                    label: 'Category:'
                    plugin_setting:
                        name: category_list
                        foreign_key_to: categories
                    type: checkboxes
                    side_note: >
                        Only event content items in ALL of the selected categories will be shown.
                location:
                    label: 'Show events in:'
                    plugin_setting:
                        name: location
                        foreign_key_to: categories
                    type: select
                    values:
                        all_locations:
                            label: Any location
                        location_associated_with_content_item:
                            label: Location associated with the event content item
                language_selection:
                    plugin_setting:
                        name: language_selection
                    label: 'Only show events in:'
                    type: select
                    value: visitor
                    values:
                        visitor:
                            ord: 1
                            label: "Visitor's language"
                        all:
                            ord: 2
                            label: All enabled languages
                        specific_languages:
                            ord: 3
                            label: Specific languages
                    format_onchange: Yes
                specific_languages:
                    label: 'Select languages:'
                    plugin_setting:
                        name: specific_languages
                    type: checkboxes
                    load_values_from_organizer_path: zenario__languages/panels/languages
                    validation:
                        required_if_not_hidden: Please select a language.
                    indent: 1
        overall_list:
            label: Overall list
            fields:
                heading:
                    label: 'Heading of overall list:'
                    plugin_setting:
                        name: heading
                    type: radios
                    values:
                        dont_show: "Don't show"
                        show_heading: Show text
                        show_period_name: Show period name
                    value: show_heading
                    format_onchange: Yes
                
                heading_text:
                    plugin_setting:
                        name: heading_text
                    label: 'Heading text:'
                    type: text
                    value: 'List of events'
                    indent: 1
                    validation:
                        required_if_not_hidden: 'Please type in the heading text.'
                heading_tags:
                    #If the plugin is supposed to show the period name,
                    #the tag selector will appear as a separate row.
                    #If the plugin is supposed to show a specific heading,
                    #the tag selector will appear on the same row as the heading text box.
                    #Also the indentation will be handled separately.
                    #All the logic is in the PHP class.
                    plugin_setting:
                        name: heading_tags
                    label: 'Heading tag:'
                    type: select
                    values: &tags
                        h1: <h1>
                        h2: <h2>
                        h3: <h3>
                        h4: <h4>
                        h5: <h5>
                        h6: <h6>
                        p: <p>
                    value: h2
                
                show_headings_if_items:
                    plugin_setting:
                        name: show_headings_if_items
                    label: 'If some content items match the filter:'
                    type: select
                    empty_value: |
                        Don't show a message
                    values:
                        1:
                            label: Show a message
                    value: ""
                    format_onchange: true
                    
                heading_if_items:
                    plugin_setting:
                        name: heading_if_items
                        translate: true
                    label: |
                        Message text:
                    type: text
                    value: 'Latest events'
                    indent: 1
                    validation:
                        required_if_not_hidden: 'Please type in the message text.'
                heading_tags_if_items:
                    plugin_setting:
                        name: heading_tags_if_items
                    label: 'Title heading tags'
                    type: select
                    values: *tags
                    value: h3
                    same_row: true
                show_headings_if_no_items:
                    plugin_setting:
                        name: show_headings_if_no_items
                    label: |
                        If no content items match the filter:
                    type: select
                    empty_value: |
                        Show no output
                    values:
                        1:
                            label: Show a message
                    value: 1
                    format_onchange: true
                    
                heading_if_no_items:
                    plugin_setting:
                        name: heading_if_no_items
                        translate: true
                    label: |
                        Message if no items to list:
                    type: text
                    value: "There are no events to show"
                    indent: 1
                    validation:
                        required_if_not_hidden: 'Please type in the message text.'
                heading_tags_if_no_items:
                    plugin_setting:
                        name: heading_tags_if_no_items
                    label: 'Title heading tags'
                    type: select
                    values: *tags
                    value: h3
                    same_row: true
                
                sort_field:
                    label: 'Sort field:'
                    plugin_setting:
                        name: sort_field
                    type: radios
                    values:
                        start_date:
                            ord: 1
                            label: Start date
                        end_date:
                            ord: 2
                            label: End date
                    value: start_date
                    format_onchange: true
                sort_order:
                    label: 'Sort order:'
                    plugin_setting:
                        name: sort_order
                    type: radios
                    values:
                        most_recent_first: Most recent/latest first
                        older_first: Oldest/earliest first
                    value: most_recent_first
                group_events_by_year_and_month:
                    label: 'Group events by year and month'
                    plugin_setting:
                        name: group_events_by_year_and_month
                    type: checkbox
                    value: false
                    format_onchange: true
                
                show_more_link:
                    plugin_setting:
                        name: show_more_link
                    label: |
                        For overall list, show a link to a "more info" content item
                    type: checkbox
                    value: false
                    side_note: >
                        Use this to link to another page with another list of events.
                    format_onchange: true
                more_link_text:
                    plugin_setting:
                        name: more_link_text
                        is_searchable_content: true
                        translate: true
                    show_phrase_icon: true
                    label: |
                        "More info" link text:
                    type: text
                    width: 150
                    maxlength: 255
                    value: "More events..."
                    indent: 1
                more_hyperlink_target:
                    plugin_setting:
                        name: more_hyperlink_target
                        foreign_key_to: content
                    label: |
                        "More info" link destination:
                    pick_items:
                        path: zenario__content/panels/content/refiners/filter_by_lang////
                        min_path: zenario__content/panels/content
                        max_path: zenario__content/panels/content
                        target_path: zenario__content/panels/content
                        disallow_refiners_looping_on_min_path: true
                        select_phrase: Select a content item...
                        hide_remove_button: true
                    validation:
                        required_if_not_hidden: Please select a content item
                    indent: 1
        each_item:
            label: Each item
            fields:
                show_event_title:
                    label: 'Show event name (content item browser title)'
                    plugin_setting:
                        name: show_event_title
                    type: checkbox
                    value: "1"
                    redraw_onchange: true
                event_title_tags:
                    indent: 1
                    plugin_setting:
                        name: event_title_tags
                    type: select
                    values: *tags
                    value: h2
                    visible_if: lib.value('show_event_title')
                    same_row: true
                show_event_summary:
                    label: 'Show event summary'
                    plugin_setting:
                        name: show_event_summary
                    type: checkbox
                    value: "1"
                show_featured_image:
                    plugin_setting:
                        name: show_featured_image
                    label: "Show featured image"
                    type: checkbox
                    value: ""
                    format_onchange: Yes
                fall_back_to_default_image:
                    plugin_setting:
                        name: fall_back_to_default_image
                    label: Fall back to default image
                    type: checkbox
                    format_onchange: true
                    side_note: |
                        If the content item being listed doesn't have a featured image, then display a default image instead.
                    indent: 1
                default_image_id:
                    plugin_setting:
                        name: default_image_id
                    label: 'Default image:'
                    upload:
                        multi: false
                        accept: 'image/png, image/jpeg, image/gif, image/webp'
                        extensions:
                            - .gif
                            - .jpg
                            - .jpeg
                            - .png
                            - .webp
                        drag_and_drop: true
                        reorder_items: false
                    pick_items:
                        path: zenario__library/panels/image_library
                        min_path: zenario__library/panels/image_library
                        max_path: zenario__library/panels/image_library
                        target_path: zenario__library/panels/image_library
                        select_phrase: Select image...
                    indent: 2
                    validation:
                        required_if_not_hidden: Please choose a default image.
                retina:
                    indent: 1
                    plugin_setting:
                        name: retina
                    label: 'Output a retina image'
                    type: checkbox
                    value: ""
                    side_note: |
                        <% if (zenarioAB.value('canvas') == 'unlimited') { %>
                            Halve the width &amp; height at which the image is displayed,
                            so it appears crisp on retina screens.
                        <% } else { %>
                            If the source image is large enough
                            output the resized image at twice its displayed width &amp; height,
                            so it appear crisp on retina screens.
                            This will increase the download size.
                            <br/>
                            If the source image is not large enough this will have no effect.
                        <% } %>
                    enable_microtemplates_in_properties: true
                canvas:
                    indent: 1
                    plugin_setting:
                        name: canvas
                    label: 'Image canvas:'
                    type: select
                    values:
                        unlimited:
                            ord: 1
                            label: Unlimited size
                        fixed_width:
                            ord: 2
                            label: Constrain by width
                        fixed_height:
                            ord: 3
                            label: Constrain by height
                        fixed_width_and_height:
                            ord: 4
                            label: Constrain by width and height
                        resize_and_crop:
                            ord: 5
                            label: Resize and crop
                    value: fixed_width
                    format_onchange: Yes
                width:
                    plugin_setting:
                        name: width
                    label: 'Width:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a width.
                        numeric: The width must be a number.
                    value: 240
                    maxlength: "5"
                    style: 'width: 5em;'
                    align_right: 1
                    post_field_html: '&nbsp;pixels'
                    indent: 2
                height:
                    plugin_setting:
                        name: height
                    label: 'Height:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a height.
                        numeric: The height must be a number.
                    value: 160
                    maxlength: "5"
                    style: 'width: 5em;'
                    align_right: 1
                    post_field_html: '&nbsp;pixels'
                    indent: 2
                
                
                
                excerpt_length:
                    label: 'Show characters from description:'
                    plugin_setting:
                        name: excerpt_length
                    type: select
                    values:
                        50:
                            label: "50"
                        100:
                            label: "100"
                        200:
                            label: "200"
                        500:
                            label: "500"
                    value: "200"
                show_location:
                    label: 'Show location'
                    plugin_setting:
                        name: show_location
                    type: checkbox
                    value: 0
                    format_onchange: true
                show_location_name:
                    label: 'Show venue name'
                    indent: 1
                    plugin_setting:
                        name: show_location_name
                    type: checkbox
                    value: 1
                    format_onchange: true
                show_location_city:
                    label: 'Show city'
                    indent: 1
                    plugin_setting:
                        name: show_location_city
                    type: checkbox
                    value: 1
                    format_onchange: true
                show_location_country:
                    label: 'Show country'
                    indent: 1
                    plugin_setting:
                        name: show_location_country
                    type: checkbox
                    value: 1
                    format_onchange: true
                date_display:
                    label: 'Date display:'
                    plugin_setting:
                        name: date_display
                    type: select
                    values:
                        dont_show:
                            label: "Don't show date"
                        show_start_date_only:
                            label: Show start date
                        show_start_and_end_date:
                            label: Show start and end date
                    value: show_start_and_end_date
                    format_onchange: Yes
                date_format:
                    visible_if: "zenarioAB.value('date_display') != 'dont_show'"
                    plugin_setting:
                        name: date_format
                    label: 'Date format:'
                    type: radios
                    value: _MEDIUM
                    values:
                        _SHORT:
                            ord: 1
                            label: Short
                        _MEDIUM:
                            ord: 2
                            label: Medium
                        _LONG:
                            ord: 3
                            label: Long
                    requires: show_dates
                    indent: 1
                time_display:
                    label: 'Time display:'
                    plugin_setting:
                        name: time_display
                    type: select
                    values:
                        dont_show:
                            label: "Don't show time"
                        show_start_time_only:
                            label: Show start time
                        show_start_and_end_time:
                            label: Show start and end time
                    value: show_start_and_end_time
                show_content_items_category:
                    plugin_setting:
                        name: show_content_items_category
                    label: Show category
                    type: checkbox
                    value: ""
                    side_note: |
                        The content item's lowest level public category will be displayed. Private categories will NOT be shown.
                make_event_elements_equal_height:
                    label: 'Make all event elements equal height'
                    side_note: 'Use this to improve the layout if your CSS causes events to be listed in a 2-d grid.'
                    plugin_setting:
                        name: make_event_elements_equal_height
                    type: checkbox
                    value: 0
                    format_onchange: yes
        pagination:
            label: Pagination
            fields:
                offset:
                    plugin_setting:
                        name: offset
                    label: 'Offset results:'
                    type: select
                    values:
                        0: 
                            label: "No offset"
                            ord: 0
                        1: "1"
                        2: "2"
                        3: "3"
                        4: "4"
                        5: "5"
                        6: "6"
                        7: "7"
                        8: "8"
                        9: "9"
                        10: "10"
                        10: "11"
                        12: "12"
                        15: "15"
                        20: "20"
                        50: "50"
                    value: "0"
                    side_below: >
                        e.g. if you select 1 your results will start from the 2nd resulting event
                page_size:
                    plugin_setting:
                        name: page_size
                    label: 'Number of results:'
                    type: select
                    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"
                        999999:
                            label: All possible
                    value: "5"
                    side_note: >
                        If pagination is enabled, this number of summaries will be
                        shown on each page.
                show_pagination:
                    plugin_setting:
                        name: show_pagination
                    label: 'Paginate'
                    type: checkbox
                    value: "1"
                    format_onchange: Yes
                pagination_style:
                    plugin_setting:
                        name: pagination_style
                    label: 'Pagination style:'
                    type: select
                    value: zenario_common_features::pagCloseWithNPIfNeeded
                    indent: 1
                page_limit:
                    plugin_setting:
                        name: page_limit
                    label: 'Maximum number of pages:'
                    type: select
                    values:
                        5: "5"
                        9: "9"
                        20: "20"
                        99: "99"
                    value: "9"
                    indent: 1
