From cdaa30d63809e4e7c726fca660568b4ce6f72fd1 Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Thu, 18 Sep 2025 14:36:36 +0100 Subject: [PATCH 1/2] TD-6230: SIT Defects-Recent Learning Page-2 --- .../Controllers/HomeController.cs | 2 +- .../Styles/layout/_layout.scss | 6 ++ .../Styles/nhsuk/pages/dashboard.scss | 6 ++ .../Views/Catalogue/AllCatalogue.cshtml | 2 +- .../Views/Catalogue/AllCatalogueSearch.cshtml | 2 +- .../Views/Catalogue/Catalogues.cshtml | 2 +- .../Views/Home/_CertificateCard.cshtml | 4 +- .../Views/Home/_LearningActivityCard.cshtml | 4 +- .../Views/Home/_MyCoursesAndElearning.cshtml | 56 ++++++++++++------- .../Views/Home/_ResourceCard.cshtml | 2 +- .../Views/Home/_ResourceTray.cshtml | 10 +++- .../Resources/ResourceVersionRepository.cs | 6 -- 12 files changed, 65 insertions(+), 37 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs index a23e986e0..5f4540b57 100644 --- a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs @@ -208,7 +208,7 @@ public IActionResult HomepageWithAuthentication() /// The resource dashboard type. /// The catalogue dashboard type. /// Home page. - public async Task Index(string dashboardTrayLearningResourceType = "all", string myLearningDashboard = "my-in-progress", string resourceDashboard = "popular-resources", string catalogueDashboard = "popular-catalogues") + public async Task Index(string dashboardTrayLearningResourceType = "all", string myLearningDashboard = "my-in-progress", string resourceDashboard = "my-recent-completed", string catalogueDashboard = "popular-catalogues") { if (this.User?.Identity.IsAuthenticated == true) { diff --git a/LearningHub.Nhs.WebUI/Styles/layout/_layout.scss b/LearningHub.Nhs.WebUI/Styles/layout/_layout.scss index bbacdc52d..c2ef190b0 100644 --- a/LearningHub.Nhs.WebUI/Styles/layout/_layout.scss +++ b/LearningHub.Nhs.WebUI/Styles/layout/_layout.scss @@ -320,6 +320,12 @@ input:required:invalid, input:focus:invalid { -webkit-line-clamp: 3; -webkit-box-orient: vertical; } +.line-clamp-5 { + display: -webkit-box !important; + overflow: hidden; + -webkit-line-clamp: 5; + -webkit-box-orient: vertical; +} .search-box-container { display: flex; flex-direction: row; diff --git a/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/dashboard.scss b/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/dashboard.scss index 6dde76f58..ba1ce9f28 100644 --- a/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/dashboard.scss +++ b/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/dashboard.scss @@ -47,6 +47,12 @@ } } +.course-card { + border: 1px solid #1C366A; + border-radius: 8px; + box-shadow: 2px 2px 0 #1C366A; +} + .dashboard-card-content { display: flex; flex-direction: column; diff --git a/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogue.cshtml b/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogue.cshtml index 88e11b91b..700138dda 100644 --- a/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogue.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogue.cshtml @@ -79,7 +79,7 @@

- @item.Name + @item.Name

diff --git a/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogueSearch.cshtml b/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogueSearch.cshtml index 379cffa64..41d02c3e8 100644 --- a/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogueSearch.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogueSearch.cshtml @@ -65,7 +65,7 @@

- @item.Name + @item.Name

diff --git a/LearningHub.Nhs.WebUI/Views/Catalogue/Catalogues.cshtml b/LearningHub.Nhs.WebUI/Views/Catalogue/Catalogues.cshtml index 486a6b624..a5b5b6acd 100644 --- a/LearningHub.Nhs.WebUI/Views/Catalogue/Catalogues.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Catalogue/Catalogues.cshtml @@ -76,7 +76,7 @@

- @item.Name + @item.Name

diff --git a/LearningHub.Nhs.WebUI/Views/Home/_CertificateCard.cshtml b/LearningHub.Nhs.WebUI/Views/Home/_CertificateCard.cshtml index b2716efb4..485eb1af4 100644 --- a/LearningHub.Nhs.WebUI/Views/Home/_CertificateCard.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Home/_CertificateCard.cshtml @@ -42,10 +42,10 @@ } ); } -
+
-

+

@if ((ResourceTypeEnum)Model.Item2.ResourceTypeId == ResourceTypeEnum.Moodle) { diff --git a/LearningHub.Nhs.WebUI/Views/Home/_LearningActivityCard.cshtml b/LearningHub.Nhs.WebUI/Views/Home/_LearningActivityCard.cshtml index 03d76d2b8..799c4169d 100644 --- a/LearningHub.Nhs.WebUI/Views/Home/_LearningActivityCard.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Home/_LearningActivityCard.cshtml @@ -22,10 +22,10 @@ return moodleApiService.GetCourseUrl(courseId); } } -
+
-

+

@if (ViewActivityHelper.GetResourceTypeDesc(Model.Item2.ResourceType) == "Course") { diff --git a/LearningHub.Nhs.WebUI/Views/Home/_MyCoursesAndElearning.cshtml b/LearningHub.Nhs.WebUI/Views/Home/_MyCoursesAndElearning.cshtml index 76dd1a61d..2a2c5e5ad 100644 --- a/LearningHub.Nhs.WebUI/Views/Home/_MyCoursesAndElearning.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Home/_MyCoursesAndElearning.cshtml @@ -56,28 +56,44 @@

-
- Show - - - All - - - - Courses - +
+
@if (Model.MyLearnings.Type == "my-in-progress" && Model.MyLearnings.Activities?.Count() > 0) diff --git a/LearningHub.Nhs.WebUI/Views/Home/_ResourceCard.cshtml b/LearningHub.Nhs.WebUI/Views/Home/_ResourceCard.cshtml index 0e87cf85c..48f6cacfc 100644 --- a/LearningHub.Nhs.WebUI/Views/Home/_ResourceCard.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Home/_ResourceCard.cshtml @@ -16,7 +16,7 @@
-

+

@UtilityHelper.StripHtmlFromString(Model.Item2.Title)

diff --git a/LearningHub.Nhs.WebUI/Views/Home/_ResourceTray.cshtml b/LearningHub.Nhs.WebUI/Views/Home/_ResourceTray.cshtml index 756908897..4a48a59ae 100644 --- a/LearningHub.Nhs.WebUI/Views/Home/_ResourceTray.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Home/_ResourceTray.cshtml @@ -10,10 +10,12 @@ case "rated-resources": return "Highly rated"; case "recent-resources": - return "Recently added"; + return "Recently added"; case "popular-resources": - default: return "Most accessed"; + case "my-recent-completed": + default: + return "Recently Completed"; } } var pagingViewModel = new DashBoardPagingViewModel @@ -43,6 +45,10 @@