<?php
return array(
    "type" => "project",
    "model" => "Project",
    "label" => "Projects",
    "label_singular" => "Project",
    "group" => "projects",
    "template" => false,
    "order" => true,
    "defaultSort" => ['id' => 'DESC'],
    "baseUri" => array(
        1 => array(
            "en" => "/projects",
            "de" => "/projekte",
            "sv" => "/projects",
            "fr" => "/projects",
            "es" => "/projects",
            "pt" => "/projects"
        ),
        2 => "/projects"
    ),
    "search" => array(
        1 => array(
            "primary" => array("title", "country_id"),
            "secondary" => array("content"),
            "display" => array(
                "title" => "title",
                "content" => "reference_summary|content",
                "image_id" => "overviewImage"
            ),
            "uri" => array(
                "en" => "/projects/{slug}",
                "de" => "/projekte/{slug}",
                "sv" => "/projects/{slug}",
                "fr" => "/projects/{slug}",
                "es" => "/projects/{slug}",
                "pt" => "/projects/{slug}"
            ),
            "filter" => array(
                "is_hero" => true
            ),
            "relations" => [
                "blocks",
                "cobenefits"
            ]
        )
    ),
    "fields" => array(
        array(
            "name" => "title",
            "label" => "title",
            "type" => "textBox",
            "maxLength" => 100,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "required|max:100",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "reference_summary",
            "label" => "Reference Summary",
            "type" => "textBox",
            "maxLength" => 220,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:220"
        ),
        array(
            "name" => "objective",
            "label" => "Objective / Summary",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim|xss_clean",
            "validation" => ""
        ),
        array(
            "name" => "spg_id",
            "label" => "SPG project ID",
            "type" => "textBox",
            "maxLength" => 45,
            "multiLanguage" => false,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "required|max:45",
            "placement" => "sidebar",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "is_hero",
            "label" => "Hero Project?",
            "type" => "checkBox",
            "validation" => "",
            "placement" => "sidebar",
            "info" =>  "Hero projects will be listed in the maps page and SEO enabled"
        ),
        /*
        array(
            "name" => "cf_au",
            "label" => "Climate Friendly AU project?",
            "type" => "checkBox",
            "validation" => "",
            "placement" => "sidebar"
        ),
        array(
            "name" => "cf_carbon",
            "label" => "Carbon Management Project?",
            "type" => "checkBox",
            "validation" => "",
            "placement" => "sidebar"
        ),
        array(
            "name" => "cf_goldpower",
            "label" => "CF GoldPower Project?",
            "type" => "checkBox",
            "validation" => "",
            "placement" => "sidebar"
        ),
        */
        array(
            "name" => "content",
            "label" => "content",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => ""
        ),
        /*
        array(
            "name" => "the_solution",
            "label" => "The Solution",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => ""
        ),
        array(
            "name" => "the_impact",
            "label" => "The impact",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => ""
        ),
        */
        array(
            "name"          => "blocks",
            "label"         => "Blocks",
            "type"          => "multiplePicker",
            "longList"      => true,
            "allowInsert"   => true,
            "multiLanguage" => true,
            "objectTypes"   => ["block"],
            "order"         => true,
            "blocksMode" => "also",
            "duplicateRelated"     => true
        ),
        array(
            "name" => "country_id",
            "label" => "country",
            "type" => "selectBox",
            "contentType" => "country",
            "preValidation" => "trim",
            "validation" => "required|integer|min:1",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "boxSearch" => true,
            "placement" => "sidebar",
            "allowInsert" => true
        ),
        /*
        array(
            "name" => "cf_pin_color",
            "label" => "CF Pin Color",
            "type" => "selectBox",
            "list" => array(
                "blue"      => "Blue",
                "gold"      => "Gold",
                "green"     => "Green"
            ),
            "preValidation" => "trim",
            "validation" => "required|in:blue,gold,green",
            "placement" => "sidebar"
        ),
        */
        /*
        array(
            "name" => "technology_id",
            "label" => "Technology",
            "type" => "selectBox",
            "contentType" => "technology",
            "preValidation" => "trim",
            "validation" => "required|integer|min:1",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "placement" => "sidebar"
        ),
        array(
            "name" => "standard_id",
            "label" => "standard",
            "type" => "selectBox",
            "contentType" => "standard",
            "preValidation" => "trim",
            "validation" => "required|integer|min:1",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "placement" => "sidebar"
        ),
        */
        array(
            "name" => "standards",
            "label" => "Standards",
            "type" => "multiplePicker",
            "objectTypes" => array("standard"),
            "order" => true,
            "maxSize" => 10
        ),
        array(
            "name" => "technologies",
            "label" => "Technologies",
            "type" => "multiplePicker",
            "objectTypes" => array("technology"),
            "order" => true,
            "maxSize" => 3
        ),
        array(
            "name" => "overviewImage",
            "label" => "overview image",
            "type" => "mediaPicker",
            "multiLanguage" => false,
            "mediaType" => "image",
            "placement" => "sidebar",
            "multiple" => false,
            "minSize" => "0",
            /*
            "thumbnailSizes" => array(
                array("type" => "fit", "name" => "200x200", "width" => 200, "height" => 200),
                array("type" => "fit", "name" => "600x445", "width" => 600, "height" => 445),
                array("type" => "fit", "name" => "420x670", "width" => 420, "height" => 670),
                array("type" => "fit", "name" => "340x300", "width" => 340, "height" => 300),
                array("type" => "fit", "name" => "280x160", "width" => 280, "height" => 160),
                array("type" => "fit", "name" => "420x260", "width" => 420, "height" => 260)
            ),
            */
            "relatedContentType" => 'project'
        ),
        array(
            "name" => "brochure_id",
            "label" => "Brochure",
            "type" => "selectBox",
            "contentType" => "publication",
            "preValidation" => "trim",
            "validation" => "nullable|integer|min:1",
            "placement" => "sidebar",
            "allowInsert" => true
        ),
        array(
            "name" => "location",
            "label" => "location",
            "type" => "location",
            "required" => false
        ),
        array(
            "name" => "sustainability",
            "label" => "Sustainability Topics",
            "type" => "multiplePicker",
            "websiteFiltered" => true,
            "objectTypes" => array("sustainability_topic"),
            "order" => true
        ),
        array(
            "name" => "cobenefits",
            "label" => "Sustainable Development Goals",
            "type" => "singlePicker",
            "objectType" => "project_cobenefit",
            "order" => true
        ),
        array(
            "name" => "projectImages",
            "label" => "Gallery Images",
            "type" => "singlePicker",
            "objectType" => "project_image",
            "order" => true
        ),
        array(
            "name" => "projectLinks",
            "label" => "Registry Links",
            "type" => "singlePicker",
            "objectType" => "project_link",
            "order" => true
        ),
        array(
            "name" => "poa_with_ms_cpa",
            "label" => "POA with MS CPA",
            "type" => "textBox",
            "maxLength" => 255,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:255"
        ),
        /*
        array(
            "name" => "slides",
            "label" => "slider images",
            "type" => "mediaPicker",
            "multiLanguage" => false,
            "mediaType" => 'image',
            "multiple" => true,
            "minSize" => "0",
            "relatedContentType" => 'project'
        ),
        array(
            "name" => "testimonials",
            "label" => "Testimonials",
            "type" => "multiplePicker",
            "websiteFiltered" => false,
            "objectTypes" => array("testimonial"),
            "order" => true
        ),
        */
        array(
            "name" => "recommend",
            "label" => "SPG Also Recommended",
            "type" => "multiplePicker",
            "websiteFiltered" => true,
            "objectTypes" => array("project", "solution", "case_study", "blog_post", "news", "content_snippet"),
            "order" => true,
            "longList"      => true,
        ),
        array(
            "name" => "meta_title",
            "label" => "SEO - Title Tag",
            "type" => "textBox",
            "maxLength" => 150,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:150"
        ),
        array(
            "name" => "meta_keywords",
            "label" => "SEO - Keywords",
            "type" => "textBox",
            "maxLength" => 150,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:150"
        ),
        array(
            "name" => "meta_description",
            "label" => "SEO - Description",
            "type" => "textArea",
            "maxLength" => 300,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:300"
        ),
        array(
            "name" => "codeEmbeds",
            "label" => "Code Embeds",
            "type" => "multiplePicker",
            "websiteFiltered" => true,
            "websites" => array(1),
            "objectTypes" => array("code_embed"),
            "order" => true,
            "allowInsert" =>false,
        ),
        /*
        array(
            "name" => "cf_no_index",
            "label" => "CF No Index",
            "type" => "checkBox",
            "placement" => "sidebar"
        ),
        array(
            "name" => "cf_no_list",
            "label" => "CF: Don't List - just direct link",
            "type" => "checkBox",
            "placement" => "sidebar"
        ),
        array(
            "name" => "relatedItems",
            "label" => "CF Related Items",
            "type" => "singlePicker",
            "objectType" => "cf_related_item",
            "pivotTable" => "project_cf_related_items",
            "order" => true,
            "maxSize" => 10
        ),
        array(
            "name" => "sidebarWidgets",
            "label" => "SPG Sidebar Widgets",
            "type" => "singlePicker",
            "objectType" => "sidebar_widget",
            "pivotTable" => "project_sb_widgets",
            "order" => true,
            "maxSize" => 20
        ),
        */
        /*
        array(
            "name" => "cfSidebarWidgets",
            "label" => "CF Sidebar Widgets",
            "type" => "singlePicker",
            "objectType" => "sidebar_widget",
            "pivotTable" => "project_cf_sb_widgets",
            "order" => true,
            "maxSize" => 20
        )
        */
    ),
    "actions" => array(
        "insert", "edit", "duplicate", "delete", "order"
    )
);
