From c5b73c1fa2e6e97ee2f6982468818e0c048f6105 Mon Sep 17 00:00:00 2001 From: cairnsj <51908793+cairnsj@users.noreply.github.com> Date: Wed, 15 Nov 2023 09:02:20 +0000 Subject: [PATCH] Add video length field --- Childrens-Social-Care-CPD/Contentful/Models/VideoResource.cs | 1 + Childrens-Social-Care-CPD/Views/Shared/_VideoResource.cshtml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Childrens-Social-Care-CPD/Contentful/Models/VideoResource.cs b/Childrens-Social-Care-CPD/Contentful/Models/VideoResource.cs index 706384c0..ff6c6ac1 100644 --- a/Childrens-Social-Care-CPD/Contentful/Models/VideoResource.cs +++ b/Childrens-Social-Care-CPD/Contentful/Models/VideoResource.cs @@ -6,6 +6,7 @@ public class VideoResource : IContent { public string Id { get; set; } public Asset Video { get; set; } + public string Length { get; set; } public Document Transcript { get; set; } public string EmbeddedSourceUrl { get; set; } } diff --git a/Childrens-Social-Care-CPD/Views/Shared/_VideoResource.cshtml b/Childrens-Social-Care-CPD/Views/Shared/_VideoResource.cshtml index 812df3ab..ca1d2e79 100644 --- a/Childrens-Social-Care-CPD/Views/Shared/_VideoResource.cshtml +++ b/Childrens-Social-Care-CPD/Views/Shared/_VideoResource.cshtml @@ -8,6 +8,10 @@
+ @if (!string.IsNullOrEmpty(Model.Length)) + { +

@Model.Length

+ } @if(!string.IsNullOrEmpty(Model.EmbeddedSourceUrl)) { if (@Model.EmbeddedSourceUrl.IndexOf("vimeo") > -1)