backend:
  name: github
  repo: GFDRR/rdl-urbantracker
  branch: hackathon
  commit_messages:
    create: |
      Create {{collection}} “{{slug}}"
      
      Authored by: {{author-login}}
    update: |
      Update {{collection}} “{{slug}}"
      
      Authored by: {{author-login}}
    delete: |
      Delete {{collection}} “{{slug}}"
      
      Authored by: {{author-login}}
    uploadMedia: Upload “{{path}}”
    deleteMedia: Delete “{{path}}”
    openAuthoring: '{{message}}'

logo:
  src: /img/branding/gfdrr_logo-dark.png
  show_in_header: true

media_folder: "img"

collections:
  - name: datasets
    label: Datasets
    label_singular: Dataset
    folder: _datasets
    create: true
    fields:
      - label: Submitter Email
        name: submitter_email
        widget: submitter_email
      - label: Title
        name: title
        widget: string
      - label: Description
        name: description
        widget: string
        required: false
      - label: Cities
        name: cities
        widget: relation
        collection: "cities"
        search_fields: ["title", "city_id"]
        value_field: "city_id"
        display_fields: ["{{title}} ({{city_id}})"]
        multiple: true
      - label: Datatypes
        name: datatypes
        widget: relation
        collection: "datatypes"
        search_fields: ["title", "category"]
        value_field: "title"
        display_fields: ["{{category}} / {{title}}"]
        multiple: true
      - label: External URL
        name: external_url
        widget: string
  - name: datatypes
    label: Datatypes
    label_singular: Datatype
    folder: _datatypes
    hide: true
    slug: "{{id}}-{{title}}"
    preview_path: "datatypes/{{slug}}"
    fields:
      - label: Title
        name: title
        widget: string
      - label: Category
        name: category
        widget: string
      - label: ID
        name: id
        widget: string
      - label: Description
        name: description
        widget: string
      - label: Example Indicators
        name: example_indicators
        widget: string
  - name: cities
    label: Cities
    label_singular: City
    identifier_field: city
    folder: _cities
    create: true
    slug: "{{city_id}}-{{city}}"
    preview_path: "cities/{{slug}}"
    fields:
      - label: City
        name: city
        widget: string
      - label: Wikidata ID
        name: city_id
        widget: string
      - label: Title
        name: title
        widget: string
        required: false
      - label: Flag URL
        name: flag
        required: false
        widget: string
        allow_multiple: false
      - label: Flag Attribution
        name: flag_attribution
        required: false
        widget: string
        allow_multiple: false
      - label: Country
        name: country
        widget: string
        allow_multiple: false
