diff --git a/kahuna/app/controllers/KahunaController.scala b/kahuna/app/controllers/KahunaController.scala index 7b22c04bbf..adc1596e98 100644 --- a/kahuna/app/controllers/KahunaController.scala +++ b/kahuna/app/controllers/KahunaController.scala @@ -70,6 +70,7 @@ class KahunaController( Html(s""""${config.staffPhotographerOrganisation}-owned"""") else Html("undefined") + val imageTypes = Json.toJson(config.imageTypes).toString() Ok(views.html.main( s"${config.authUri}/login?redirectUri=$returnUri", @@ -84,7 +85,8 @@ class KahunaController( costFilterChargeable, maybeOrgOwnedValue, config, - featureSwitchesJson + featureSwitchesJson, + imageTypes )) } diff --git a/kahuna/app/lib/KahunaConfig.scala b/kahuna/app/lib/KahunaConfig.scala index 51a0f1bbfb..43b04fe42f 100644 --- a/kahuna/app/lib/KahunaConfig.scala +++ b/kahuna/app/lib/KahunaConfig.scala @@ -70,6 +70,8 @@ class KahunaConfig(resources: GridConfigResources) extends CommonConfig(resource val announcements: Seq[Announcement] = configuration.getOptional[Seq[Announcement]]("announcements").getOrElse(Seq.empty) + val imageTypes: Seq[String] = configuration.getOptional[Seq[String]]("imageTypes").getOrElse(Seq.empty) + //BBC custom warning text val warningTextHeader: String = configuration.getOptional[String]("warningText.header") .getOrElse("This image can be used, but has warnings:") diff --git a/kahuna/app/views/main.scala.html b/kahuna/app/views/main.scala.html index ef5f77ba37..d579854688 100644 --- a/kahuna/app/views/main.scala.html +++ b/kahuna/app/views/main.scala.html @@ -15,6 +15,7 @@ maybeOrgOwnedValueHtml: Html, kahunaConfig: KahunaConfig, featureSwitches: String, + imageTypes: String, ) @@ -85,6 +86,7 @@ defaultShouldBlurGraphicImages: @kahunaConfig.defaultShouldBlurGraphicImages, shouldUploadStraightToBucket: @kahunaConfig.shouldUploadStraightToBucket, announcements: @Html(announcements), + imageTypes: @Html(imageTypes), } diff --git a/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.html b/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.html index 8a63dd02e8..e97aa901f8 100644 --- a/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.html +++ b/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.html @@ -46,7 +46,9 @@ -
+