diff --git a/.github/azure-pipeline-webui-ci.yml b/.github/azure-pipeline-webui-ci.yml index 21d9d6ddc..343c9ed8c 100644 --- a/.github/azure-pipeline-webui-ci.yml +++ b/.github/azure-pipeline-webui-ci.yml @@ -51,6 +51,57 @@ jobs: inputs: command: restore projects: $(BuildParameters.RestoreBuildProjects) + # Step 1: Get the version tag from the repository +- script: | + echo "Extracting version from Git tag: $(versionTag)" + VERSION=$(echo $(versionTag) | sed 's/^v//') + echo "VERSION=$VERSION" >> $(Build.ArtifactStagingDirectory)/version.txt + displayName: 'Extract version tag' + +# Step 2: Update AssemblyVersion in Web UI .csproj +- powershell: | + $versionFile = "$(Build.ArtifactStagingDirectory)/version.txt" + $version = Get-Content $versionFile + $version = $version.Trim() + + # Path to your .csproj file (adjust if necessary) + $csprojFile = "$(Build.SourcesDirectory)\LearningHub.Nhs.WebUI\LearningHub.Nhs.WebUI.csproj" + + Write-Host "Updating AssemblyVersion and FileVersion and Version in $csprojFile to $version" + + # Load the .csproj XML file + [xml]$csprojXml = Get-Content -Path $csprojFile + + # Update the AssemblyVersion and FileVersion + $csprojXml.Project.PropertyGroup.AssemblyVersion = $version + $csprojXml.Project.PropertyGroup.FileVersion = $version + $csprojXml.Project.PropertyGroup.Version = $version + + # Save the updated .csproj file + $csprojXml.Save($csprojFile) + displayName: 'Update AssemblyVersion in WebUI .csproj' + # Step 2: Update AssemblyVersion in Admin UI .csproj +- powershell: | + $versionFile = "$(Build.ArtifactStagingDirectory)/version.txt" + $version = Get-Content $versionFile + $version = $version.Trim() + + # Path to your .csproj file (adjust if necessary) + $csprojFile = "$(Build.SourcesDirectory)\AdminUI\LearningHub.Nhs.AdminUI\LearningHub.Nhs.AdminUI.csproj" + + Write-Host "Updating AssemblyVersion and FileVersion and Version in $csprojFile to $version" + + # Load the .csproj XML file + [xml]$csprojXml = Get-Content -Path $csprojFile + + # Update the AssemblyVersion and FileVersion + $csprojXml.Project.PropertyGroup.AssemblyVersion = $version + $csprojXml.Project.PropertyGroup.FileVersion = $version + $csprojXml.Project.PropertyGroup.Version = $version + + # Save the updated .csproj file + $csprojXml.Save($csprojFile) + displayName: 'Update AssemblyVersion in AdminUI .csproj' - task: DotNetCoreCLI@2 displayName: Build inputs: diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d705a4791..b276131f7 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,25 +1,25 @@ ### JIRA link -_TD-###_ +[TD-####](https://hee-tis.atlassian.net/browse/TD-####) ### Description -_Describe what has changed and how that will affect the app. If relevant, add references to the resources you used. Use this as your opportunity to highlight anything odd and give people context around particular decisions._ +_Describe what has changed and how that will affect the app. If relevant, add links to any sources/documentation you used. Highlight anything unusual and give people context around particular decisions._ ### Screenshots -_Attach screenshots on mobile, tablet and desktop._ +_Paste screenshots for all views created or changed: mobile, tablet and desktop, wave analyser showing no errors._ ----- ### Developer checks (Leave tasks unticked if they haven't been appropriate for your ticket.) I have: -- [ ] Run the formatter and made sure there are no IDE errors -- [ ] Written appropriate unit tests for the changes, including: - - accessibility tests for new views - - tests for new controller methods - - tests for new or modified API endpoints -- [ ] Manually tested my work with and without JavaScript -- [ ] Tested any Views or partials created or changed with [Wave Chrome plugin](https://chrome.google.com/webstore/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh/related) and addressed any valid accessibility issues -- [ ] Updated/added documentation in [Confluence](https://hee-tis.atlassian.net/wiki/spaces/TP/pages/3477930003/Learning+Hub) and/or [GitHub Readme](https://github.com/TechnologyEnhancedLearning/LearningHub.Nhs.UserApi/blob/master/README.md). List of documentation links added/changed: +- [ ] Run the IDE auto formatter on all files I’ve worked on and made sure there are no IDE errors relating to them +- [ ] Written or updated tests for the changes (accessibility ui tests for views, tests for controller, data services, services, view models created or modified) and made sure all tests are passing +- [ ] Manually tested my work with and without JavaScript (adding notes where functionality requires JavaScript) +- [ ] Tested any Views or partials created or changed with [Wave Chrome plugin](https://chrome.google.com/webstore/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh/related). Addressed any valid accessibility issues and documented any invalid errors +- [ ] Updated my Jira ticket with testing notes, including information about other parts of the system that were touched as part of the MR and need to be tested to ensure nothing is broken +- [ ] Scanned over my pull request in GitHub and addressed any warnings from the GitHub Build and Test checks in the GitHub PR ‘Files Changed’ tab +Either: +- [ ] Documented my work in [Confluence](https://hee-tis.atlassian.net/wiki/spaces/TP/pages/3461087233/Development), updating any business rules applied or modified. Updated GitHub readme/documentation for the repository if appropriate. List of documentation links added/changed: - [doc_1_here](link_1_here) -- [ ] Updated my Jira ticket with information about other parts of the system that were touched as part of the MR and have to be sanity tested to ensure nothing is broken -- [ ] Scanned over my pull request in GitHub and addressed any warnings from the GitHub Build and Test checks. +Or: +- [ ] Confirmed that none of the work that I have undertaken requires any updates to documentation \ No newline at end of file diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs index 2338e457c..845a12a66 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs +++ b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs @@ -91,11 +91,15 @@ public ResourceController( /// The Details. /// /// The id. + /// The activeTab. + /// The status. /// The . [HttpGet] - public async Task Details(int id) + public async Task Details(int id, string activeTab = "details", string status = "") { var resource = await this.resourceService.GetResourceVersionExtendedViewModelAsync(id); + this.ViewBag.ActiveTab = activeTab; + this.ViewBag.Status = status; return this.View(resource); } @@ -138,6 +142,46 @@ public async Task GetValidationResults(int resourceVersionId) return this.PartialView("_ValidationResults", vm); } + /// + /// The GetDevIdDetails. + /// + /// The resourceVersionId. + /// The . + [HttpPost] + public async Task GetDevIdDetails(int resourceVersionId) + { + var vm = await this.resourceService.GetResourceVersionDevIdDetailsAsync(resourceVersionId); + + return this.PartialView("_DevIdDetails", vm); + } + + /// + /// The update the dev Id details. + /// + /// The model. + /// The . + [HttpPost] + public async Task UpdateDevIdDetails(ResourceVersionDevIdViewModel model) + { + var message = string.Empty; + if (string.IsNullOrEmpty(model.DevId)) + { + message = "Enter a Dev id for the resource"; + } + else if (await this.resourceService.DoesDevIdExistsAsync(model.DevId.Trim())) + { + message = "Duplicate"; + } + else + { + model.DevId = model.DevId.Trim(); + await this.resourceService.UpdateDevIdDetailsAsync(model); + message = "Success"; + } + + return this.RedirectToAction("Details", new { id = model.ResourceVersionId, activeTab = "devId", status = message }); + } + /// /// The Index. /// diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Interfaces/IResourceService.cs b/AdminUI/LearningHub.Nhs.AdminUI/Interfaces/IResourceService.cs index 826c98b55..703be694e 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Interfaces/IResourceService.cs +++ b/AdminUI/LearningHub.Nhs.AdminUI/Interfaces/IResourceService.cs @@ -32,9 +32,30 @@ public interface IResourceService /// The GetResourceVersionValidationResultAsync. /// /// The resourceVersionId. - /// The . + /// The . Task GetResourceVersionValidationResultAsync(int resourceVersionId); + /// + /// The GetResourceVersionDevIdDetailsAsync. + /// + /// The resourceVersionId. + /// The . + Task GetResourceVersionDevIdDetailsAsync(int resourceVersionId); + + /// + /// Check dev id already exist against a resource. + /// + /// string devId. + /// The . + Task DoesDevIdExistsAsync(string devId); + + /// + /// To update dev id details for a resource. + /// + /// the ResourceVersionDevIdViewModel. + /// The . + Task UpdateDevIdDetailsAsync(ResourceVersionDevIdViewModel model); + /// /// The GetResourceVersionExtendedViewModelAsync. /// diff --git a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj index 0b26b9cd7..14ddfdbde 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj +++ b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj @@ -1,642 +1,649 @@  - - net6.0 - 31abd8b9-4223-4ff3-896b-a46530c9e15c - /subscriptions/57c55d5f-78c1-4373-a021-ff8357548f51/resourceGroups/LearningHubNhsUk-AdminUI-Prod-RG/providers/microsoft.insights/components/LearningHubNhsUk-AdminUI-Prod - true - true - x64 - + + net6.0 + 1.0.0.0 + 1.0.0.0 + 1.0.0 + 31abd8b9-4223-4ff3-896b-a46530c9e15c + /subscriptions/57c55d5f-78c1-4373-a021-ff8357548f51/resourceGroups/LearningHubNhsUk-AdminUI-Prod-RG/providers/microsoft.insights/components/LearningHubNhsUk-AdminUI-Prod + true + true + x64 + - - - - - - + + + + + + - - - - - - - - - - - - - + + + + - - <_ContentIncludedByDefault Remove="bundleconfig.json" /> - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + <_ContentIncludedByDefault Remove="bundleconfig.json" /> + - - - - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - Always - - + + + Always + + + + + + + + + - - diff --git a/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs b/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs index 5517fa636..99e425d86 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs +++ b/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs @@ -141,6 +141,7 @@ public static void ConfigureServices(this IServiceCollection services, IConfigur services.AddTransient(); services.AddSingleton(); + services.AddSingleton(); services.AddAuthentication(options => { diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Services/ResourceService.cs b/AdminUI/LearningHub.Nhs.AdminUI/Services/ResourceService.cs index d0d595b52..4c6e3fe46 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Services/ResourceService.cs +++ b/AdminUI/LearningHub.Nhs.AdminUI/Services/ResourceService.cs @@ -2,6 +2,7 @@ { using System; using System.Collections.Generic; + using System.Net; using System.Net.Http; using System.Text; using System.Threading.Tasks; @@ -130,6 +131,89 @@ public async Task GetResourceVersionVa return viewmodel; } + /// + /// The GetResourceVersionDevIdDetailsAsync. + /// + /// The resourceVersionId. + /// The . + public async Task GetResourceVersionDevIdDetailsAsync(int resourceVersionId) + { + ResourceVersionDevIdViewModel viewmodel = null; + + var client = await this.LearningHubHttpClient.GetClientAsync(); + + var request = $"Resource/GetResourceVersionDevIdDetails/{resourceVersionId.ToString()}"; + var response = await client.GetAsync(request).ConfigureAwait(false); + + if (response.IsSuccessStatusCode) + { + var result = response.Content.ReadAsStringAsync().Result; + viewmodel = JsonConvert.DeserializeObject(result); + } + else if (response.StatusCode == System.Net.HttpStatusCode.Unauthorized + || + response.StatusCode == System.Net.HttpStatusCode.Forbidden) + { + throw new Exception("AccessDenied"); + } + + return viewmodel; + } + + /// + /// The GetResourceVersionDevIdDetailsAsync. + /// + /// The devId. + /// The . + public async Task DoesDevIdExistsAsync(string devId) + { + var client = await this.LearningHubHttpClient.GetClientAsync(); + + var request = $"Resource/DoesDevIdExists/{devId}"; + var response = await client.GetAsync(request).ConfigureAwait(false); + var doesDevIdExist = false; + if (response.IsSuccessStatusCode) + { + var result = response.Content.ReadAsStringAsync().Result; + doesDevIdExist = JsonConvert.DeserializeObject(result); + } + else if (response.StatusCode == System.Net.HttpStatusCode.Unauthorized + || + response.StatusCode == System.Net.HttpStatusCode.Forbidden) + { + throw new Exception("AccessDenied"); + } + + return doesDevIdExist; + } + + /// + /// Update dev id details for a resource. + /// + /// The model. + /// The . + /// the exception. + public async Task UpdateDevIdDetailsAsync(ResourceVersionDevIdViewModel model) + { + var json = JsonConvert.SerializeObject(model); + var stringContent = new StringContent(json, UnicodeEncoding.UTF8, "application/json"); + + var client = await this.LearningHubHttpClient.GetClientAsync(); + + var request = $"Resource/UpdateDevId"; + var response = await client.PutAsync(request, stringContent).ConfigureAwait(false); + + if (response.StatusCode == HttpStatusCode.Unauthorized || response.StatusCode == HttpStatusCode.Forbidden) + { + throw new Exception("AccessDenied"); + } + + if (!response.IsSuccessStatusCode) + { + throw new Exception("Update first name failed!"); + } + } + /// /// The GetResourceVersionExtendedViewModelAsync. /// diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Services/VersionService.cs b/AdminUI/LearningHub.Nhs.AdminUI/Services/VersionService.cs new file mode 100644 index 000000000..45361c052 --- /dev/null +++ b/AdminUI/LearningHub.Nhs.AdminUI/Services/VersionService.cs @@ -0,0 +1,18 @@ +namespace LearningHub.Nhs.AdminUI.Services +{ + /// + /// Defines the . + /// + public class VersionService + { + /// + /// The GetVersion. + /// + /// The . + public string GetVersion() + { + var version = typeof(Program).Assembly.GetName().Version; + return $"{version?.Major}.{version?.Minor}.{version?.Build}"; + } + } +} diff --git a/AdminUI/LearningHub.Nhs.AdminUI/ViewComponents/VersionViewComponent.cs b/AdminUI/LearningHub.Nhs.AdminUI/ViewComponents/VersionViewComponent.cs new file mode 100644 index 000000000..db857b6ce --- /dev/null +++ b/AdminUI/LearningHub.Nhs.AdminUI/ViewComponents/VersionViewComponent.cs @@ -0,0 +1,34 @@ +namespace LearningHub.Nhs.AdminUI.ViewComponents +{ + using LearningHub.Nhs.AdminUI.Services; + using Microsoft.AspNetCore.Html; + using Microsoft.AspNetCore.Mvc; + using Microsoft.AspNetCore.Mvc.ViewComponents; + + /// + /// Initializes a new instance of the class. + /// + public class VersionViewComponent : ViewComponent + { + private readonly VersionService versionService; + + /// + /// Initializes a new instance of the class. + /// + /// . + public VersionViewComponent(VersionService versionService) + { + this.versionService = versionService; + } + + /// + /// The Invoke. + /// + /// A representing the result of the synchronous operation. + public IViewComponentResult Invoke() + { + var version = this.versionService.GetVersion(); + return new HtmlContentViewComponentResult(new HtmlString($"")); + } + } +} diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml index a2df6a2c6..5c7b99069 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml +++ b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml @@ -5,862 +5,919 @@ @inject IOptions webSettings @{ - ViewData["Title"] = "Details"; + ViewData["Title"] = "Details"; + var activetab = this.ViewBag.ActiveTab; } @section Styles{ - + }
- -
-
+ +
+
+
+ + @if (Model.ResourceVersionId == 0) + { +
Resource Version not found
+ } + else + { +
+
@Model.Title (@Model.VersionStatusDescription)
+
+ @if (Model.VersionStatusEnum == VersionStatusEnum.Published) + { + + } + @if (Model.VersionStatusEnum == VersionStatusEnum.Publishing || Model.VersionStatusEnum == VersionStatusEnum.FailedToPublish) + { + + } + +
- - @if (Model.ResourceVersionId == 0) - { -
Resource Version not found
- } - else - { -
-
@Model.Title (@Model.VersionStatusDescription)
-
- @if (Model.VersionStatusEnum == VersionStatusEnum.Published) + + + + + + + +
+ +
+ +
+ +
+
+
+
Resource Version ID: @Model.ResourceVersionId
+
+ @if (Model.Providers != null && Model.Providers.Count > 0) + { +
Developed with
+ @foreach (var provider in Model.Providers) { - +
+ @Html.DisplayFor(model =>provider.Name) +
} - @if (Model.VersionStatusEnum == VersionStatusEnum.Publishing || Model.VersionStatusEnum == VersionStatusEnum.FailedToPublish) + } + @if (Model.VersionStatusEnum == VersionStatusEnum.Published) + { +
URL
+
+ + @String.Format("{0}Resource/{1}", webSettings.Value.LearningHubUrl, Model.DefaultResourceReferenceId) + +
+ } +
Resource Type
+
+ @Html.DisplayFor(model => model.ResourceTypeDescription) +
+
Audience Access Level
+
+ @ResourceAccessiblityHelper.GetResourceAccessibilityLevelText(Model.ResourceAccessibilityEnum) +
+
Title
+
+ @Html.DisplayFor(model => model.Title) +
+
Description
+
+ @Html.Raw(Model.Description) +
+
Additional Information
+
+ @Html.Raw(Model.AdditionalInformation) +
+
Authors
+
+ @Html.Raw(Model.Authors.Any() ? string.Join(",", Model.Authors) : "None specified") +
+
Keywords
+
+ @Html.Raw(Model.Keywords.Any() ? string.Join(",", Model.Keywords) : "None specified") +
+ @if (Model.VersionStatusEnum == VersionStatusEnum.Published + || Model.VersionStatusEnum == VersionStatusEnum.Unpublished) + { +
Version
+
+ @Html.DisplayFor(model => model.VersionDescription) +
+ } +
Version Status
+
+ @Html.DisplayFor(model => model.VersionStatusDescription) +
+
Create User
+
+ @Html.DisplayFor(model => model.CreateUser) +
+
Create Date
+
+ @Model.CreateDate.DateTime +
+
+
+
+
+ +
+
+ + @if (Model.ResourceTypeEnum == ResourceTypeEnum.Article) + { +
+
Resource Version ID: @Model.ResourceVersionId
+
+
Resource Version Id
+
+ @Html.DisplayFor(model => model.ResourceVersionId) +
+
Resource Type
+
+ @Html.DisplayFor(model => model.ResourceTypeDescription) +
+
Content
+
+ @Html.Raw(Model.ArticleDetails.Content) +
+
Attachments
+
+ @if (Model.ArticleDetails.Files.Any()) + { + @(await Html.PartialAsync("_Files", Model.ArticleDetails.Files)) + } + else + { + @Html.Raw("None") + } +
+
+
+ } + + @if (Model.ResourceTypeEnum == ResourceTypeEnum.Audio) + { +
+ @if (Model.AudioDetails.File == null || Model.AudioDetails.TranscriptFile == null) + { +
+ @if (Model.AudioDetails.File == null) + { + @Html.Raw("No Audio File is associated with this Resource Version") + } + @if (Model.AudioDetails.TranscriptFile == null) + { + @Html.Raw("No Transcript File is associated with this Resource Version") + } +
+ } +
Resource Reference ID: @Model.DefaultResourceReferenceId
+
+
Resource Version Id
+
+ @Html.DisplayFor(model => model.ResourceVersionId) +
+
Resource Type
+
+ @Html.DisplayFor(model => model.ResourceTypeDescription) +
+ @if (@Model.AudioDetails.File != null) { - +
Audio File
+
+ @Model.AudioDetails.File.FileName +
+
Audio File Path
+
+ @Model.AudioDetails.File.FilePath +
} - + @if (@Model.AudioDetails.TranscriptFile != null) + { +
Transcript File
+
+ @Model.AudioDetails.TranscriptFile.FileName +
+
Transcript File Path
+
+ @Model.AudioDetails.TranscriptFile.FilePath +
+ } +
-
+ } + + @if (Model.ResourceTypeEnum == ResourceTypeEnum.Case) + { +
+
Resource Version ID: @Model.ResourceVersionId
+
+
Resource Version Id
+
+ @Html.DisplayFor(model => model.ResourceVersionId) +
+
Resource Type
+
+ @Html.DisplayFor(model => model.ResourceTypeDescription) +
+ @if (Model.CaseDetails is { BlockCollection: { } }) + { + if (Model.CaseDetails.BlockCollection.Blocks != null) + { +
Number of Blocks
+
+ @Html.DisplayFor(model => model.CaseDetails.BlockCollection.Blocks.Count) +
+ } + } +
-