name: zab/downloads
title: "Downloads"
description: "Block selected downloads"
group: Content Elements
priority: -4
prefixFields: true
prefixType: full
fields:
  - identifier: Zab/GeneralRow
    type: Basic

  # Tab Cards
  - identifier: tab_cards
    type: Tab
    label: "Cards"
  - identifier: row_1
    type: Palette
    fields:
      - identifier: title
        type: TextInput
        label: "Title"
      - identifier: opt_type
        type: Select
        label: "Type"
        renderType: selectSingle
        items:
          - label: "Grid"
            value: grid
          - label: "Slider"
            value: slider

  - identifier: palette_0
    type: Palette
    label: "Downloads"
    fields:
      - identifier: downloads_category
        type: Select
        label: "Filter by Category"
        renderType: selectSingle
        foreign_table: tx_zab_downloads_category
        foreign_table_where: "ORDER BY tx_zab_downloads_category.sorting"
        onChange: reload
        items:
          - label: "[ All ]"
            value: 0
      - type: Linebreak
      - identifier: downloads_records
        type: Select
        label: " "
        renderType: selectMultipleSideBySide
        foreign_table: tx_zab_downloads
        itemsProcFunc: 'Zab\ZabSite\Utility\ContentOptions->getDownloadsByCategory'

  #- identifier: downloads_records
  #  type: Relation
  #  label: 'Select Downloads'
  #  allowed: 'tx_zab_downloads'
