---
Name: mysiteconfig
After:
  - '#rootroutes'
  - '#coreroutes'
---
# General YAML configuration for SilverStripe
# See http://doc.silverstripe.org/framework/en/topics/configuration
# Caution: Indentation through two spaces, not tabs

SilverStripe\View\SSViewer:
  theme: 'bootstarter'
MySQLDatabase:
  connection_charset: 'utf8'
SilverStripe\Assets\Upload:
  replaceFile: true
SilverStripe\AssetAdmin\Forms\UploadField:
  defaultConfig:
    overwriteWarning: true
SilverStripe\Assets\Flysystem\PublicAssetAdapter:
  server_configuration:
    apache:
      .htaccess: PublicAssetAdapter_HTAccess
---
Only:
  constantdefined: PROD_ENVIRONMENT
---
CwpSolr:
  options:
    version: 'cwp-4'
---
Except:
  constantdefined: DEV_ENVIRONMENT
---
CwpSolr:
  options:
    version: 'local-4'


# TODO This should be replaced with a dedicated DataObject and ModelAdmin
Script:
  clidesc_runtimes:
    /usr/bin/python: py
    /usr/bin/php: php
    /bin/bash: sh
    /usr/bin/ruby: rb
    /usr/bin/R: r

SilverStripe\Taxonomy\TaxonomyTerm:
  indexes:
    Name: 'Unique("Name")'
  db:
    Active: 'Boolean'

SilverStripe\Security\Member:
  interface_languages:
    en_GB: 'English (United Kingdom)'
    fr_FR: 'French (France)'
    de_DE: 'German (Germany)'

ExecutableEnvironment:
  default_records:
    # Most nix systems have access to /bin/sh (http://unix.stackexchange.com/questions/322035/are-there-still-systems-around-with-a-bin-sh-binary)
    - { Path: '/bin/sh', Name: sh }

Country:
  default_records:
    - { Name: American Samoa, Code: AS }
    - { Name: Australia, Code: AU }
    - { Name: Cook Islands, Code: CK }
    - { Name: Fiji, Code: FJ }
    - { Name: French Polynesia, Code: FP }
    - { Name: Guam, Code: GU }
    - { Name: Kiribati, Code: KI }
    - { Name: Marshall Islands, Code: MH }
    - { Name: Mauritius, Code: MU }
    - { Name: "Micronesia, Federated States of", Code: FM }
    - { Name: Nauru, Code: NR }
    - { Name: Niue, Code: NU }
    - { Name: New Caledonia, Code: NC }
    - { Name: New Zealand, Code: NZ }
    - { Name: Northern Mariana Islands, Code: MP }
    - { Name: Palau, Code: PW }
    - { Name: Papua New Guinea, Code: PG }
    - { Name: Pitcairn, Code: PN }
    - { Name: Samoa, Code: WS }
    - { Name: Solomon Islands, Code: SB }
    - { Name: Tavalu, Code: TV }
    - { Name: Timor-Leste, Code: TL }
    - { Name: Tokelau, Code: TK }
    - { Name: Tonga, Code: TO }
    - { Name: Vanuatu, Code: VU }
    - { Name: Wallis and Futuna, Code: WF }

Language:
  default_records:
    - { Name: English, Code: ENG }
    - { Name: Fijian, Code: FIJ }
    - { Name: French, Code: FRE }
    - { Name: Māori, Code: MAO }
    - { Name: Samoan, Code: SMO }
    - { Name: Tongan, Code: TON }
    - { Name: Bislama, Code: BIS }
    - { Name: Tok Pisin, Code: TPI }

ProductCategory:
  default_records:
    - { Name: General }
    - { Name: Monthly report }
    - { Name: Weather station graphs }
    - { Name: Climate summary }

SilverStripe\Admin\LeftAndMain:
  extra_requirements_css:
    - '_resources/app/client/css/ClidescCMS.css'
SilverStripe\CMS\Model\SiteTree:
  create_default_pages: false
SilverStripe\Core\Injector\Injector:
  GridField:
    class: GridFieldForReadonly
OL3Admin:
  menu_title: Maps

SilverStripe\Assets\File:
  allowed_extensions:
    - sh
    - py
    - r
    - html
    - php
    - rb
    - jar
    # ".pass" is a NIWA custom extension to be added to executables that normally would have no extension.
    - pass
  class_for_file_extension:
    sh: Script
    py: Script
    r: Script
    html: Script
    php: Script
    rb: Script
    jar: Script
    pass: Script

OL3Layer:
  summary_fields:
    Title: Title
    ClassName: Type
    Source.ClassName: Type
    Visible: Visible
